mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[affected:*][ci:force] Fixed e2e with new notation
This commit is contained in:
@@ -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: {
|
||||||
|
@@ -102,7 +102,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);
|
||||||
@@ -112,7 +112,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);
|
||||||
|
Reference in New Issue
Block a user