fix: failing e2e tests

This commit is contained in:
bwees
2025-12-03 22:46:50 -06:00
parent 40326b434e
commit e144161d51
3 changed files with 5 additions and 2 deletions

View File

@@ -1116,7 +1116,7 @@ describe('/asset', () => {
expect(response.status).toBe(AssetMediaStatus.Created); expect(response.status).toBe(AssetMediaStatus.Created);
const id = response.id; const id = response.id;
// longer timeout as the thumbnail generation from full-size raw files can take a while // longer timeout as the thumbnail generation from full-size raw files can take a while
await utils.waitForWebsocketEvent({ event: 'assetUpload', id }); await utils.waitForWebsocketEvent({ event: 'assetUpload', id, timeout: 20_000 });
const asset = await utils.getAssetInfo(admin.accessToken, id); const asset = await utils.getAssetInfo(admin.accessToken, id);
expect(asset.exifInfo).toBeDefined(); expect(asset.exifInfo).toBeDefined();

View File

@@ -346,6 +346,8 @@ export function toAssetResponseDto(asset: MockTimelineAsset, owner?: UserRespons
duplicateId: null, duplicateId: null,
resized: true, resized: true,
checksum: asset.checksum, checksum: asset.checksum,
width: exifInfo.exifImageWidth ?? 1,
height: exifInfo.exifImageHeight ?? 1,
}; };
} }

View File

@@ -478,10 +478,11 @@ export class AssetRepository {
.selectAll('asset') .selectAll('asset')
.$call(withExif) .$call(withExif)
.$call((qb) => qb.select(withFacesAndPeople)) .$call((qb) => qb.select(withFacesAndPeople))
.$call((qb) => qb.select(withEdits))
.executeTakeFirst(); .executeTakeFirst();
} }
return this.getById(asset.id, { exifInfo: true, faces: { person: true } }); return this.getById(asset.id, { exifInfo: true, faces: { person: true }, edits: true });
} }
async remove(asset: { id: string }): Promise<void> { async remove(asset: { id: string }): Promise<void> {