Skip to content

Commit

Permalink
Merge 9ec4c7c into f1a2e1e
Browse files Browse the repository at this point in the history
  • Loading branch information
renanrbs committed Nov 8, 2018
2 parents f1a2e1e + 9ec4c7c commit b0488bd
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const component = 'sling-web-component-table';
const customCode = false;

module.exports = {

main: (browser) => {
browser.url(`http://localhost:8777/${customCode ? 'regression' : ''}/index.html`)
.saveScreenshot(`./reports/${component}/${component}-start.png`)
.execute(function () {
const tableList = [];
const tables = document.querySelectorAll('sling-table');
tables.forEach(e =>
tableList.push(e.shadowRoot.querySelectorAll('tr'),
));
return tableList;
}, [], function (tableList) {
tableList.value.forEach((table, i) => {
table.forEach((row) => {
browser.elementIdClick(row.ELEMENT);
});
browser.saveScreenshot(`./reports/${component}/${component}-${i}.png`);
});
})
.end();
},
};

0 comments on commit b0488bd

Please sign in to comment.