mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Starting fixing e2e
This commit is contained in:
@@ -19,7 +19,7 @@ import { Page } from '@playwright/test';
|
||||
import { BaseComponent } from '../base.component';
|
||||
|
||||
export class TooltipComponent extends BaseComponent {
|
||||
private static rootElement = 'mat-tooltip-component';
|
||||
private static rootElement = '.mdc-tooltip';
|
||||
public content = this.getChild('div');
|
||||
|
||||
constructor(page: Page) {
|
||||
|
@@ -116,7 +116,7 @@ export class MetadataViewPage {
|
||||
|
||||
async clickOnPropertiesTab(): Promise<void> {
|
||||
const propertiesTab = element(
|
||||
by.cssContainingText(`.adf-info-drawer-layout-content div.mat-tab-labels div .mat-tab-label-content`, `Properties`)
|
||||
by.cssContainingText(`.adf-info-drawer-layout-content div.mat-mdc-tab-label-container .mdc-tab__text-label`, `Properties`)
|
||||
);
|
||||
await BrowserActions.click(propertiesTab);
|
||||
}
|
||||
|
@@ -20,10 +20,10 @@ import { element, by, browser } from 'protractor';
|
||||
|
||||
export class ProcessServiceTabBarPage {
|
||||
|
||||
tasksButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Tasks')).first();
|
||||
processButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Process')).first();
|
||||
reportsButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Reports')).first();
|
||||
reportsButtonSelected = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div[aria-selected="true"]', 'Reports')).first();
|
||||
tasksButton = element.all(by.cssContainingText('div.mat-mdc-tab-label-container .mdc-tab__text-label', 'Tasks')).first();
|
||||
processButton = element.all(by.cssContainingText('div.mat-mdc-tab-label-container .mdc-tab__text-label', 'Process')).first();
|
||||
reportsButton = element.all(by.cssContainingText('div.mat-mdc-tab-label-container .mdc-tab__text-label', 'Reports')).first();
|
||||
reportsButtonSelected = element.all(by.cssContainingText('div.mat-mdc-tab-label-container .mdc-tab-indicator--active .mdc-tab__text-label', 'Reports')).first();
|
||||
|
||||
async clickTasksButton(): Promise<void> {
|
||||
await BrowserActions.click(this.tasksButton);
|
||||
|
@@ -35,7 +35,7 @@ export class DropdownPage {
|
||||
|
||||
async selectOption(option: string): Promise<void> {
|
||||
Logger.log(`Select dropdown option ${option}`);
|
||||
const optionElement = element.all(by.cssContainingText('mat-option span.mat-option-text', option)).first();
|
||||
const optionElement = element.all(by.cssContainingText('.mat-mdc-option .mdc-list-item__primary-text', option)).first();
|
||||
await BrowserActions.click(optionElement);
|
||||
await browser.waitForAngular();
|
||||
}
|
||||
@@ -49,7 +49,7 @@ export class DropdownPage {
|
||||
}
|
||||
|
||||
async getNumberOfOptions(): Promise<number> {
|
||||
const dropdownOptions = $$('.mat-select-panel mat-option');
|
||||
const dropdownOptions = $$('.mat-mdc-select-panel .mat-mdc-option');
|
||||
return dropdownOptions.count();
|
||||
}
|
||||
|
||||
@@ -71,12 +71,12 @@ export class DropdownPage {
|
||||
}
|
||||
|
||||
async selectOptionFromIndex(index: number): Promise<void> {
|
||||
const value = element.all(by.className('mat-option')).get(index);
|
||||
const value = element.all(by.className('mat-mdc-option')).get(index);
|
||||
await BrowserActions.click(value);
|
||||
}
|
||||
|
||||
async checkOptionsPanelIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible($$(`.mat-select-panel`).first());
|
||||
await BrowserVisibility.waitUntilElementIsVisible($$(`.mat-mdc-select-panel`).first());
|
||||
}
|
||||
|
||||
async getSelectedOptionText(): Promise<string> {
|
||||
@@ -85,11 +85,11 @@ export class DropdownPage {
|
||||
}
|
||||
|
||||
async checkOptionIsDisplayed(option: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element.all(by.cssContainingText('mat-option span.mat-option-text', option)).first());
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element.all(by.cssContainingText('.mat-mdc-option .mdc-list-item__primary-text', option)).first());
|
||||
}
|
||||
|
||||
async checkOptionIsNotDisplayed(option: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element.all(by.cssContainingText('mat-option span.mat-option-text', option)).first());
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element.all(by.cssContainingText('.mat-mdc-option .mdc-list-item__primary-text', option)).first());
|
||||
}
|
||||
|
||||
async selectDropdownOption(option: string): Promise<void> {
|
||||
|
@@ -26,7 +26,7 @@ export class PaginationPage {
|
||||
pageSelectorArrow = $('button[data-automation-id="page-selector"]');
|
||||
itemsPerPage = $('.adf-pagination__max-items');
|
||||
itemsPerPageOpenDropdown = $('.adf-pagination__perpage-block button');
|
||||
itemsPerPageOptions = $$('.adf-pagination__page-selector .mat-menu-item');
|
||||
itemsPerPageOptions = $$('.adf-pagination__page-selector .mat-mdc-menu-item');
|
||||
currentPage = $('.adf-pagination__current-page');
|
||||
totalPages = $('.adf-pagination__total-pages');
|
||||
paginationRange = $('.adf-pagination__range');
|
||||
@@ -42,7 +42,7 @@ export class PaginationPage {
|
||||
async selectItemsPerPage(numberOfItem: string): Promise<void> {
|
||||
await BrowserActions.clickExecuteScript(`div[class*="adf-pagination__perpage-block"] button`);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.pageSelectorDropDown);
|
||||
const itemsPerPage = element.all(by.cssContainingText('.mat-menu-item', numberOfItem)).first();
|
||||
const itemsPerPage = element.all(by.cssContainingText('.mat-mdc-menu-item', numberOfItem)).first();
|
||||
await BrowserVisibility.waitUntilElementIsPresent(itemsPerPage);
|
||||
await BrowserActions.click(itemsPerPage);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.pageSelectorDropDown);
|
||||
|
Reference in New Issue
Block a user