domsuite
Advanced tools
Browser testing/automation utilities with async/await
Weekly downloads
Readme
Work In Progress
JavaScript browser testing/automation utilities. Uses async/await
syntax to make
asynchronous UI interactions straightforward.
Mocha example:
import {clickElement, condition, nextAnimationFrame} from 'domsuite';
describe(`my sweet UI`, function() {
it(`renders the foo when I click the bar`, function() {
await clickElement(document.querySelector(`.bar`));
await nextAnimationFrame();
expect(document.querySelector(`.bar`)).to.be.null;
await condition(() => !!document.querySelector(`.foo`));
});
});
npm install --save-dev domsuite
npm install
Browser tests run with Selenium through web-component-tester.
npm test
SAUCE=1 npm test
Set credentials with environment variables SAUCE_USERNAME
and SAUCE_ACCESS_KEY
. The default browser/OS matrix is defined in wct.conf.js
.
WATCH=true npm run test-build
PERSISTENT=true npm run test-run
MIT