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:
Marliana Lara
2018-05-01 14:14:28 -04:00
parent b64990562a
commit dce52d0552
56 changed files with 104 additions and 127 deletions

View File

@@ -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"]'

View File

@@ -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,

View File

@@ -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}"]`);

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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"]'

View File

@@ -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,

View File

@@ -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()

View File

@@ -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,

View File

@@ -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');