Skip to content

Instantly share code, notes, and snippets.

@joelgriffith
Last active July 11, 2017 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelgriffith/b42994b90957c5fd99d54a49afa8d6e0 to your computer and use it in GitHub Desktop.
Save joelgriffith/b42994b90957c5fd99d54a49afa8d6e0 to your computer and use it in GitHub Desktop.
Setup of Navalia E2E Test
const { Chrome } = require('navalia');
const pageUrl = 'http://localhost:3000/';
describe('My Page', () => {
let chrome = {};
// Setup a clean instance for each test
beforeEach(() => {
chrome = new Chrome();
});
// Tear down for each test
afterEach(() => {
return chrome.done();
});
it('should have a username input', () => {
return chrome.goto(pageUrl)
.then(() => chrome.exists('[data-test="username"]'))
.then((exists) => expect(exists).toEqual(true));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment