[ACA-2882] Create from template - generic form errors (#1317)

* remove type from error message

* change validation message

* change required message
This commit is contained in:
Cilibiu Bogdan
2020-01-23 09:58:30 +02:00
committed by Adina Parpalita
parent 7c30ad139f
commit 5e203cab96
2 changed files with 8 additions and 8 deletions

View File

@@ -252,7 +252,7 @@ describe('Create file from template', () => {
expect(await createFromTemplateDialog.getName()).toEqual(template1InRootFolder); expect(await createFromTemplateDialog.getName()).toEqual(template1InRootFolder);
await createFromTemplateDialog.deleteNameWithBackspace(); await createFromTemplateDialog.deleteNameWithBackspace();
expect(await createFromTemplateDialog.getValidationMessage()).toEqual('File name is required'); expect(await createFromTemplateDialog.getValidationMessage()).toEqual('Name is required');
expect(await createFromTemplateDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled'); expect(await createFromTemplateDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled');
}); });
@@ -262,7 +262,7 @@ describe('Create file from template', () => {
for (const name of namesWithSpecialChars) { for (const name of namesWithSpecialChars) {
await createFromTemplateDialog.enterName(name); await createFromTemplateDialog.enterName(name);
expect(await createFromTemplateDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled'); expect(await createFromTemplateDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled');
expect(await createFromTemplateDialog.getValidationMessage()).toContain(`File name can't contain these characters`); expect(await createFromTemplateDialog.getValidationMessage()).toContain(`Name can't contain these characters`);
} }
}); });
@@ -270,14 +270,14 @@ describe('Create file from template', () => {
await createFromTemplateDialog.enterName('file-name.'); await createFromTemplateDialog.enterName('file-name.');
expect(await createFromTemplateDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled'); expect(await createFromTemplateDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled');
expect(await createFromTemplateDialog.getValidationMessage()).toMatch(`File name can't end with a period .`); expect(await createFromTemplateDialog.getValidationMessage()).toMatch(`Name can't end with a period .`);
}); });
it('File name containing only spaces - [C325034]', async () => { it('File name containing only spaces - [C325034]', async () => {
await createFromTemplateDialog.enterName(' '); await createFromTemplateDialog.enterName(' ');
expect(await createFromTemplateDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled'); expect(await createFromTemplateDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled');
expect(await createFromTemplateDialog.getValidationMessage()).toMatch(`File name can't contain only spaces`); expect(await createFromTemplateDialog.getValidationMessage()).toMatch(`Name can't contain only spaces`);
}); });
it('Title too long - [C290146]', async () => { it('Title too long - [C290146]', async () => {

View File

@@ -377,10 +377,10 @@
"ERRORS": { "ERRORS": {
"DESCRIPTION_TOO_LONG": "Use 512 characters or less for description", "DESCRIPTION_TOO_LONG": "Use 512 characters or less for description",
"TITLE_TOO_LONG": "Use 256 characters or less for title", "TITLE_TOO_LONG": "Use 256 characters or less for title",
"REQUIRED": "File name is required", "REQUIRED": "Name is required",
"SPECIAL_CHARACTERS": "File name can't contain these characters * \" < > \\ / ? : |", "SPECIAL_CHARACTERS": "Name can't contain these characters * \" < > \\ / ? : |",
"ENDING_DOT": "File name can't end with a period .", "ENDING_DOT": "Name can't end with a period .",
"ONLY_SPACES": "File name can't contain only spaces" "ONLY_SPACES": "Name can't contain only spaces"
} }
} }
}, },