1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-11-25 22:32:52 +02:00

Fix flaky search tests

This commit is contained in:
Patrik J. Braun
2025-10-24 23:19:04 +02:00
parent e103c59a56
commit fcdfc52489
3 changed files with 23 additions and 8 deletions

View File

@@ -196,6 +196,9 @@ export class TestHelper {
} as FaceRegion, {
box: {height: 10, width: 10, left: 103, top: 103},
name: 'Han Solo'
} as FaceRegion, {
box: {height: 10, width: 10, left: 101, top: 101},
name: 'Anakin Skywalker'
} as FaceRegion, {
box: {height: 10, width: 10, left: 104, top: 104},
name: 'Unkle Ben'
@@ -439,12 +442,12 @@ export class TestHelper {
dir.media.length > 0
? (dir.media as CoverPhotoDTO[]).slice()
: dir.directories
.filter((d): boolean => !!d.cache?.cover)
.map((d): CoverPhotoDTO => {
// Make sure cover has correct directory reference
d.cache.cover.directory = d;
return d.cache.cover;
});
.filter((d): boolean => !!d.cache?.cover)
.map((d): CoverPhotoDTO => {
// Make sure cover has correct directory reference
d.cache.cover.directory = d;
return d.cache.cover;
});
// Sort cover candidates by configured method
const sortBy = Config.AlbumCover.Sorting[0].method;