mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
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:
@@ -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
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user