diff --git a/src/lib/kit/utils/__tests__/common.test.ts b/src/lib/kit/utils/__tests__/common.test.ts index 2cdfb964..9becc918 100644 --- a/src/lib/kit/utils/__tests__/common.test.ts +++ b/src/lib/kit/utils/__tests__/common.test.ts @@ -90,6 +90,10 @@ describe('kit/utils/common', () => { viewSpec: {layout: 'row'}, }); + expect(prepareSpec({viewSpec: {addButtonPosition: 'DOWN'}} as any)).toMatchObject({ + viewSpec: {addButtonPosition: 'down'}, + }); + expect(prepareSpec({viewSpec: {themeLabel: 'WARNING'}} as any)).toMatchObject({ viewSpec: {themeLabel: 'warning'}, }); diff --git a/src/lib/kit/utils/common.ts b/src/lib/kit/utils/common.ts index 67f55d0b..68ef1ca0 100644 --- a/src/lib/kit/utils/common.ts +++ b/src/lib/kit/utils/common.ts @@ -95,6 +95,10 @@ export const prepareSpec = ( result.viewSpec.layout = result.viewSpec.layout.toLowerCase(); } + if (_.isString(result.viewSpec?.addButtonPosition)) { + result.viewSpec.addButtonPosition = result.viewSpec.addButtonPosition.toLowerCase(); + } + if (_.isString(result.viewSpec?.themeLabel)) { result.viewSpec.themeLabel = result.viewSpec.themeLabel.toLowerCase(); }