Skip to content

Commit

Permalink
Starting fixing e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoAlbano committed Nov 28, 2023
1 parent d1b409e commit 4ff1660
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion e2e/core/pages/metadata-view.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,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);
}
Expand Down
8 changes: 4 additions & 4 deletions e2e/process-services/pages/process-service-tab-bar.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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();
}

Expand All @@ -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> {
Expand All @@ -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> {
Expand Down
4 changes: 2 additions & 2 deletions lib/testing/src/lib/protractor/core/pages/pagination.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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);
Expand Down

0 comments on commit 4ff1660

Please sign in to comment.