mirror of
https://github.com/ansible/awx.git
synced 2026-01-20 14:11:24 -03:30
Fixes for e2e tests
This commit is contained in:
parent
2dfb0abb69
commit
8539eae114
@ -23,7 +23,7 @@ export default ['i18n', function(i18n){
|
||||
key: true,
|
||||
label: i18n._('Name'),
|
||||
columnClass: 'col-md-4 col-sm-9 col-xs-9',
|
||||
modalColumnClass: 'col-md-11',
|
||||
modalColumnClass: 'col-sm-12',
|
||||
awToolTip: '{{credential_type.description | sanitize}}',
|
||||
dataPlacement: 'top'
|
||||
},
|
||||
|
||||
@ -21,7 +21,7 @@ export default [function() {
|
||||
name: {
|
||||
key: true,
|
||||
label: 'Name',
|
||||
columnClass: 'col-lg-4 col-md-6 col-sm-8 col-xs-8',
|
||||
columnClass: 'col-sm-12',
|
||||
awToolTip: '{{organization.description | sanitize}}',
|
||||
dataPlacement: 'top'
|
||||
},
|
||||
|
||||
@ -562,7 +562,7 @@ export default ['$compile', 'Attr', 'Icon',
|
||||
}
|
||||
|
||||
if(options.mode === 'edit' && list.fieldActions) {
|
||||
html += "<div class=\"List-tableHeader List-tableHeader--actions actions-column";
|
||||
html += `<div id="${list.iterator}-actions-header" class=\"List-tableHeader List-tableHeader--actions actions-column`;
|
||||
html += (list.fieldActions && list.fieldActions.columnClass) ? " " + list.fieldActions.columnClass : "";
|
||||
html += "\" translate>";
|
||||
html += (list.fieldActions.label === undefined || list.fieldActions.label) ? i18n._("Actions") : "";
|
||||
|
||||
@ -88,7 +88,7 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
list: {
|
||||
selector: '.Panel',
|
||||
selector: '.at-Panel',
|
||||
elements: {
|
||||
badge: 'span[class~="badge"]',
|
||||
title: 'div[class="List-titleText"]',
|
||||
|
||||
@ -119,16 +119,7 @@ module.exports = {
|
||||
},
|
||||
sections: {
|
||||
search,
|
||||
pagination,
|
||||
table: createTableSection({
|
||||
elements: {
|
||||
name: 'td[class~="name-column"]',
|
||||
kind: 'td[class~="type-column"]'
|
||||
},
|
||||
sections: {
|
||||
actions
|
||||
}
|
||||
})
|
||||
pagination
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -184,9 +175,10 @@ module.exports = {
|
||||
.waitForElementVisible('div.spinny')
|
||||
.waitForElementNotVisible('div.spinny');
|
||||
|
||||
this.section.lookupInventory.section.table
|
||||
.waitForRowCount(1)
|
||||
.clickRowByIndex(1);
|
||||
this.api
|
||||
.waitForElementNotPresent('#inventories_table .List-tableRow:nth-child(2)')
|
||||
.waitForElementVisible('#inventories_table .List-tableRow:nth-child(1) input[type="radio"]')
|
||||
.click('#inventories_table .List-tableRow:nth-child(1) input[type="radio"]')
|
||||
|
||||
this.section.lookupInventory.expect.element('@save').enabled;
|
||||
|
||||
@ -210,9 +202,10 @@ module.exports = {
|
||||
.waitForElementVisible('div.spinny')
|
||||
.waitForElementNotVisible('div.spinny');
|
||||
|
||||
this.section.lookupProject.section.table
|
||||
.waitForRowCount(1)
|
||||
.clickRowByIndex(1);
|
||||
this.api
|
||||
.waitForElementNotPresent('#projects_table .List-tableRow:nth-child(2)')
|
||||
.waitForElementVisible('#projects_table .List-tableRow:nth-child(1) input[type="radio"]')
|
||||
.click('#projects_table .List-tableRow:nth-child(1) input[type="radio"]');
|
||||
|
||||
this.section.lookupProject.expect.element('@save').enabled;
|
||||
|
||||
@ -250,9 +243,9 @@ module.exports = {
|
||||
.click('multi-credential-modal smart-search i[class$="search"]')
|
||||
.waitForElementVisible('div.spinny')
|
||||
.waitForElementNotVisible('div.spinny')
|
||||
.waitForElementNotPresent('multi-credential-modal tbody tr:nth-child(2)')
|
||||
.waitForElementVisible('multi-credential-modal tbody tr:nth-child(1) input[type="checkbox"]')
|
||||
.click('multi-credential-modal tbody tr:nth-child(1) input[type="checkbox"]')
|
||||
.waitForElementNotPresent('multi-credential-modal .List-tableRow:nth-child(2)')
|
||||
.waitForElementVisible('multi-credential-modal .List-tableRow:nth-child(1) input[type="checkbox"]')
|
||||
.click('multi-credential-modal .List-tableRow:nth-child(1) input[type="checkbox"]')
|
||||
.click('multi-credential-modal button[class*="save"]')
|
||||
.pause(1000);
|
||||
|
||||
@ -276,9 +269,9 @@ module.exports = {
|
||||
.click('multi-credential-modal smart-search i[class$="search"]')
|
||||
.waitForElementVisible('div.spinny')
|
||||
.waitForElementNotVisible('div.spinny')
|
||||
.waitForElementNotPresent('multi-credential-modal tbody tr:nth-child(2)')
|
||||
.waitForElementVisible('multi-credential-modal tbody tr:nth-child(1) input[type="radio"]')
|
||||
.click('multi-credential-modal tbody tr:nth-child(1) input[type="radio"]')
|
||||
.waitForElementNotPresent('multi-credential-modal .List-tableRow:nth-child(2)')
|
||||
.waitForElementVisible('multi-credential-modal .List-tableRow:nth-child(1) input[type="radio"]')
|
||||
.click('multi-credential-modal .List-tableRow:nth-child(1) input[type="radio"]')
|
||||
.click('multi-credential-modal button[class*="save"]')
|
||||
.pause(1000);
|
||||
|
||||
|
||||
@ -118,18 +118,17 @@ module.exports = {
|
||||
},
|
||||
'credential is searchable after saving': client => {
|
||||
const credentials = client.page.credentials();
|
||||
const row = '#credentials_table .List-tableRow';
|
||||
|
||||
const { search } = credentials.section.list.section;
|
||||
const { table } = credentials.section.list.section;
|
||||
|
||||
search
|
||||
.waitForElementVisible('@input')
|
||||
.setValue('@input', `name:${store.credential.name}`)
|
||||
.click('@searchButton');
|
||||
|
||||
table.waitForRowCount(1);
|
||||
table.findRowByText(store.credential.name)
|
||||
.waitForElementVisible('@self');
|
||||
credentials.waitForElementNotPresent(`${row}:nth-of-type(2)`);
|
||||
credentials.expect.element(row).text.contain(store.credential.name);
|
||||
|
||||
client.end();
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ module.exports = {
|
||||
},
|
||||
'credential is searchable after saving': client => {
|
||||
const credentials = client.page.credentials();
|
||||
const row = '#credentials_table tbody tr';
|
||||
const row = '#credentials_table .List-tableRow';
|
||||
|
||||
credentials.section.list.section.search
|
||||
.waitForElementVisible('@input', AWX_E2E_TIMEOUT_LONG)
|
||||
|
||||
@ -122,7 +122,7 @@ module.exports = {
|
||||
},
|
||||
'credential is searchable after saving': client => {
|
||||
const credentials = client.page.credentials();
|
||||
const row = '#credentials_table tbody tr';
|
||||
const row = '#credentials_table .List-tableRow';
|
||||
|
||||
credentials.section.list.section.search
|
||||
.waitForElementVisible('@input', AWX_E2E_TIMEOUT_LONG)
|
||||
|
||||
@ -193,16 +193,14 @@ module.exports = {
|
||||
},
|
||||
'credential is searchable after saving': client => {
|
||||
const credentials = client.page.credentials();
|
||||
const row = '#credentials_table tbody tr';
|
||||
const row = '#credentials_table .List-tableRow';
|
||||
|
||||
credentials.section.list.section.search
|
||||
.waitForElementVisible('@input', AWX_E2E_TIMEOUT_LONG)
|
||||
.waitForElementVisible('@searchButton', AWX_E2E_TIMEOUT_LONG)
|
||||
.sendKeys('@input', `name:${store.credential.name}`)
|
||||
.sendKeys('@input', client.Keys.ENTER);
|
||||
const { search } = credentials.section.list.section;
|
||||
|
||||
client.pause(1000);
|
||||
client.waitForElementNotVisible('div.spinny');
|
||||
search
|
||||
.waitForElementVisible('@input')
|
||||
.setValue('@input', `name:${store.credential.name}`)
|
||||
.click('@searchButton');
|
||||
|
||||
credentials.waitForElementNotPresent(`${row}:nth-of-type(2)`);
|
||||
credentials.expect.element(row).text.contain(store.credential.name);
|
||||
|
||||
@ -193,7 +193,7 @@ module.exports = {
|
||||
},
|
||||
'credential is searchable after saving': client => {
|
||||
const credentials = client.page.credentials();
|
||||
const row = '#credentials_table tbody tr';
|
||||
const row = '#credentials_table .List-tableRow';
|
||||
|
||||
credentials.section.list.section.search
|
||||
.waitForElementVisible('@input', AWX_E2E_TIMEOUT_LONG)
|
||||
|
||||
@ -162,7 +162,7 @@ module.exports = {
|
||||
},
|
||||
'credential is searchable after saving': client => {
|
||||
const credentials = client.page.credentials();
|
||||
const row = '#credentials_table tbody tr';
|
||||
const row = '#credentials_table .List-tableRow';
|
||||
|
||||
credentials.section.list.section.search
|
||||
.waitForElementVisible('@input', AWX_E2E_TIMEOUT_LONG)
|
||||
|
||||
@ -123,7 +123,7 @@ module.exports = {
|
||||
},
|
||||
'credential is searchable after saving': client => {
|
||||
const credentials = client.page.credentials();
|
||||
const row = '#credentials_table tbody tr';
|
||||
const row = '#credentials_table .List-tableRow';
|
||||
|
||||
credentials.section.list.section.search
|
||||
.waitForElementVisible('@input', AWX_E2E_TIMEOUT_LONG)
|
||||
|
||||
@ -39,7 +39,7 @@ module.exports = {
|
||||
credentials.waitForElementNotVisible('div.spinny');
|
||||
|
||||
const activityStream = 'bread-crumb > div i[class$="icon-activity-stream"]';
|
||||
const activityRow = '#activities_table tr td[class*="description-column"] a';
|
||||
const activityRow = '#activities_table .List-tableCell[class*="description-column"] a';
|
||||
const toast = 'div[class="Toast-icon"]';
|
||||
|
||||
credentials.waitForElementNotPresent(toast);
|
||||
|
||||
@ -51,24 +51,23 @@ module.exports = {
|
||||
const credentials = client.page.credentials();
|
||||
const { details } = credentials.section.add.section;
|
||||
const { lookupModal } = credentials.section;
|
||||
const { table } = lookupModal.section;
|
||||
|
||||
details.section.organization.expect.element('@lookup').visible;
|
||||
|
||||
credentials.expect.section('@lookupModal').present;
|
||||
|
||||
table.expect.element('tbody tr:nth-child(1) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(2) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(3) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(4) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(5) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(6) input[type="radio"]').not.present;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(1) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(2) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(3) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(4) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(5) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(6) input[type="radio"]').not.present;
|
||||
|
||||
lookupModal.expect.element('@select').visible;
|
||||
lookupModal.expect.element('@select').not.enabled;
|
||||
|
||||
table.click('tbody tr:nth-child(2)');
|
||||
table.expect.element('tbody tr:nth-child(2) input[type="radio"]').selected;
|
||||
lookupModal.click('.List-tableRow:nth-child(2)');
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(2) input[type="radio"]').selected;
|
||||
|
||||
lookupModal.expect.element('@select').visible;
|
||||
lookupModal.expect.element('@select').enabled;
|
||||
@ -76,58 +75,53 @@ module.exports = {
|
||||
'sort and unsort the table by name with an item selected': client => {
|
||||
const credentials = client.page.credentials();
|
||||
const { lookupModal } = credentials.section;
|
||||
const { table } = lookupModal.section;
|
||||
|
||||
const column = table.section.header.findColumnByText('Name');
|
||||
lookupModal.expect.element('#organization-name-header').visible;
|
||||
lookupModal.expect.element('#organization-name-header').visible;
|
||||
|
||||
column.expect.element('@self').visible;
|
||||
column.expect.element('@sortable').visible;
|
||||
|
||||
column.click('@self');
|
||||
lookupModal.click('#organization-name-header');
|
||||
credentials.waitForElementVisible('div.spinny');
|
||||
credentials.waitForElementNotVisible('div.spinny');
|
||||
|
||||
table.expect.element('tbody tr:nth-child(1) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(2) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(3) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(4) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(5) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(1) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(2) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(3) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(4) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(5) input[type="radio"]').not.selected;
|
||||
|
||||
column.click('@self');
|
||||
lookupModal.click('#organization-name-header');
|
||||
credentials.waitForElementVisible('div.spinny');
|
||||
credentials.waitForElementNotVisible('div.spinny');
|
||||
|
||||
table.expect.element('tbody tr:nth-child(1) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(2) input[type="radio"]').selected;
|
||||
table.expect.element('tbody tr:nth-child(3) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(4) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(5) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(1) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(2) input[type="radio"]').selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(3) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(4) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(5) input[type="radio"]').not.selected;
|
||||
},
|
||||
'use the pagination controls with an item selected': client => {
|
||||
const credentials = client.page.credentials();
|
||||
const { lookupModal } = credentials.section;
|
||||
const { table } = lookupModal.section;
|
||||
const { pagination } = lookupModal.section;
|
||||
|
||||
pagination.click('@next');
|
||||
credentials.waitForElementVisible('div.spinny');
|
||||
credentials.waitForElementNotVisible('div.spinny');
|
||||
|
||||
table.expect.element('tbody tr:nth-child(1) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(2) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(3) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(4) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(5) input[type="radio"]').not.selected;
|
||||
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(1) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(2) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(3) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(4) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(5) input[type="radio"]').not.selected;
|
||||
pagination.click('@previous');
|
||||
credentials.waitForElementVisible('div.spinny');
|
||||
credentials.waitForElementNotVisible('div.spinny');
|
||||
|
||||
table.expect.element('tbody tr:nth-child(1) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(2) input[type="radio"]').selected;
|
||||
table.expect.element('tbody tr:nth-child(3) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(4) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(5) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(1) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(2) input[type="radio"]').selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(3) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(4) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(5) input[type="radio"]').not.selected;
|
||||
|
||||
pagination.click('@last');
|
||||
credentials.waitForElementVisible('div.spinny');
|
||||
@ -137,21 +131,21 @@ module.exports = {
|
||||
credentials.waitForElementVisible('div.spinny');
|
||||
credentials.waitForElementNotVisible('div.spinny');
|
||||
|
||||
table.expect.element('tbody tr:nth-child(1) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(2) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(3) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(4) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(5) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(1) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(2) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(3) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(4) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(5) input[type="radio"]').not.selected;
|
||||
|
||||
pagination.click('@first');
|
||||
credentials.waitForElementVisible('div.spinny');
|
||||
credentials.waitForElementNotVisible('div.spinny');
|
||||
|
||||
table.expect.element('tbody tr:nth-child(1) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(2) input[type="radio"]').selected;
|
||||
table.expect.element('tbody tr:nth-child(3) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(4) input[type="radio"]').not.selected;
|
||||
table.expect.element('tbody tr:nth-child(5) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(1) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(2) input[type="radio"]').selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(3) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(4) input[type="radio"]').not.selected;
|
||||
lookupModal.expect.element('.List-tableRow:nth-child(5) input[type="radio"]').not.selected;
|
||||
|
||||
client.end();
|
||||
}
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
const columns = ['Name', 'Kind', 'Owners', 'Actions'];
|
||||
const sortable = ['Name'];
|
||||
|
||||
module.exports = {
|
||||
before: (client, done) => {
|
||||
const credentials = client.page.credentials();
|
||||
@ -18,37 +15,26 @@ module.exports = {
|
||||
},
|
||||
'expected table columns are visible': client => {
|
||||
const credentials = client.page.credentials();
|
||||
const { table } = credentials.section.list.section;
|
||||
|
||||
columns.forEach(label => {
|
||||
table.section.header.findColumnByText(label)
|
||||
.expect.element('@self').visible;
|
||||
});
|
||||
credentials.expect.element('#credential-name-header').visible;
|
||||
credentials.expect.element('#credential-kind-header').visible;
|
||||
credentials.expect.element('#credential-owners-header').visible;
|
||||
credentials.expect.element('#credential-actions-header').visible;
|
||||
},
|
||||
'only fields expected to be sortable show sort icon': client => {
|
||||
const credentials = client.page.credentials();
|
||||
const { table } = credentials.section.list.section;
|
||||
|
||||
sortable.forEach(label => {
|
||||
table.section.header.findColumnByText(label)
|
||||
.expect.element('@sortable').visible;
|
||||
});
|
||||
credentials.expect.element('#credential-name-header > i.columnSortIcon').visible;
|
||||
},
|
||||
'sort all columns expected to be sortable': client => {
|
||||
const credentials = client.page.credentials();
|
||||
const { table } = credentials.section.list.section;
|
||||
|
||||
sortable.forEach(label => {
|
||||
const column = table.section.header.findColumnByText(label);
|
||||
|
||||
column.click('@self');
|
||||
|
||||
credentials
|
||||
.waitForElementVisible('div.spinny')
|
||||
.waitForElementNotVisible('div.spinny');
|
||||
|
||||
column.expect.element('@sorted').visible;
|
||||
});
|
||||
credentials.expect.element('#credential-name-header > i.columnSortIcon.fa-sort-up').visible;
|
||||
credentials.click('#credential-name-header');
|
||||
credentials
|
||||
.waitForElementVisible('div.spinny')
|
||||
.waitForElementNotVisible('div.spinny');
|
||||
credentials.expect.element('#credential-name-header > i.columnSortIcon.fa-sort-down').visible;
|
||||
|
||||
client.end();
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ module.exports = {
|
||||
inventories.waitForElementVisible('div.spinny');
|
||||
inventories.waitForElementNotVisible('div.spinny');
|
||||
|
||||
inventories.expect.element(`#inventories_table tr[id="${data.inventoryNoSource.id}"]`).visible;
|
||||
inventories.expect.element(`#inventories_table .List-tableRow[id="${data.inventoryNoSource.id}"]`).visible;
|
||||
inventories.expect.element('i[class*="copy"]').visible;
|
||||
inventories.expect.element('i[class*="copy"]').enabled;
|
||||
|
||||
@ -51,7 +51,7 @@ module.exports = {
|
||||
inventories.waitForElementNotVisible('div.spinny');
|
||||
|
||||
const activityStream = 'bread-crumb > div i[class$="icon-activity-stream"]';
|
||||
const activityRow = '#activities_table tr td[class*="description-column"] a';
|
||||
const activityRow = '#activities_table .List-tableCell[class*="description-column"] a';
|
||||
const toast = 'div[class="Toast-icon"]';
|
||||
|
||||
inventories.waitForElementNotPresent(toast);
|
||||
@ -99,7 +99,7 @@ module.exports = {
|
||||
inventories.waitForElementVisible('div.spinny');
|
||||
inventories.waitForElementNotVisible('div.spinny');
|
||||
|
||||
inventories.expect.element(`#inventories_table tr[id="${data.inventory.id}"]`).visible;
|
||||
inventories.expect.element(`#inventories_table .List-tableRow[id="${data.inventory.id}"]`).visible;
|
||||
inventories.expect.element('#copy-action').visible;
|
||||
inventories.expect.element('#copy-action[class*="btn-disabled"]').present;
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ module.exports = {
|
||||
inventoryScripts.waitForElementVisible('div.spinny');
|
||||
inventoryScripts.waitForElementNotVisible('div.spinny');
|
||||
|
||||
inventoryScripts.expect.element(`#inventory_scripts_table tr[id="${data.inventoryScript.id}"]`).visible;
|
||||
inventoryScripts.expect.element(`#inventory_scripts_table .List-tableRow[id="${data.inventoryScript.id}"]`).visible;
|
||||
inventoryScripts.expect.element('i[class*="copy"]').visible;
|
||||
inventoryScripts.expect.element('i[class*="copy"]').enabled;
|
||||
|
||||
@ -39,7 +39,7 @@ module.exports = {
|
||||
inventoryScripts.waitForElementNotVisible('div.spinny');
|
||||
|
||||
const activityStream = 'bread-crumb > div i[class$="icon-activity-stream"]';
|
||||
const activityRow = '#activities_table tr td[class*="description-column"] a';
|
||||
const activityRow = '#activities_table .List-tableCell[class*="description-column"] a';
|
||||
const toast = 'div[class="Toast-icon"]';
|
||||
|
||||
inventoryScripts.waitForElementNotPresent(toast);
|
||||
|
||||
@ -30,7 +30,7 @@ module.exports = {
|
||||
notifications.waitForElementVisible('div.spinny');
|
||||
notifications.waitForElementNotVisible('div.spinny');
|
||||
|
||||
notifications.expect.element(`#notification_templates_table tr[id="${data.notification.id}"]`).visible;
|
||||
notifications.expect.element(`#notification_templates_table .List-tableRow[id="${data.notification.id}"]`).visible;
|
||||
notifications.expect.element('i[class*="copy"]').visible;
|
||||
notifications.expect.element('i[class*="copy"]').enabled;
|
||||
|
||||
@ -39,7 +39,7 @@ module.exports = {
|
||||
notifications.waitForElementNotVisible('div.spinny');
|
||||
|
||||
const activityStream = 'bread-crumb > div i[class$="icon-activity-stream"]';
|
||||
const activityRow = '#activities_table tr td[class*="description-column"] a';
|
||||
const activityRow = '#activities_table .List-tableCell[class*="description-column"] a';
|
||||
const toast = 'div[class="Toast-icon"]';
|
||||
|
||||
notifications.waitForElementNotPresent(toast);
|
||||
|
||||
@ -40,7 +40,7 @@ module.exports = {
|
||||
projects.waitForElementNotVisible('div.spinny');
|
||||
|
||||
const activityStream = 'bread-crumb > div i[class$="icon-activity-stream"]';
|
||||
const activityRow = '#activities_table tr td[class*="description-column"] a';
|
||||
const activityRow = '#activities_table .List-tableCell[class*="description-column"] a';
|
||||
const toast = 'div[class="Toast-icon"]';
|
||||
|
||||
projects.waitForElementNotPresent(toast);
|
||||
|
||||
@ -54,7 +54,7 @@ module.exports = {
|
||||
templates.waitForElementNotVisible('div.spinny');
|
||||
|
||||
const activityStream = 'bread-crumb > div i[class$="icon-activity-stream"]';
|
||||
const activityRow = '#activities_table tr td[class*="description-column"] a';
|
||||
const activityRow = '#activities_table .List-tableCell[class*="description-column"] a';
|
||||
const toast = 'div[class="Toast-icon"]';
|
||||
|
||||
templates.waitForElementNotPresent(toast);
|
||||
@ -114,7 +114,7 @@ module.exports = {
|
||||
.waitForAngular();
|
||||
|
||||
const activityStream = 'bread-crumb > div i[class$="icon-activity-stream"]';
|
||||
const activityRow = '#activities_table tr td[class*="description-column"] a';
|
||||
const activityRow = '#activities_table .List-tableCell[class*="description-column"] a';
|
||||
const toast = 'div[class="Toast-icon"]';
|
||||
|
||||
templates.waitForElementNotPresent(toast);
|
||||
|
||||
@ -83,7 +83,6 @@ module.exports = {
|
||||
},
|
||||
'check template form for unsanitized content': client => {
|
||||
const multiCredentialOpen = 'multi-credential button i[class*="search"]';
|
||||
const multiCredentialExit = 'multi-credential-modal button[class*="exit"]';
|
||||
|
||||
client.navigateTo(urls.jobTemplate, false);
|
||||
|
||||
@ -101,10 +100,14 @@ module.exports = {
|
||||
client.expect.element('#xss').not.present;
|
||||
client.expect.element('[class=xss]').not.present;
|
||||
|
||||
client.click(multiCredentialExit);
|
||||
client.pause(500);
|
||||
|
||||
client.pause(500).expect.element('div.spinny').not.visible;
|
||||
client.expect.element('#multi-credential-modal').not.present;
|
||||
client.waitForElementVisible('#multi-credential-modal .Form-exit');
|
||||
client.waitForElementNotVisible('.overlay');
|
||||
|
||||
client.click('#multi-credential-modal .Form-exit');
|
||||
|
||||
client.waitForElementNotPresent('#multi-credential-modal');
|
||||
},
|
||||
'check template list for unsanitized content': client => {
|
||||
const itemRow = `#row-${data.jobTemplate.id}`;
|
||||
@ -160,7 +163,7 @@ module.exports = {
|
||||
},
|
||||
'check user roles list for unsanitized content': client => {
|
||||
const adminRole = data.project.summary_fields.object_roles.admin_role;
|
||||
const itemDelete = `#permissions_table tr[id="${adminRole.id}"] #delete-action`;
|
||||
const itemDelete = `#permissions_table .List-tableRow[id="${adminRole.id}"] #delete-action`;
|
||||
|
||||
client.expect.element('#permissions_tab').visible;
|
||||
client.expect.element('#permissions_tab').enabled;
|
||||
@ -225,14 +228,16 @@ module.exports = {
|
||||
client.expect.element('[class=xss]').not.present;
|
||||
},
|
||||
'check notification list for unsanitized content': client => {
|
||||
const itemRow = `#notification_templates_table tr[id="${data.notification.id}"]`;
|
||||
const itemName = `${itemRow} td[class*="name-"] a`;
|
||||
const itemRow = `#notification_templates_table .List-tableRow[id="${data.notification.id}"]`;
|
||||
const itemName = `${itemRow} .List-tableCell[class*="name-"] a`;
|
||||
|
||||
client.expect.element('div[class^="Panel"] smart-search').visible;
|
||||
client.expect.element('div[class^="Panel"] smart-search input').enabled;
|
||||
client.expect.element('div.at-Panel smart-search').visible;
|
||||
client.expect.element('div.at-Panel smart-search input').enabled;
|
||||
|
||||
client.sendKeys('div[class^="Panel"] smart-search input', `id:>${data.notification.id - 1} id:<${data.notification.id + 1}`);
|
||||
client.sendKeys('div[class^="Panel"] smart-search input', client.Keys.ENTER);
|
||||
client.sendKeys('div.at-Panel smart-search input', `id:>${data.notification.id - 1} id:<${data.notification.id + 1}`);
|
||||
client.waitForElementNotPresent('div.at-Panel smart-search .SmartSearch-searchButton--disabled');
|
||||
client.waitForElementNotVisible('.overlay');
|
||||
client.click('div.at-Panel smart-search .SmartSearch-searchButton');
|
||||
|
||||
client.expect.element('div.spinny').visible;
|
||||
client.expect.element('div.spinny').not.visible;
|
||||
@ -279,11 +284,13 @@ module.exports = {
|
||||
'check organization list for unsanitized content': client => {
|
||||
const itemName = '#OrgCards h3[class*="-label"]';
|
||||
|
||||
client.expect.element('div[class^="Panel"] smart-search').visible;
|
||||
client.expect.element('div[class^="Panel"] smart-search input').enabled;
|
||||
client.expect.element('div.at-Panel smart-search').visible;
|
||||
client.expect.element('div.at-Panel smart-search input').enabled;
|
||||
|
||||
client.sendKeys('div[class^="Panel"] smart-search input', `id:>${data.organization.id - 1} id:<${data.organization.id + 1}`);
|
||||
client.sendKeys('div[class^="Panel"] smart-search input', client.Keys.ENTER);
|
||||
client.sendKeys('div.at-Panel smart-search input', `id:>${data.organization.id - 1} id:<${data.organization.id + 1}`);
|
||||
client.waitForElementNotPresent('div.at-Panel smart-search .SmartSearch-searchButton--disabled');
|
||||
client.waitForElementNotVisible('.overlay');
|
||||
client.click('div.at-Panel smart-search .SmartSearch-searchButton');
|
||||
|
||||
client.expect.element('div.spinny').visible;
|
||||
client.expect.element('div.spinny').not.visible;
|
||||
@ -327,14 +334,16 @@ module.exports = {
|
||||
client.expect.element('[class=xss]').not.present;
|
||||
},
|
||||
'check inventory list for unsanitized content': client => {
|
||||
const itemRow = `#inventories_table tr[id="${data.inventory.id}"]`;
|
||||
const itemName = `${itemRow} td[class*="name-"] a`;
|
||||
const itemRow = `#inventories_table .List-tableRow[id="${data.inventory.id}"]`;
|
||||
const itemName = `${itemRow} .List-tableCell[class*="name-"] a`;
|
||||
|
||||
client.expect.element('div[class^="Panel"] smart-search').visible;
|
||||
client.expect.element('div[class^="Panel"] smart-search input').enabled;
|
||||
client.expect.element('div.at-Panel smart-search').visible;
|
||||
client.expect.element('div.at-Panel smart-search input').enabled;
|
||||
|
||||
client.sendKeys('div[class^="Panel"] smart-search input', `id:>${data.inventory.id - 1} id:<${data.inventory.id + 1}`);
|
||||
client.sendKeys('div[class^="Panel"] smart-search input', client.Keys.ENTER);
|
||||
client.sendKeys('div.at-Panel smart-search input', `id:>${data.inventory.id - 1} id:<${data.inventory.id + 1}`);
|
||||
client.waitForElementNotPresent('div.at-Panel smart-search .SmartSearch-searchButton--disabled');
|
||||
client.waitForElementNotVisible('.overlay');
|
||||
client.click('div.at-Panel smart-search .SmartSearch-searchButton');
|
||||
|
||||
client.expect.element('div.spinny').visible;
|
||||
client.expect.element('div.spinny').not.visible;
|
||||
@ -387,14 +396,16 @@ module.exports = {
|
||||
client.expect.element('[class=xss]').not.present;
|
||||
},
|
||||
'check inventory script list for unsanitized content': client => {
|
||||
const itemRow = `#inventory_scripts_table tr[id="${data.inventoryScript.id}"]`;
|
||||
const itemName = `${itemRow} td[class*="name-"] a`;
|
||||
const itemRow = `#inventory_scripts_table .List-tableRow[id="${data.inventoryScript.id}"]`;
|
||||
const itemName = `${itemRow} .List-tableCell[class*="name-"] a`;
|
||||
|
||||
client.expect.element('div[class^="Panel"] smart-search').visible;
|
||||
client.expect.element('div[class^="Panel"] smart-search input').enabled;
|
||||
client.expect.element('div.at-Panel smart-search').visible;
|
||||
client.expect.element('div.at-Panel smart-search input').enabled;
|
||||
|
||||
client.sendKeys('div[class^="Panel"] smart-search input', `id:>${data.inventoryScript.id - 1} id:<${data.inventoryScript.id + 1}`);
|
||||
client.sendKeys('div[class^="Panel"] smart-search input', client.Keys.ENTER);
|
||||
client.sendKeys('div.at-Panel smart-search input', `id:>${data.inventoryScript.id - 1} id:<${data.inventoryScript.id + 1}`);
|
||||
client.waitForElementNotPresent('div.at-Panel smart-search .SmartSearch-searchButton--disabled');
|
||||
client.waitForElementNotVisible('.overlay');
|
||||
client.click('div.at-Panel smart-search .SmartSearch-searchButton');
|
||||
|
||||
client.expect.element('div.spinny').visible;
|
||||
client.expect.element('div.spinny').not.visible;
|
||||
@ -439,7 +450,7 @@ module.exports = {
|
||||
client.expect.element('[class=xss]').not.present;
|
||||
},
|
||||
'check project roles list for unsanitized content': client => {
|
||||
const itemDelete = `#permissions_table tr[id="${data.user.id}"] div[class*="RoleList-deleteContainer"]`;
|
||||
const itemDelete = `#permissions_table .List-tableRow[id="${data.user.id}"] div[class*="RoleList-deleteContainer"]`;
|
||||
|
||||
client.expect.element('#permissions_tab').visible;
|
||||
client.expect.element('#permissions_tab').enabled;
|
||||
@ -456,7 +467,9 @@ module.exports = {
|
||||
client.expect.element('div[ui-view="related"] smart-search input').enabled;
|
||||
|
||||
client.sendKeys('div[ui-view="related"] smart-search input', `id:>${data.user.id - 1} id:<${data.user.id + 1}`);
|
||||
client.sendKeys('div[ui-view="related"] smart-search input', client.Keys.ENTER);
|
||||
client.waitForElementNotPresent('div[ui-view="related"] smart-search .SmartSearch-searchButton--disabled');
|
||||
client.waitForElementNotVisible('.overlay');
|
||||
client.click('div[ui-view="related"] smart-search .SmartSearch-searchButton');
|
||||
|
||||
client.expect.element('div.spinny').not.visible;
|
||||
|
||||
@ -515,7 +528,9 @@ module.exports = {
|
||||
client.expect.element('.at-Panel smart-search input').enabled;
|
||||
|
||||
client.sendKeys('.at-Panel smart-search input', `id:>${data.project.id - 1} id:<${data.project.id + 1}`);
|
||||
client.sendKeys('.at-Panel smart-search input', client.Keys.ENTER);
|
||||
client.waitForElementNotPresent('div.at-Panel smart-search .SmartSearch-searchButton--disabled');
|
||||
client.waitForElementNotVisible('.overlay');
|
||||
client.click('div.at-Panel smart-search .SmartSearch-searchButton');
|
||||
|
||||
client.expect.element('div.spinny').not.visible;
|
||||
|
||||
@ -560,14 +575,16 @@ module.exports = {
|
||||
client.expect.element('[class=xss]').not.present;
|
||||
},
|
||||
'check credential list for unsanitized content': client => {
|
||||
const itemRow = `#credentials_table tr[id="${data.credential.id}"]`;
|
||||
const itemName = `${itemRow} td[class*="name-"] a`;
|
||||
const itemRow = `#credentials_table .List-tableRow[id="${data.credential.id}"]`;
|
||||
const itemName = `${itemRow} .List-tableCell[class*="name-"] a`;
|
||||
|
||||
client.expect.element('div[ui-view="list"] smart-search').visible;
|
||||
client.expect.element('div[ui-view="list"] smart-search input').enabled;
|
||||
|
||||
client.sendKeys('div[ui-view="list"] smart-search input', `id:>${data.credential.id - 1} id:<${data.credential.id + 1}`);
|
||||
client.sendKeys('div[ui-view="list"] smart-search input', client.Keys.ENTER);
|
||||
client.waitForElementNotPresent('div[ui-view="list"] smart-search .SmartSearch-searchButton--disabled');
|
||||
client.waitForElementNotVisible('.overlay');
|
||||
client.click('div[ui-view="list"] smart-search .SmartSearch-searchButton');
|
||||
|
||||
client.expect.element('div.spinny').visible;
|
||||
client.expect.element('div.spinny').not.visible;
|
||||
@ -612,14 +629,16 @@ module.exports = {
|
||||
client.expect.element('[class=xss]').not.present;
|
||||
},
|
||||
'check team list for unsanitized content': client => {
|
||||
const itemRow = `#teams_table tr[id="${data.team.id}"]`;
|
||||
const itemName = `${itemRow} td[class*="name-"] a`;
|
||||
const itemRow = `#teams_table .List-tableRow[id="${data.team.id}"]`;
|
||||
const itemName = `${itemRow} .List-tableCell[class*="name-"] a`;
|
||||
|
||||
client.expect.element('div[class^="Panel"] smart-search').visible;
|
||||
client.expect.element('div[class^="Panel"] smart-search input').enabled;
|
||||
client.expect.element('div.at-Panel smart-search').visible;
|
||||
client.expect.element('div.at-Panel smart-search input').enabled;
|
||||
|
||||
client.sendKeys('div[class^="Panel"] smart-search input', `id:>${data.team.id - 1} id:<${data.team.id + 1}`);
|
||||
client.sendKeys('div[class^="Panel"] smart-search input', client.Keys.ENTER);
|
||||
client.sendKeys('div.at-Panel smart-search input', `id:>${data.team.id - 1} id:<${data.team.id + 1}`);
|
||||
client.waitForElementNotPresent('div.at-Panel smart-search .SmartSearch-searchButton--disabled');
|
||||
client.waitForElementNotVisible('.overlay');
|
||||
client.click('div.at-Panel smart-search .SmartSearch-searchButton');
|
||||
|
||||
client.expect.element('div.spinny').visible;
|
||||
client.expect.element('div.spinny').not.visible;
|
||||
@ -666,8 +685,8 @@ module.exports = {
|
||||
client.expect.element('[class=xss]').not.present;
|
||||
},
|
||||
'check job schedules view for unsanitized content': client => {
|
||||
const itemRow = `#schedules_table tr[id="${data.jobTemplateSchedule.id}"]`;
|
||||
const itemName = `${itemRow} td[class*="name-"] a`;
|
||||
const itemRow = `#schedules_table .List-tableRow[id="${data.jobTemplateSchedule.id}"]`;
|
||||
const itemName = `${itemRow} .List-tableCell[class*="name-"] a`;
|
||||
|
||||
client.navigateTo(urls.jobsSchedules);
|
||||
|
||||
@ -686,22 +705,23 @@ module.exports = {
|
||||
});
|
||||
},
|
||||
'check host recent jobs popup for unsanitized content': client => {
|
||||
const itemRow = `#hosts_table tr[id="${data.host.id}"]`;
|
||||
const itemName = `${itemRow} td[class*="active_failures-"] a`;
|
||||
const popOver = `${itemRow} td[class*="active_failures-"] div[class*="popover"]`;
|
||||
const itemRow = `#hosts_table .List-tableRow[id="${data.host.id}"]`;
|
||||
const itemName = `${itemRow} .List-tableCell[class*="active_failures-"] a`;
|
||||
|
||||
client.navigateTo(urls.inventoryHosts);
|
||||
client.expect.element('div[class^="Panel"] smart-search').visible;
|
||||
client.expect.element('div[class^="Panel"] smart-search input').enabled;
|
||||
client.expect.element('div.at-Panel smart-search').visible;
|
||||
client.expect.element('div.at-Panel smart-search input').enabled;
|
||||
|
||||
client.sendKeys('div[class^="Panel"] smart-search input', `id:>${data.host.id - 1} id:<${data.host.id + 1}`);
|
||||
client.sendKeys('div[class^="Panel"] smart-search input', client.Keys.ENTER);
|
||||
client.sendKeys('div[ui-view="form"] smart-search input', `id:>${data.host.id - 1} id:<${data.host.id + 1}`);
|
||||
client.waitForElementNotPresent('div[ui-view="form"] smart-search .SmartSearch-searchButton--disabled');
|
||||
client.waitForElementNotVisible('.overlay');
|
||||
client.click('div[ui-view="form"] smart-search .SmartSearch-searchButton');
|
||||
|
||||
client.expect.element('div.spinny').visible;
|
||||
client.expect.element('div.spinny').not.visible;
|
||||
|
||||
client.click(itemName);
|
||||
client.expect.element(popOver).present;
|
||||
client.expect.element('body > div.popover').present;
|
||||
|
||||
client.expect.element('[class=xss]').not.present;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user