Skip to content

Commit

Permalink
chore: update form test url
Browse files Browse the repository at this point in the history
  • Loading branch information
renanrbs committed Nov 7, 2018
1 parent 46d78f0 commit 5c69b93
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const component = 'sling-web-component-form';
const customCode = false;

module.exports = {

main: (browser) => {
Expand All @@ -9,7 +12,7 @@ module.exports = {
cnpj: '12.345.678/9012-34',
};

browser.url('http://localhost:8080/')
browser.url(`http://localhost:8777/${customCode ? 'regression' : ''}/index.html`)
/* eslint-disable */
.execute(function () {
document.querySelector('sling-button').click()
Expand All @@ -20,7 +23,7 @@ module.exports = {
browser.assert.equal(input.value, 'error');
});
});
browser.saveScreenshot('./reports/form-invalid.png')
browser.saveScreenshot(`./reports/${component}/${component}-invalid.png`)
/* eslint-disable */
.execute(function (testValues) {
document.querySelector('sling-input[name="name"]').value = testValues.name
Expand All @@ -36,7 +39,7 @@ module.exports = {
});
})
/* eslint-enable */
.saveScreenshot('./reports/form.png')
.saveScreenshot(`./reports/${component}/${component}.png`)
.end();
},
};

0 comments on commit 5c69b93

Please sign in to comment.