mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
Update the Add button content and styles
* Change the text from "Add" to "+" * Update the e2e test to check for an id #button-add
This commit is contained in:
@@ -28,7 +28,7 @@ const addEditPanel = {
|
||||
const listPanel = {
|
||||
selector: 'div[ui-view="list"]',
|
||||
elements: {
|
||||
add: '.List-buttonSubmit',
|
||||
add: '#button-add',
|
||||
badge: 'div[class="List-titleBadge]',
|
||||
titleText: 'div[class="List-titleText"]',
|
||||
noitems: 'div[class="List-noItems"]'
|
||||
|
||||
@@ -251,7 +251,7 @@ module.exports = {
|
||||
elements: {
|
||||
badge: 'span[class~="badge"]',
|
||||
title: 'div[class="List-titleText"]',
|
||||
add: 'button[class~="List-buttonSubmit"]'
|
||||
add: '#button-add'
|
||||
},
|
||||
sections: {
|
||||
search,
|
||||
|
||||
@@ -121,9 +121,9 @@ module.exports = {
|
||||
return this.navigate();
|
||||
},
|
||||
selectAdd (name) {
|
||||
this.api.waitForElementVisible('button span[class="List-dropdownCarat"]');
|
||||
this.expect.element('button span[class="List-dropdownCarat"]').enabled;
|
||||
this.api.click('button span[class="List-dropdownCarat"]');
|
||||
this.api.waitForElementVisible('button[id="button-add"]');
|
||||
this.expect.element('button[id="button-add"]').enabled;
|
||||
this.api.click('button[id="button-add"]');
|
||||
|
||||
this.api.useXpath();
|
||||
this.api.waitForElementVisible(`.//a[normalize-space(text())="${name}"]`);
|
||||
|
||||
@@ -59,7 +59,7 @@ module.exports = {
|
||||
elements: {
|
||||
badge: 'span[class~="badge"]',
|
||||
title: 'div[class="List-titleText"]',
|
||||
add: 'button[class~="List-buttonSubmit"]'
|
||||
add: '#button-add'
|
||||
},
|
||||
sections: {
|
||||
search,
|
||||
|
||||
@@ -64,7 +64,7 @@ module.exports = {
|
||||
elements: {
|
||||
badge: 'span[class~="badge"]',
|
||||
title: 'div[class="List-titleText"]',
|
||||
add: 'button[class~="List-buttonSubmit"]'
|
||||
add: '#button-add'
|
||||
},
|
||||
sections: {
|
||||
search,
|
||||
|
||||
@@ -61,7 +61,7 @@ module.exports = {
|
||||
elements: {
|
||||
badge: 'span[class~="badge"]',
|
||||
title: 'div[class="List-titleText"]',
|
||||
add: 'button[class~="List-buttonSubmit"]'
|
||||
add: '#button-add'
|
||||
},
|
||||
sections: {
|
||||
search,
|
||||
|
||||
@@ -60,7 +60,7 @@ module.exports = {
|
||||
elements: {
|
||||
badge: 'span[class~="badge"]',
|
||||
title: 'div[class="List-titleText"]',
|
||||
add: 'button[class~="List-buttonSubmit"]'
|
||||
add: '#button-add'
|
||||
},
|
||||
sections: {
|
||||
search,
|
||||
|
||||
@@ -6,7 +6,7 @@ import search from './search';
|
||||
const permissions = {
|
||||
selector: 'div[ui-view="related"]',
|
||||
elements: {
|
||||
add: 'button[class="btn List-buttonSubmit"]',
|
||||
add: '#button-add',
|
||||
badge: 'div[class="List-titleBadge]',
|
||||
titleText: 'div[class="List-titleText"]',
|
||||
noitems: 'div[class="List-noItems"]'
|
||||
|
||||
@@ -58,7 +58,7 @@ module.exports = {
|
||||
elements: {
|
||||
badge: 'span[class~="badge"]',
|
||||
title: 'div[class="List-titleText"]',
|
||||
add: 'button[class~="List-buttonSubmit"]'
|
||||
add: '#button-add'
|
||||
},
|
||||
sections: {
|
||||
search,
|
||||
|
||||
@@ -94,7 +94,7 @@ module.exports = {
|
||||
elements: {
|
||||
badge: 'span[class~="badge"]',
|
||||
title: 'div[class="List-titleText"]',
|
||||
add: 'button[class~="List-buttonSubmit"]'
|
||||
add: '#button-add'
|
||||
},
|
||||
sections: {
|
||||
search,
|
||||
@@ -127,7 +127,7 @@ module.exports = {
|
||||
return this;
|
||||
},
|
||||
selectAdd (name) {
|
||||
this.clickWhenEnabled('button span[class="at-List-toolbarDropdownCarat"]');
|
||||
this.clickWhenEnabled(`#button-add`);
|
||||
|
||||
this.api
|
||||
.useXpath()
|
||||
|
||||
@@ -58,7 +58,7 @@ module.exports = {
|
||||
elements: {
|
||||
badge: 'span[class~="badge"]',
|
||||
title: 'div[class="List-titleText"]',
|
||||
add: 'button[class~="List-buttonSubmit"]'
|
||||
add: '#button-add'
|
||||
},
|
||||
sections: {
|
||||
search,
|
||||
|
||||
@@ -124,7 +124,7 @@ module.exports = {
|
||||
inventories.waitForElementNotVisible('div.spinny');
|
||||
},
|
||||
'create host': client => {
|
||||
const addHost = './/span[text()="+ ADD HOST"]';
|
||||
const addHost = '.hostsList #button-add';
|
||||
|
||||
client.expect.element('#hosts_tab').enabled;
|
||||
client.expect.element('#hosts_tab').css('opacity').equal('1');
|
||||
@@ -136,11 +136,10 @@ module.exports = {
|
||||
|
||||
client.expect.element('#hosts_tab').css('background-color').contain('132, 137, 146');
|
||||
|
||||
client.useXpath();
|
||||
client.useCss();
|
||||
client.waitForElementVisible(addHost);
|
||||
client.expect.element(addHost).enabled;
|
||||
client.click(addHost);
|
||||
client.useCss();
|
||||
|
||||
client.waitForElementVisible('#host_name');
|
||||
client.sendKeys('#host_name', 'localhost');
|
||||
|
||||
Reference in New Issue
Block a user