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

This commit is contained in:
Amedeo Lepore
2024-05-23 13:34:54 +01:00
committed by VitoAlbano
parent 92c88de4bd
commit 667fb3ba41
@@ -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);
}