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:
parent
015a0221c2
commit
e113062208
@ -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}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { inject, TestBed } from '@angular/core/testing';
|
import {inject, TestBed} from '@angular/core/testing';
|
||||||
import { BackendtextService } from './backendtext.service';
|
import {BackendtextService} from './backendtext.service';
|
||||||
import { backendTexts } from '../../../common/BackendTexts';
|
import {backendTexts} from '../../../common/BackendTexts';
|
||||||
|
|
||||||
describe('BackendTextService', () => {
|
describe('BackendTextService', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@ -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);
|
||||||
|
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user