[affected:*][ci:force] Fixed e2e with new notation

This commit is contained in:
Vito Albano
2024-03-10 00:27:43 +00:00
committed by VitoAlbano
parent 4811a581e3
commit fc2a0c4602
2 changed files with 5 additions and 4 deletions

View File

@@ -89,7 +89,7 @@ export const materialLocators = {
}
},
Checked: {
root: 'mat-checked'
root: 'mdc-switch--checked'
},
Chip: {
root: 'mat-chip',
@@ -345,7 +345,8 @@ export const materialLocators = {
toggle: {
class: '.mat-mdc-slide-toggle',
root: 'mat-slide-toggle',
input: '.mat-mdc-slide-toggle-input'
input: '.mat-mdc-slide-toggle-input',
checked: 'mat-mdc-slide-toggle-checked'
}
},
Selection: {

View File

@@ -102,7 +102,7 @@ export class SettingsPage {
async setSilentLogin(enableToggle) {
await BrowserVisibility.waitUntilElementIsVisible(this.silentLoginToggleElement);
const isChecked = (await BrowserActions.getAttribute(this.silentLoginToggleElement, 'class')).includes(materialLocators.Checked.root);
const isChecked = (await BrowserActions.getAttribute(this.silentLoginToggleElement, 'class')).includes(materialLocators.Slide.toggle.checked);
if (isChecked && !enableToggle || !isChecked && enableToggle) {
await BrowserActions.click(this.silentLoginToggleLabel);
@@ -112,7 +112,7 @@ export class SettingsPage {
async setImplicitFlow(enableToggle) {
await BrowserVisibility.waitUntilElementIsVisible(this.implicitFlowElement);
const isChecked = (await BrowserActions.getAttribute(this.implicitFlowElement, 'class')).includes(materialLocators.Checked.root);
const isChecked = (await BrowserActions.getAttribute(this.implicitFlowElement, 'class')).includes(materialLocators.Slide.toggle.checked);
if (isChecked && !enableToggle || !isChecked && enableToggle) {
await BrowserActions.click(this.implicitFlowLabel);