mirror of
https://github.com/immich-app/immich.git
synced 2026-02-28 17:49:05 +03:00
refactor: small face tests (#26340)
This commit is contained in:
@@ -18,14 +18,14 @@ export class AssetFaceFactory {
|
||||
static from(dto: AssetFaceLike = {}) {
|
||||
return new AssetFaceFactory({
|
||||
assetId: newUuid(),
|
||||
boundingBoxX1: 11,
|
||||
boundingBoxX2: 12,
|
||||
boundingBoxY1: 21,
|
||||
boundingBoxY2: 22,
|
||||
boundingBoxX1: 100,
|
||||
boundingBoxX2: 200,
|
||||
boundingBoxY1: 100,
|
||||
boundingBoxY2: 200,
|
||||
deletedAt: null,
|
||||
id: newUuid(),
|
||||
imageHeight: 42,
|
||||
imageWidth: 420,
|
||||
imageHeight: 500,
|
||||
imageWidth: 400,
|
||||
isVisible: true,
|
||||
personId: null,
|
||||
sourceType: SourceType.MachineLearning,
|
||||
|
||||
@@ -96,7 +96,7 @@ export class AssetFactory {
|
||||
}
|
||||
|
||||
face(dto: AssetFaceLike = {}, builder?: FactoryBuilder<AssetFaceFactory>) {
|
||||
this.#faces.push(build(AssetFaceFactory.from(dto), builder));
|
||||
this.#faces.push(build(AssetFaceFactory.from({ assetId: this.value?.id, ...dto }), builder));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user