[AAE-21084] Fix e2e Content: Upload and Versioning - C279992 - fix enable togle selector

This commit is contained in:
Amedeo Lepore
2024-03-14 13:14:43 +01:00
committed by VitoAlbano
parent f426d5d211
commit b53cb661ef

View File

@@ -22,8 +22,8 @@ import { materialLocators } from './material-locators';
export class TogglePage { export class TogglePage {
async enableToggle(toggle: ElementFinder): Promise<void> { async enableToggle(toggle: ElementFinder): Promise<void> {
const check = await BrowserActions.getAttribute(toggle, 'class'); const slideToggle = await BrowserActions.getAttribute(toggle, 'class');
if (check.indexOf(materialLocators.Checked.root) < 0) { if (slideToggle.indexOf(materialLocators.Slide.toggle.checked) < 0) {
const elem = toggle.$$('button').first(); const elem = toggle.$$('button').first();
await BrowserActions.clickScript(elem); await BrowserActions.clickScript(elem);
} }