mirror of
https://github.com/immich-app/immich.git
synced 2026-02-14 04:47:57 +03:00
refactor: search e2e (#7732)
This commit is contained in:
1
server/test/fixtures/index.ts
vendored
1
server/test/fixtures/index.ts
vendored
@@ -10,7 +10,6 @@ export * from './library.stub';
|
||||
export * from './media.stub';
|
||||
export * from './partner.stub';
|
||||
export * from './person.stub';
|
||||
export * from './search.stub';
|
||||
export * from './shared-link.stub';
|
||||
export * from './system-config.stub';
|
||||
export * from './tag.stub';
|
||||
|
||||
36
server/test/fixtures/search.stub.ts
vendored
36
server/test/fixtures/search.stub.ts
vendored
@@ -1,36 +0,0 @@
|
||||
import { SearchResult } from '@app/domain';
|
||||
import { AssetEntity, ExifEntity, SmartInfoEntity } from '@app/infra/entities';
|
||||
import { assetStub } from '.';
|
||||
|
||||
export const searchStub = {
|
||||
emptyResults: Object.freeze<SearchResult<any>>({
|
||||
total: 0,
|
||||
count: 0,
|
||||
page: 1,
|
||||
items: [],
|
||||
facets: [],
|
||||
distances: [],
|
||||
}),
|
||||
|
||||
withImage: Object.freeze<SearchResult<AssetEntity>>({
|
||||
total: 1,
|
||||
count: 1,
|
||||
page: 1,
|
||||
items: [assetStub.image],
|
||||
facets: [],
|
||||
distances: [],
|
||||
}),
|
||||
|
||||
exif: Object.freeze<Partial<ExifEntity>>({
|
||||
latitude: 90,
|
||||
longitude: 90,
|
||||
city: 'Immich',
|
||||
state: 'Nebraska',
|
||||
country: 'United States',
|
||||
make: 'Canon',
|
||||
model: 'EOS Rebel T7',
|
||||
lensModel: 'Fancy lens',
|
||||
}),
|
||||
|
||||
smartInfo: Object.freeze<Partial<SmartInfoEntity>>({ objects: ['car', 'tree'], tags: ['accident'] }),
|
||||
};
|
||||
Reference in New Issue
Block a user