From 669036ea6a9ecf39c56cd8ba8fae03c79adf882c Mon Sep 17 00:00:00 2001 From: tkleinke Date: Wed, 10 May 2023 23:46:28 +0200 Subject: [PATCH] Extend unit test [notarize] --- .../apply-language-configurations.spec.ts | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/core/test/configuration/boot/apply-language-configurations.spec.ts b/core/test/configuration/boot/apply-language-configurations.spec.ts index 99816fdfba..a2264db6c6 100644 --- a/core/test/configuration/boot/apply-language-configurations.spec.ts +++ b/core/test/configuration/boot/apply-language-configurations.spec.ts @@ -419,13 +419,18 @@ describe('applyLanguageConfigurations', () => { it('overwrite form labels in custom language configuration', () => { const forms: Map = { - 'A:form': { name: 'A:form', categoryName: 'A', fields: {} } as any + 'A:form': { name: 'A:form', categoryName: 'A', fields: { a: {} } } as any }; const coreConfiguration = { categories: { A: { - label: 'A Category Core' + label: 'A Category Core', + fields: { + a: { + label: 'A Field Category Core' + } + } } } }; @@ -433,12 +438,22 @@ describe('applyLanguageConfigurations', () => { const libraryConfiguration = { categories: { A: { - label: 'A Category Library' + label: 'A Category Library', + fields: { + a: { + label: 'A Field Category Library' + } + } } }, forms: { 'A:form': { - label: 'A Form Library' + label: 'A Form Library', + fields: { + a: { + label: 'A Field Form Library' + } + } } } }; @@ -446,7 +461,12 @@ describe('applyLanguageConfigurations', () => { const customConfiguration = { categories: { A: { - label: 'A Custom' + label: 'A Custom', + fields: { + a: { + label: 'A Field Custom' + } + } } } }; @@ -467,5 +487,7 @@ describe('applyLanguageConfigurations', () => { expect(forms['A:form'].label.de).toEqual('A Custom'); expect(forms['A:form'].defaultLabel.de).toEqual('A Form Library'); + expect(forms['A:form'].fields['a'].label.de).toEqual('A Field Custom'); + expect(forms['A:form'].fields['a'].defaultLabel.de).toEqual('A Field Form Library'); }); });