[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 3c63208e27
commit 069488fcab
2 changed files with 5 additions and 4 deletions

View File

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

View File

@@ -136,7 +136,7 @@ export class SettingsPage {
async setSilentLogin(enableToggle) { async setSilentLogin(enableToggle) {
await BrowserVisibility.waitUntilElementIsVisible(this.silentLoginToggleElement); 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)) { if ((isChecked && !enableToggle) || (!isChecked && enableToggle)) {
await BrowserActions.click(this.silentLoginToggleLabel); await BrowserActions.click(this.silentLoginToggleLabel);
@@ -146,7 +146,7 @@ export class SettingsPage {
async setImplicitFlow(enableToggle) { async setImplicitFlow(enableToggle) {
await BrowserVisibility.waitUntilElementIsVisible(this.implicitFlowElement); 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)) { if ((isChecked && !enableToggle) || (!isChecked && enableToggle)) {
await BrowserActions.click(this.implicitFlowLabel); await BrowserActions.click(this.implicitFlowLabel);