mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat(web): add search filter for camera lens model. (#21792)
This commit is contained in:
@@ -179,6 +179,26 @@ describe(SearchService.name, () => {
|
||||
).resolves.toEqual(['Fujifilm X100VI', null]);
|
||||
expect(mocks.search.getCameraModels).toHaveBeenCalledWith([authStub.user1.user.id], expect.anything());
|
||||
});
|
||||
|
||||
it('should return search suggestions for camera lens model', async () => {
|
||||
mocks.search.getCameraLensModels.mockResolvedValue(['10-24mm']);
|
||||
mocks.partner.getAll.mockResolvedValue([]);
|
||||
|
||||
await expect(
|
||||
sut.getSearchSuggestions(authStub.user1, { includeNull: false, type: SearchSuggestionType.CAMERA_LENS_MODEL }),
|
||||
).resolves.toEqual(['10-24mm']);
|
||||
expect(mocks.search.getCameraLensModels).toHaveBeenCalledWith([authStub.user1.user.id], expect.anything());
|
||||
});
|
||||
|
||||
it('should return search suggestions for camera lens model (including null)', async () => {
|
||||
mocks.search.getCameraLensModels.mockResolvedValue(['10-24mm']);
|
||||
mocks.partner.getAll.mockResolvedValue([]);
|
||||
|
||||
await expect(
|
||||
sut.getSearchSuggestions(authStub.user1, { includeNull: true, type: SearchSuggestionType.CAMERA_LENS_MODEL }),
|
||||
).resolves.toEqual(['10-24mm', null]);
|
||||
expect(mocks.search.getCameraLensModels).toHaveBeenCalledWith([authStub.user1.user.id], expect.anything());
|
||||
});
|
||||
});
|
||||
|
||||
describe('searchSmart', () => {
|
||||
|
||||
Reference in New Issue
Block a user