2024-03-20 22:02:51 +01:00
|
|
|
import { PersonEntity } from 'src/entities/person.entity';
|
2024-03-20 19:32:04 +01:00
|
|
|
import { userStub } from 'test/fixtures/user.stub';
|
2023-08-01 03:28:07 +02:00
|
|
|
|
|
|
|
export const personStub = {
|
|
|
|
noName: Object.freeze<PersonEntity>({
|
|
|
|
id: 'person-1',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
ownerId: userStub.admin.id,
|
|
|
|
owner: userStub.admin,
|
|
|
|
name: '',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
|
|
faces: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
isHidden: false,
|
|
|
|
}),
|
|
|
|
hidden: Object.freeze<PersonEntity>({
|
|
|
|
id: 'person-1',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
ownerId: userStub.admin.id,
|
|
|
|
owner: userStub.admin,
|
|
|
|
name: '',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
|
|
faces: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
isHidden: true,
|
|
|
|
}),
|
|
|
|
withName: Object.freeze<PersonEntity>({
|
|
|
|
id: 'person-1',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
ownerId: userStub.admin.id,
|
|
|
|
owner: userStub.admin,
|
|
|
|
name: 'Person 1',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
|
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
|
|
faces: [],
|
2023-12-05 16:43:15 +01:00
|
|
|
faceAssetId: 'assetFaceId',
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAsset: null,
|
2023-08-18 22:10:29 +02:00
|
|
|
isHidden: false,
|
|
|
|
}),
|
|
|
|
withBirthDate: Object.freeze<PersonEntity>({
|
|
|
|
id: 'person-1',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
ownerId: userStub.admin.id,
|
|
|
|
owner: userStub.admin,
|
|
|
|
name: 'Person 1',
|
2024-07-30 01:52:04 +02:00
|
|
|
birthDate: '1976-06-30',
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
|
|
faces: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
isHidden: false,
|
|
|
|
}),
|
|
|
|
noThumbnail: Object.freeze<PersonEntity>({
|
|
|
|
id: 'person-1',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
ownerId: userStub.admin.id,
|
|
|
|
owner: userStub.admin,
|
|
|
|
name: '',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '',
|
|
|
|
faces: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
isHidden: false,
|
|
|
|
}),
|
|
|
|
newThumbnail: Object.freeze<PersonEntity>({
|
|
|
|
id: 'person-1',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
ownerId: userStub.admin.id,
|
|
|
|
owner: userStub.admin,
|
|
|
|
name: '',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '/new/path/to/thumbnail.jpg',
|
|
|
|
faces: [],
|
2023-12-05 16:43:15 +01:00
|
|
|
faceAssetId: 'asset-id',
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
isHidden: false,
|
|
|
|
}),
|
|
|
|
primaryPerson: Object.freeze<PersonEntity>({
|
|
|
|
id: 'person-1',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
ownerId: userStub.admin.id,
|
|
|
|
owner: userStub.admin,
|
|
|
|
name: 'Person 1',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '/path/to/thumbnail',
|
|
|
|
faces: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
isHidden: false,
|
|
|
|
}),
|
|
|
|
mergePerson: Object.freeze<PersonEntity>({
|
|
|
|
id: 'person-2',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
ownerId: userStub.admin.id,
|
|
|
|
owner: userStub.admin,
|
|
|
|
name: 'Person 2',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '/path/to/thumbnail',
|
|
|
|
faces: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
isHidden: false,
|
|
|
|
}),
|
2024-01-19 18:52:26 +01:00
|
|
|
randomPerson: Object.freeze<PersonEntity>({
|
|
|
|
id: 'person-3',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
ownerId: userStub.admin.id,
|
|
|
|
owner: userStub.admin,
|
|
|
|
name: '',
|
|
|
|
birthDate: null,
|
|
|
|
thumbnailPath: '/path/to/thumbnail',
|
|
|
|
faces: [],
|
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
|
|
|
isHidden: false,
|
|
|
|
}),
|
2023-08-01 03:28:07 +02:00
|
|
|
};
|