1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

Fixig backendtext tests #683

This commit is contained in:
Patrik J. Braun 2023-07-30 13:04:23 +02:00
parent 015a0221c2
commit e113062208
3 changed files with 13 additions and 11 deletions

View File

@ -4,11 +4,11 @@ export const backendTexts = {
sizeToGenerate: {name: 20, description: 22}, sizeToGenerate: {name: 20, description: 22},
indexChangesOnly: {name: 30, description: 32}, indexChangesOnly: {name: 30, description: 32},
searchQuery: {name: 40, description: 42}, searchQuery: {name: 40, description: 42},
sortBy: {name: 100, description: 102}, sortBy: {name: 50, description: 52},
pickAmount: {name: 50, description: 52}, pickAmount: {name: 60, description: 62},
emailTo: {name: 60, description: 62}, emailTo: {name: 70, description: 72},
emailFrom: {name: 70, description: 72}, emailFrom: {name: 80, description: 82},
emailSubject: {name: 80, description: 82}, emailSubject: {name: 90, description: 92},
emailText: {name: 90, description: 92} emailText: {name: 100, description: 102}
}; };

View File

@ -9,7 +9,7 @@ describe('BackendTextService', () => {
}); });
}); });
it('should call UserDTO service login', inject( it('should have valid text for all keys', inject(
[BackendtextService], [BackendtextService],
(backendTextService: BackendtextService) => { (backendTextService: BackendtextService) => {
const getTexts = (obj: any) => { const getTexts = (obj: any) => {
@ -18,7 +18,7 @@ describe('BackendTextService', () => {
getTexts(obj[key]); getTexts(obj[key]);
continue; continue;
} }
expect(backendTextService.get(obj[key])).not.toBe(null); expect(backendTextService.get(obj[key])).not.toEqual(null, 'Error for key: ' + obj[key] +', ' + key);
} }
}; };
getTexts(backendTexts); getTexts(backendTexts);

View File

@ -17,6 +17,8 @@ export class BackendtextService {
return $localize`Only checks indexed files.`; return $localize`Only checks indexed files.`;
case backendTexts.indexChangesOnly.name: case backendTexts.indexChangesOnly.name:
return $localize`Index changes only`; return $localize`Index changes only`;
case backendTexts.indexChangesOnly.description:
return $localize`Only indexes a folder if it got changed.`;
case backendTexts.searchQuery.name: case backendTexts.searchQuery.name:
return $localize`Search query`; return $localize`Search query`;
case backendTexts.searchQuery.description: case backendTexts.searchQuery.description: