[affected:*][ci:force] Fixing e2e - the long painful journey

This commit is contained in:
Vito Albano
2024-03-14 02:47:21 +00:00
committed by VitoAlbano
parent f55811851c
commit f420b535d2
11 changed files with 27 additions and 38 deletions

View File

@@ -44,8 +44,9 @@ export class SearchSliderPage {
async setValue(value: number): Promise<void> {
const elem = this.filter.$(this.slider).$('.mdc-slider__thumb-knob');
await BrowserVisibility.waitUntilElementIsVisible(elem);
await browser.actions().mouseMove(elem, { x: 0, y: 0 }).perform();
await browser.actions().mouseDown().mouseMove({x: value * 25, y: 0}).mouseUp().perform();
await browser.actions().mouseDown().mouseMove({x: value * 7, y: 0}).mouseUp().perform();
}
async checkSliderIsDisplayed(): Promise<void> {

View File

@@ -31,7 +31,7 @@ export const materialLocators = {
Button: {
class: '.mat-mdc-button',
disabled: 'mat-button-disabled',
wrapper: '.mat-mdc-button-wrapper'
label: '.mdc-button__label'
},
Calendar: {
root: 'mat-calendar',
@@ -394,7 +394,7 @@ export const materialLocators = {
},
label: {
class: '.mdc-tab',
root: 'mat-tab-label',
root: 'mat-mdc-tab-labels',
active: {
class: '.mdc-tab--active',
root: 'mat-tab-label-active'

View File

@@ -24,7 +24,7 @@ export class TogglePage {
async enableToggle(toggle: ElementFinder): Promise<void> {
const check = await BrowserActions.getAttribute(toggle, 'class');
if (check.indexOf(materialLocators.Checked.root) < 0) {
const elem = toggle.$$('input').first();
const elem = toggle.$$('button').first();
await BrowserActions.clickScript(elem);
}
}