mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 11:50:42 -03:30
update e2e tests for disabled toggle switches
This commit is contained in:
parent
d068fef767
commit
7a6e62c022
@ -19,7 +19,7 @@ const details = createFormSection({
|
||||
'#notification_template_form input[type="radio"]',
|
||||
'#notification_template_form .ui-spinner-input',
|
||||
'#notification_template_form .Form-textArea',
|
||||
'#notification_template_form .atSwitch-inner',
|
||||
'#notification_template_form .atSwitch-outer',
|
||||
'#notification_template_form .Form-lookupButton'
|
||||
]
|
||||
}
|
||||
|
||||
@ -86,9 +86,16 @@ function checkAllFieldsDisabled () {
|
||||
selectors.forEach(selector => {
|
||||
client.elements('css selector', selector, inputs => {
|
||||
inputs.value.map(o => o.ELEMENT).forEach(id => {
|
||||
client.elementIdAttribute(id, 'disabled', ({ value }) => {
|
||||
client.assert.equal(value, 'true');
|
||||
});
|
||||
if (selector.includes('atSwitch')) {
|
||||
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');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user