Skip to content

Commit

Permalink
Merge pull request #129 from stone-payments/feature/CMPDC-1041
Browse files Browse the repository at this point in the history
Sling select regression tests
  • Loading branch information
italomarcel committed Nov 7, 2018
2 parents 242e820 + 125924b commit 5b975ea
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const component = 'sling-web-component-select';
const customCode = false;

module.exports = {
main: (browser) => {
browser.url(`http://localhost:8777/packages/${component}/${customCode ? 'public/regression' : 'public'}/index.html`);
for (let i = 1; i <= 8; i++) { // eslint-disable-line
browser.execute(function (data) { // eslint-disable-line
const select = document.querySelector('sling-select');
select.value = data;
return select.shadowRoot.querySelector('select').options[data].text;
}, [i], function (result) { // eslint-disable-line
browser.assert.equal(result.value, `Option ${i}`);
});
}
browser.saveScreenshot(`./reports/${component}/${component}.png`)
.end();
},
};

0 comments on commit 5b975ea

Please sign in to comment.