Starting fixing e2e

This commit is contained in:
Vito Albano
2023-11-28 01:01:39 +00:00
parent 88d161496c
commit 4b0a07bf35
5 changed files with 14 additions and 14 deletions

View File

@@ -19,7 +19,7 @@ import { Page } from '@playwright/test';
import { BaseComponent } from '../base.component'; import { BaseComponent } from '../base.component';
export class TooltipComponent extends BaseComponent { export class TooltipComponent extends BaseComponent {
private static rootElement = 'mat-tooltip-component'; private static rootElement = '.mdc-tooltip';
public content = this.getChild('div'); public content = this.getChild('div');
constructor(page: Page) { constructor(page: Page) {

View File

@@ -116,7 +116,7 @@ export class MetadataViewPage {
async clickOnPropertiesTab(): Promise<void> { async clickOnPropertiesTab(): Promise<void> {
const propertiesTab = element( 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); await BrowserActions.click(propertiesTab);
} }

View File

@@ -20,10 +20,10 @@ import { element, by, browser } from 'protractor';
export class ProcessServiceTabBarPage { export class ProcessServiceTabBarPage {
tasksButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Tasks')).first(); tasksButton = element.all(by.cssContainingText('div.mat-mdc-tab-label-container .mdc-tab__text-label', 'Tasks')).first();
processButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Process')).first(); processButton = element.all(by.cssContainingText('div.mat-mdc-tab-label-container .mdc-tab__text-label', 'Process')).first();
reportsButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Reports')).first(); reportsButton = element.all(by.cssContainingText('div.mat-mdc-tab-label-container .mdc-tab__text-label', 'Reports')).first();
reportsButtonSelected = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div[aria-selected="true"]', '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> { async clickTasksButton(): Promise<void> {
await BrowserActions.click(this.tasksButton); await BrowserActions.click(this.tasksButton);

View File

@@ -35,7 +35,7 @@ export class DropdownPage {
async selectOption(option: string): Promise<void> { async selectOption(option: string): Promise<void> {
Logger.log(`Select dropdown option ${option}`); 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 BrowserActions.click(optionElement);
await browser.waitForAngular(); await browser.waitForAngular();
} }
@@ -49,7 +49,7 @@ export class DropdownPage {
} }
async getNumberOfOptions(): Promise<number> { async getNumberOfOptions(): Promise<number> {
const dropdownOptions = $$('.mat-select-panel mat-option'); const dropdownOptions = $$('.mat-mdc-select-panel .mat-mdc-option');
return dropdownOptions.count(); return dropdownOptions.count();
} }
@@ -71,12 +71,12 @@ export class DropdownPage {
} }
async selectOptionFromIndex(index: number): Promise<void> { 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); await BrowserActions.click(value);
} }
async checkOptionsPanelIsDisplayed(): Promise<void> { async checkOptionsPanelIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible($$(`.mat-select-panel`).first()); await BrowserVisibility.waitUntilElementIsVisible($$(`.mat-mdc-select-panel`).first());
} }
async getSelectedOptionText(): Promise<string> { async getSelectedOptionText(): Promise<string> {
@@ -85,11 +85,11 @@ export class DropdownPage {
} }
async checkOptionIsDisplayed(option: string): Promise<void> { 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> { 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> { async selectDropdownOption(option: string): Promise<void> {

View File

@@ -26,7 +26,7 @@ export class PaginationPage {
pageSelectorArrow = $('button[data-automation-id="page-selector"]'); pageSelectorArrow = $('button[data-automation-id="page-selector"]');
itemsPerPage = $('.adf-pagination__max-items'); itemsPerPage = $('.adf-pagination__max-items');
itemsPerPageOpenDropdown = $('.adf-pagination__perpage-block button'); 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'); currentPage = $('.adf-pagination__current-page');
totalPages = $('.adf-pagination__total-pages'); totalPages = $('.adf-pagination__total-pages');
paginationRange = $('.adf-pagination__range'); paginationRange = $('.adf-pagination__range');
@@ -42,7 +42,7 @@ export class PaginationPage {
async selectItemsPerPage(numberOfItem: string): Promise<void> { async selectItemsPerPage(numberOfItem: string): Promise<void> {
await BrowserActions.clickExecuteScript(`div[class*="adf-pagination__perpage-block"] button`); await BrowserActions.clickExecuteScript(`div[class*="adf-pagination__perpage-block"] button`);
await BrowserVisibility.waitUntilElementIsVisible(this.pageSelectorDropDown); 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 BrowserVisibility.waitUntilElementIsPresent(itemsPerPage);
await BrowserActions.click(itemsPerPage); await BrowserActions.click(itemsPerPage);
await BrowserVisibility.waitUntilElementIsNotVisible(this.pageSelectorDropDown); await BrowserVisibility.waitUntilElementIsNotVisible(this.pageSelectorDropDown);