[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 417978bfa7
commit 34c579b2d6

View File

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