[ACS-7534] folder dialog e2e fixes (#3804)

This commit is contained in:
Mykyta Maliarchuk
2024-04-19 14:08:02 +02:00
committed by GitHub
parent f11ce49ba3
commit 9ee88c63f3
4 changed files with 9 additions and 5 deletions

View File

@@ -39,7 +39,8 @@ export class AdfFolderDialogComponent extends BaseComponent {
super(page, AdfFolderDialogComponent.rootElement);
}
public getElementByPlaceholder = (element:string, text: string) => this.getChild(`${element}[placeholder='${text}']`);
public getLabelText = (text: string) => this.getChild('label', { hasText: text });
public getRequiredMarker = (text: string) => this.getLabelText(text).locator('.mat-mdc-form-field-required-marker');
/**
* This method is used when we want to fill in Create new Folder Dialog and choose Create button

View File

@@ -37,6 +37,7 @@ export class AdfLibraryDialogComponent extends BaseComponent {
}
public getLabelText = (text: string) => this.getChild('label', { hasText: text });
public getRequiredMarker = (text: string) => this.getLabelText(text).locator('.mat-mdc-form-field-required-marker');
public getDialogTitle = (text: string) => this.getChild('.mat-mdc-dialog-title', { hasText: text });
public getErrorByText = (text: string): Locator => this.page.locator('mat-error', {hasText: text});