[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
This commit is contained in:
Akash Rathod 2025-03-19 12:03:24 +01:00 committed by GitHub
parent 9d22bf0efe
commit 3575974609
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 60 deletions

View File

@ -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"
}

View File

@ -51,7 +51,7 @@ test.describe('Create file from template', () => {
let fileLink: string; let fileLink: string;
const selectDialogTitle = 'Select a document template'; const selectDialogTitle = 'Select a document template';
const dialogBreadcrumb = 'Node Templates'; const dialogBreadcrumb = 'Node Templates';
const nameLabel = 'Name *'; const nameLabel = 'Name';
const titleLabel = 'Title'; const titleLabel = 'Title';
const descriptionLabel = 'Description'; const descriptionLabel = 'Description';
const emptyString = ''; const emptyString = '';
@ -267,7 +267,7 @@ test.describe('Create file from template', () => {
}); });
test('[XAT-5240] File name ending with a dot', async () => { 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 createFileFromTemplateDialog.page.keyboard.press(tabKeyString);
await expect(createFileFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(template1InRoot + dotString); await expect(createFileFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(template1InRoot + dotString);
expect expect

View File

@ -52,7 +52,7 @@ test.describe('Create folder from template', () => {
let folderLink: string; let folderLink: string;
const selectDialogTitle = 'Select a folder template'; const selectDialogTitle = 'Select a folder template';
const dialogBreadcrumb = 'Space Templates'; const dialogBreadcrumb = 'Space Templates';
const nameLabel = 'Name *'; const nameLabel = 'Name';
const titleLabel = 'Title'; const titleLabel = 'Title';
const descriptionLabel = 'Description'; const descriptionLabel = 'Description';
const emptyString = ''; const emptyString = '';
@ -294,7 +294,7 @@ test.describe('Create folder from template', () => {
}); });
test('[XAT-5262] Folder name ending with a dot', async () => { 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 createFolderFromTemplateDialog.page.keyboard.press(tabKeyString);
await expect(createFolderFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(templateFolder1 + dotString); await expect(createFolderFromTemplateDialog.getDialogLabel(nameLabel)).toHaveValue(templateFolder1 + dotString);
expect expect

View File

@ -1,4 +1,4 @@
<h2 mat-dialog-title [innerHTML]="title" class="app-create-from-template-title"></h2> <h2 mat-dialog-title [innerHTML]="title" class="app-create-from-template-title" data-automation-id="create-from-template-title"></h2>
<div mat-dialog-content class="app-create-from-template-content"> <div mat-dialog-content class="app-create-from-template-content">
<form [formGroup]="form" novalidate> <form [formGroup]="form" novalidate>
<mat-form-field class="app-create-from-template-field"> <mat-form-field class="app-create-from-template-field">
@ -10,7 +10,7 @@
required required
/> />
<mat-error *ngIf="form.controls['name'].errors?.message"> <mat-error *ngIf="form.controls['name'].errors?.message" data-automation-id="create-from-template-field-error">
{{ form.controls['name'].errors?.message | translate }} {{ form.controls['name'].errors?.message | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
@ -22,7 +22,7 @@
formControlName="title" formControlName="title"
/> />
<mat-error *ngIf="form.controls['title'].hasError('maxlength')"> <mat-error *ngIf="form.controls['title'].hasError('maxlength')" data-automation-id="create-from-template-field-error">
{{ 'NODE_FROM_TEMPLATE.FORM.ERRORS.TITLE_TOO_LONG' | translate }} {{ 'NODE_FROM_TEMPLATE.FORM.ERRORS.TITLE_TOO_LONG' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
@ -35,7 +35,7 @@
formControlName="description" formControlName="description"
></textarea> ></textarea>
<mat-error *ngIf="form.controls['description'].hasError('maxlength')"> <mat-error *ngIf="form.controls['description'].hasError('maxlength')" data-automation-id="create-from-template-field-error">
{{ 'NODE_FROM_TEMPLATE.FORM.ERRORS.DESCRIPTION_TOO_LONG' | translate }} {{ 'NODE_FROM_TEMPLATE.FORM.ERRORS.DESCRIPTION_TOO_LONG' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>

View File

@ -27,7 +27,7 @@ import { BaseComponent } from '../base.component';
import { timeouts } from '../../../utils'; import { timeouts } from '../../../utils';
export class CreateFromTemplateDialogComponent extends BaseComponent { export class CreateFromTemplateDialogComponent extends BaseComponent {
private static rootElement = 'app-create-from-template-dialog'; private static rootElement = 'mat-dialog-container';
constructor(page: Page) { constructor(page: Page) {
super(page, CreateFromTemplateDialogComponent.rootElement); 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"]'); cancelButton = this.getChild('[data-automation-id="create-from-template-dialog-cancel-button"]');
createButton = this.getChild('[data-automation-id="create-from-template-dialog-create-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 }); 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<boolean> { async isErrorMessageDisplayed(errorText: string): Promise<boolean> {
await this.getErrorByText(errorText).waitFor({ state: 'visible', timeout: timeouts.large }); 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 * 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<void> { async createFromTemplateAction(nameInput: string, titleInput?: string, descriptionInput?: string): Promise<void> {
await this.getDialogLabel('Name *').fill(nameInput); await this.getDialogLabel('Name').fill(nameInput);
if (titleInput) { if (titleInput) {
await this.getDialogLabel('Title').fill(titleInput); await this.getDialogLabel('Title').fill(titleInput);
} }