[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);
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');
});
@@ -262,7 +262,7 @@ describe('Create file from template', () => {
for (const name of namesWithSpecialChars) {
await createFromTemplateDialog.enterName(name);
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.');
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 () => {
await createFromTemplateDialog.enterName(' ');
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 () => {