From 3575974609aa4ae3063129d1e1ce79f868cb54bd Mon Sep 17 00:00:00 2001 From: Akash Rathod <41251473+akashrathod28@users.noreply.github.com> Date: Wed, 19 Mar 2025 12:03:24 +0100 Subject: [PATCH] [ACS-6412] remove excluded test for template issue (#4461) * ACS-6412 remove excluded test for template issue * ACS-6412 fix locator * ACS-6412 fix locator * ACS-6412 fix locator * ACS-6412 test case fix * ACS-6412 locator mat selector fix * ACS-6412 locator mat selector fix --- .../create-actions/exclude.tests.json | 49 +------------------ .../tests/create-file-from-template.e2e.ts | 4 +- .../tests/create-folder-from-template.e2e.ts | 4 +- .../create-from-template.dialog.html | 8 +-- .../create-from-template-dialog-component.ts | 8 +-- 5 files changed, 13 insertions(+), 60 deletions(-) diff --git a/e2e/playwright/create-actions/exclude.tests.json b/e2e/playwright/create-actions/exclude.tests.json index e5a7211d1..0967ef424 100644 --- a/e2e/playwright/create-actions/exclude.tests.json +++ b/e2e/playwright/create-actions/exclude.tests.json @@ -1,48 +1 @@ -{ - "XAT-5229": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5231": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5232": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5233": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5238": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5239": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5240": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5244": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5245": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5248": "https://hyland.atlassian.net/browse/ACS-6412", - - "XAT-5252": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5253": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5254": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5255": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5257": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5258": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5256": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5260": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5261": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5262": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5263": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5266": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5267": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5270": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5271": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5259": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5265": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5264": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5268": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5269": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5272": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5273": "https://hyland.atlassian.net/browse/ACS-6412", - - "XAT-5235": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5236": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5234": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5237": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5241": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5243": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5242": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5246": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5247": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5249": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5250": "https://hyland.atlassian.net/browse/ACS-6412", - "XAT-5251": "https://hyland.atlassian.net/browse/ACS-6412" -} \ No newline at end of file +{} diff --git a/e2e/playwright/create-actions/src/tests/create-file-from-template.e2e.ts b/e2e/playwright/create-actions/src/tests/create-file-from-template.e2e.ts index 94e7b7955..6359c52c2 100644 --- a/e2e/playwright/create-actions/src/tests/create-file-from-template.e2e.ts +++ b/e2e/playwright/create-actions/src/tests/create-file-from-template.e2e.ts @@ -51,7 +51,7 @@ test.describe('Create file from template', () => { let fileLink: string; const selectDialogTitle = 'Select a document template'; const dialogBreadcrumb = 'Node Templates'; - const nameLabel = 'Name *'; + const nameLabel = 'Name'; const titleLabel = 'Title'; const descriptionLabel = 'Description'; const emptyString = ''; @@ -267,7 +267,7 @@ test.describe('Create file from template', () => { }); test('[XAT-5240] File name ending with a dot', async () => { - await createFileFromTemplateDialog.getDialogLabel(nameLabel).fill(dotString); + await createFileFromTemplateDialog.getDialogLabel(nameLabel).fill(template1InRoot + dotString); await createFileFromTemplateDialog.page.keyboard.press(tabKeyString); await expect(createFileFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(template1InRoot + dotString); expect diff --git a/e2e/playwright/create-actions/src/tests/create-folder-from-template.e2e.ts b/e2e/playwright/create-actions/src/tests/create-folder-from-template.e2e.ts index 2b7c119e5..cbe8d2d0d 100644 --- a/e2e/playwright/create-actions/src/tests/create-folder-from-template.e2e.ts +++ b/e2e/playwright/create-actions/src/tests/create-folder-from-template.e2e.ts @@ -52,7 +52,7 @@ test.describe('Create folder from template', () => { let folderLink: string; const selectDialogTitle = 'Select a folder template'; const dialogBreadcrumb = 'Space Templates'; - const nameLabel = 'Name *'; + const nameLabel = 'Name'; const titleLabel = 'Title'; const descriptionLabel = 'Description'; const emptyString = ''; @@ -294,7 +294,7 @@ test.describe('Create folder from template', () => { }); test('[XAT-5262] Folder name ending with a dot', async () => { - await createFolderFromTemplateDialog.getDialogLabel(nameLabel).fill(dotString); + await createFolderFromTemplateDialog.getDialogLabel(nameLabel).fill(templateFolder1 + dotString); await createFolderFromTemplateDialog.page.keyboard.press(tabKeyString); await expect(createFolderFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(templateFolder1 + dotString); expect diff --git a/projects/aca-content/src/lib/dialogs/node-template/create-from-template.dialog.html b/projects/aca-content/src/lib/dialogs/node-template/create-from-template.dialog.html index d19910606..270f3e710 100644 --- a/projects/aca-content/src/lib/dialogs/node-template/create-from-template.dialog.html +++ b/projects/aca-content/src/lib/dialogs/node-template/create-from-template.dialog.html @@ -1,4 +1,4 @@ -

+

@@ -10,7 +10,7 @@ required /> - + {{ form.controls['name'].errors?.message | translate }} @@ -22,7 +22,7 @@ formControlName="title" /> - + {{ 'NODE_FROM_TEMPLATE.FORM.ERRORS.TITLE_TOO_LONG' | translate }} @@ -35,7 +35,7 @@ formControlName="description" > - + {{ 'NODE_FROM_TEMPLATE.FORM.ERRORS.DESCRIPTION_TOO_LONG' | translate }} diff --git a/projects/aca-playwright-shared/src/page-objects/components/dialogs/create-from-template-dialog-component.ts b/projects/aca-playwright-shared/src/page-objects/components/dialogs/create-from-template-dialog-component.ts index 7ecfc4bda..3c3babdd6 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/dialogs/create-from-template-dialog-component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/dialogs/create-from-template-dialog-component.ts @@ -27,7 +27,7 @@ import { BaseComponent } from '../base.component'; import { timeouts } from '../../../utils'; export class CreateFromTemplateDialogComponent extends BaseComponent { - private static rootElement = 'app-create-from-template-dialog'; + private static rootElement = 'mat-dialog-container'; constructor(page: Page) { super(page, CreateFromTemplateDialogComponent.rootElement); @@ -35,9 +35,9 @@ export class CreateFromTemplateDialogComponent extends BaseComponent { cancelButton = this.getChild('[data-automation-id="create-from-template-dialog-cancel-button"]'); createButton = this.getChild('[data-automation-id="create-from-template-dialog-create-button"]'); - getDialogTitle = (text: string) => this.getChild('.mat-dialog-title', { hasText: text }); + getDialogTitle = (text: string) => this.getChild('[data-automation-id="create-from-template-title"]', { hasText: text }); getDialogLabel = (text: string) => this.getChild('label', { hasText: text }); - getErrorByText = (text: string): Locator => this.page.locator('mat-error', { hasText: text }); + getErrorByText = (text: string): Locator => this.page.locator('[data-automation-id="create-from-template-field-error"]', { hasText: text }); async isErrorMessageDisplayed(errorText: string): Promise { await this.getErrorByText(errorText).waitFor({ state: 'visible', timeout: timeouts.large }); @@ -48,7 +48,7 @@ export class CreateFromTemplateDialogComponent extends BaseComponent { * This method is used when we want to fill in Create new folder/document/file from template dialog and choose Create button */ async createFromTemplateAction(nameInput: string, titleInput?: string, descriptionInput?: string): Promise { - await this.getDialogLabel('Name *').fill(nameInput); + await this.getDialogLabel('Name').fill(nameInput); if (titleInput) { await this.getDialogLabel('Title').fill(titleInput); }