mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-08-07 17:48:27 +00:00
[ACS-5650] viewer action files e2e migration (#3367)
* viewer action files e2e migration * viewer action files e2e remove comment * review code fix * [ci:force]
This commit is contained in:
@@ -165,6 +165,11 @@ export class DataTableComponent extends BaseComponent {
|
||||
await this.spinnerWaitForReload();
|
||||
}
|
||||
|
||||
async isItemPresent(name: string): Promise<boolean> {
|
||||
await this.goThroughPagesLookingForRowWithName(name);
|
||||
return this.getRowByName(name).isVisible();
|
||||
}
|
||||
|
||||
async getActionLocatorFromExpandableMenu(name: string | number, action: string): Promise<Locator> {
|
||||
await this.getRowByName(name).click({ button: 'right' });
|
||||
return this.contextMenuActions.getButtonByText(action);
|
||||
@@ -199,7 +204,7 @@ export class DataTableComponent extends BaseComponent {
|
||||
async selectItem(name: string): Promise<void> {
|
||||
const isSelected = await this.hasCheckMarkIcon(name);
|
||||
if (!isSelected) {
|
||||
const row = await this.getRowByName(name);
|
||||
const row = this.getRowByName(name);
|
||||
await row.locator('.mat-checkbox[id*="mat-checkbox"]').check();
|
||||
}
|
||||
}
|
||||
|
@@ -37,4 +37,17 @@ export class MatMenuComponent extends BaseComponent {
|
||||
public createFolder = this.getChild('[id="app.create.folder"]');
|
||||
public createLibrary = this.getChild('[id="app.create.library"]');
|
||||
public getButtonByText = (text: string) => this.getChild('button', { hasText: text });
|
||||
|
||||
async clickMenuItem(menuItem: string): Promise<void> {
|
||||
const menuElement = this.getButtonByText(menuItem);
|
||||
await menuElement.waitFor({ state: 'attached' });
|
||||
await menuElement.click();
|
||||
await menuElement.waitFor({ state: 'detached' });
|
||||
}
|
||||
|
||||
async isMenuItemVisible(menuItem: string): Promise<boolean> {
|
||||
const menuElement = this.getButtonByText(menuItem);
|
||||
await menuElement.waitFor({ state: 'attached' });
|
||||
return await menuElement.isVisible();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user