Merge branch 'devel' into workflow-visualizer-search

This commit is contained in:
Daniel Sami
2018-10-19 10:26:12 -04:00
committed by GitHub
36 changed files with 1149 additions and 671 deletions

View File

@@ -56,10 +56,10 @@ module.exports = {
}
},
list: {
selector: '.Panel',
selector: '.at-Panel',
elements: {
badge: 'span[class~="badge"]',
title: 'div[class="List-titleText"]',
badge: '.at-Panel-headingTitleBadge',
title: '.at-Panel-headingTitle',
add: '#button-add'
},
sections: {

View File

@@ -2,8 +2,8 @@ const search = {
selector: 'smart-search',
locateStrategy: 'css selector',
elements: {
clearAll: 'a[class*="clear"]',
searchButton: 'i[class$="search"]',
clearAll: 'a[class*="clearAll"]',
searchButton: 'i[class*="fa-search"]',
input: 'input',
tags: '.SmartSearch-tagContainer'
}

View File

@@ -31,7 +31,7 @@ module.exports = {
projects.waitForElementNotVisible('div.spinny');
projects.section.list.expect.element('@badge').text.equal('1');
projects.expect.element(`#projects_table tr[id="${data.project.id}"]`).visible;
projects.expect.element(`#row-${data.project.id}`).visible;
projects.expect.element('i[class*="copy"]').visible;
projects.expect.element('i[class*="copy"]').enabled;

View File

@@ -508,36 +508,36 @@ module.exports = {
client.expect.element('#project_form').visible;
},
'check project list for unsanitized content': client => {
const itemRow = `#projects_table tr[id="${data.project.id}"]`;
const itemName = `${itemRow} td[class*="name-"] a`;
const itemRow = `#row-${data.project.id}`;
const itemName = `${itemRow} .at-RowItem-header`;
client.expect.element('div[class^="Panel"] smart-search').visible;
client.expect.element('div[class^="Panel"] smart-search input').enabled;
client.expect.element('.at-Panel smart-search').visible;
client.expect.element('.at-Panel smart-search input').enabled;
client.sendKeys('div[class^="Panel"] smart-search input', `id:>${data.project.id - 1} id:<${data.project.id + 1}`);
client.sendKeys('div[class^="Panel"] smart-search input', client.Keys.ENTER);
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.expect.element('div.spinny').visible;
client.expect.element('div.spinny').not.visible;
client.expect.element('.List-titleBadge').text.equal('1');
client.expect.element('.at-Panel-headingTitleBadge').text.equal('1');
client.expect.element(itemName).visible;
client.moveToElement(itemName, 0, 0, () => {
client.expect.element(itemName).attribute('aria-describedby');
client.getAttribute(itemName, 'aria-describedby', ({ value }) => {
const tooltip = `#${value}`;
client.expect.element(tooltip).present;
client.expect.element(tooltip).visible;
client.expect.element('#xss').not.present;
client.expect.element('[class=xss]').not.present;
client.expect.element(tooltip).attribute('innerHTML')
.contains('&lt;div id="xss" class="xss"&gt;test&lt;/div&gt;');
});
});
// TODO: uncomment when tooltips are added
// client.moveToElement(itemName, 0, 0, () => {
// client.expect.element(itemName).attribute('aria-describedby');
//
// client.getAttribute(itemName, 'aria-describedby', ({ value }) => {
// const tooltip = `#${value}`;
//
// client.expect.element(tooltip).present;
// client.expect.element(tooltip).visible;
//
// client.expect.element('#xss').not.present;
// client.expect.element('[class=xss]').not.present;
// client.expect.element(tooltip).attribute('innerHTML')
// .contains('&lt;div id="xss" class="xss"&gt;test&lt;/div&gt;');
// });
// });
client.click(`${itemRow} i[class*="trash"]`);