Skip to content

Commit

Permalink
update customization service spec to test new config
Browse files Browse the repository at this point in the history
  • Loading branch information
nevio18324 committed Nov 19, 2024
1 parent 721a361 commit 019c6b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/src/app/services/customization.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ describe('CustomizationService', () => {
logo: 'logo',
triangles: 'triangles',
backgroundLogo: 'backgroundLogo',
supportSiteUrl: 'https://wiki.puzzle.ch/Puzzle/OKRs',
customStyles: { cssVar1: 'foo' },
};

Expand Down Expand Up @@ -86,6 +87,7 @@ describe('CustomizationService', () => {
expect(currentConfig?.favicon).toBe(body.favicon);
expect(currentConfig?.triangles).toBe(body.triangles);
expect(currentConfig?.backgroundLogo).toBe(body.backgroundLogo);
expect(currentConfig?.supportSiteUrl).toBe(body.supportSiteUrl);
expect(currentConfig?.customStyles['cssVar1']).toBe(body.customStyles['cssVar1']);

expect(callRecorder.getCallCount('title.innerHTML')).toBe(1);
Expand All @@ -110,6 +112,7 @@ describe('CustomizationService', () => {
logo: 'logo-second',
triangles: 'triangles-second',
backgroundLogo: 'backgroundLogo-second',
supportSiteUrl: 'https://wiki.puzzle.ch/Puzzle/OKRs',
customStyles: { cssVarNew: 'bar' },
};
configSubject.next(bodySecond);
Expand All @@ -120,6 +123,7 @@ describe('CustomizationService', () => {
expect(currentConfig?.favicon).toBe(bodySecond.favicon);
expect(currentConfig?.triangles).toBe(bodySecond.triangles);
expect(currentConfig?.backgroundLogo).toBe(bodySecond.backgroundLogo);
expect(currentConfig?.supportSiteUrl).toBe(bodySecond.supportSiteUrl);
expect(currentConfig?.customStyles['cssVarNew']).toBe(bodySecond.customStyles['cssVarNew']);
expect(currentConfig?.customStyles['cssVar1']).toBe(undefined);

Expand Down

0 comments on commit 019c6b8

Please sign in to comment.