chore: update ESLint and cspell configurations to ignore story files (#11681)

* chore: update ESLint and cspell configurations to ignore story files

* fix: update custom widget identifiers in form renderer tests and mock data
This commit is contained in:
Denys Vuika
2026-02-23 13:58:51 +00:00
committed by GitHub
parent 303a9efb3e
commit 2f8d8c2007
4 changed files with 19 additions and 12 deletions
+6
View File
@@ -236,6 +236,12 @@ module.exports = {
rules: { rules: {
'comma-dangle': ['error', 'never'] 'comma-dangle': ['error', 'never']
} }
},
{
files: ['**/*.stories.ts'],
rules: {
'@cspell/spellchecker': 'off'
}
} }
], ],
+2 -1
View File
@@ -157,7 +157,8 @@
], ],
"ignorePaths": [ "ignorePaths": [
"lib/{content-services,core,extensions,insights,process-services}/**/*.spec.ts", "lib/{content-services,core,extensions,insights,process-services}/**/*.spec.ts",
"lib/{content-services,core,extensions,insights,process-services}/**/*.mock.ts" "lib/{content-services,core,extensions,insights,process-services}/**/*.mock.ts",
"**/*.stories.ts"
], ],
"ignoreRegExpList": [ "ignoreRegExpList": [
"(\"|'|`)((?:\\\\1|(?:(?!\\1).))*)\\1" "(\"|'|`)((?:\\\\1|(?:(?!\\1).))*)\\1"
@@ -613,24 +613,24 @@ describe('Form Renderer Component', () => {
describe('Custom Widget', () => { describe('Custom Widget', () => {
it('Should be able to correctly display a custom process cloud widget', async () => { it('Should be able to correctly display a custom process cloud widget', async () => {
formRenderingService.register({ bananaforevah: () => TextWidgetComponent }, true); formRenderingService.register({ banana: () => TextWidgetComponent }, true);
formRendererComponent.formDefinition = formService.parseForm(customWidgetForm.formRepresentation.formDefinition); formRendererComponent.formDefinition = formService.parseForm(customWidgetForm.formRepresentation.formDefinition);
fixture.detectChanges(); fixture.detectChanges();
await fixture.whenStable(); await fixture.whenStable();
expectElementToBeVisible(testingUtils, 'Text0vdi18'); expectElementToBeVisible(testingUtils, 'Text0vdi18');
expectElementToBeVisible(testingUtils, 'bananaforevah0k8gui'); expectElementToBeVisible(testingUtils, 'banana0k8gui');
}); });
it('Should be able to correctly use visibility in a custom process cloud widget ', async () => { it('Should be able to correctly use visibility in a custom process cloud widget ', async () => {
formRenderingService.register({ bananaforevah: () => TextWidgetComponent }, true); formRenderingService.register({ banana: () => TextWidgetComponent }, true);
formRendererComponent.formDefinition = formService.parseForm(customWidgetFormWithVisibility.formRepresentation.formDefinition); formRendererComponent.formDefinition = formService.parseForm(customWidgetFormWithVisibility.formRepresentation.formDefinition);
fixture.detectChanges(); fixture.detectChanges();
await fixture.whenStable(); await fixture.whenStable();
expectElementToBeHidden(testingUtils, 'bananaforevah0k8gui'); expectElementToBeHidden(testingUtils, 'banana0k8gui');
typeIntoInput(testingUtils, '#Text0vdi18', 'no'); typeIntoInput(testingUtils, '#Text0vdi18', 'no');
fixture.detectChanges(); fixture.detectChanges();
await fixture.whenStable(); await fixture.whenStable();
expectElementToBeVisible(testingUtils, 'bananaforevah0k8gui'); expectElementToBeVisible(testingUtils, 'banana0k8gui');
}); });
}); });
@@ -1414,9 +1414,9 @@ export const customWidgetForm = {
], ],
'2': [ '2': [
{ {
id: 'bananaforevah0k8gui', id: 'banana0k8gui',
name: 'bananaforevah', name: 'banana',
type: 'bananaforevah', type: 'banana',
required: true, required: true,
readOnly: false, readOnly: false,
isCustomType: true, isCustomType: true,
@@ -1478,9 +1478,9 @@ export const customWidgetFormWithVisibility = {
], ],
'2': [ '2': [
{ {
id: 'bananaforevah0k8gui', id: 'banana0k8gui',
name: 'bananaforevah', name: 'banana',
type: 'bananaforevah', type: 'banana',
required: true, required: true,
readOnly: false, readOnly: false,
isCustomType: true, isCustomType: true,