mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[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:
@@ -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">
|
||||
<form [formGroup]="form" novalidate>
|
||||
<mat-form-field class="app-create-from-template-field">
|
||||
@@ -10,7 +10,7 @@
|
||||
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 }}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@@ -22,7 +22,7 @@
|
||||
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 }}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@@ -35,7 +35,7 @@
|
||||
formControlName="description"
|
||||
></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 }}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
+4
-4
@@ -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<boolean> {
|
||||
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<void> {
|
||||
await this.getDialogLabel('Name *').fill(nameInput);
|
||||
await this.getDialogLabel('Name').fill(nameInput);
|
||||
if (titleInput) {
|
||||
await this.getDialogLabel('Title').fill(titleInput);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user