Last active
July 11, 2017 16:58
-
-
Save joelgriffith/b42994b90957c5fd99d54a49afa8d6e0 to your computer and use it in GitHub Desktop.
Setup of Navalia E2E Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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