mirror of
https://github.com/ansible/awx.git
synced 2026-03-25 04:45:03 -02:30
update e2e tests for disabled toggle switches
This commit is contained in:
@@ -19,7 +19,7 @@ const details = createFormSection({
|
|||||||
'#notification_template_form input[type="radio"]',
|
'#notification_template_form input[type="radio"]',
|
||||||
'#notification_template_form .ui-spinner-input',
|
'#notification_template_form .ui-spinner-input',
|
||||||
'#notification_template_form .Form-textArea',
|
'#notification_template_form .Form-textArea',
|
||||||
'#notification_template_form .atSwitch-inner',
|
'#notification_template_form .atSwitch-outer',
|
||||||
'#notification_template_form .Form-lookupButton'
|
'#notification_template_form .Form-lookupButton'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,9 +86,16 @@ function checkAllFieldsDisabled () {
|
|||||||
selectors.forEach(selector => {
|
selectors.forEach(selector => {
|
||||||
client.elements('css selector', selector, inputs => {
|
client.elements('css selector', selector, inputs => {
|
||||||
inputs.value.map(o => o.ELEMENT).forEach(id => {
|
inputs.value.map(o => o.ELEMENT).forEach(id => {
|
||||||
client.elementIdAttribute(id, 'disabled', ({ value }) => {
|
if (selector.includes('atSwitch')) {
|
||||||
client.assert.equal(value, 'true');
|
client.elementIdAttribute(id, 'class', ({ value }) => {
|
||||||
});
|
const isDisabled = value && value.includes('atSwitch-disabled');
|
||||||
|
client.assert.equal(isDisabled, true);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
client.elementIdAttribute(id, 'disabled', ({ value }) => {
|
||||||
|
client.assert.equal(value, 'true');
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user