Last active
June 19, 2018 12:22
-
-
Save DMeechan/4079f74462d1119342ce5a36d5a6304f to your computer and use it in GitHub Desktop.
DevOps Course Chapter 8 - Automated testing
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
// This collection of test cases will be testing the title of the page | |
describe('title', function() { | |
const driver = getDriver(); | |
// Before every test runs, we'll need to open up the web page in Firefox | |
beforeEach(openWebsite(driver)); | |
// ▼ Write the test case for the page title below here ▼ | |
it('is correct', async function() { | |
try { | |
const expectedTitle = 'Example To Do List'; | |
const title = await driver.getTitle(); | |
title.should.equal(expectedTitle); | |
} catch (error) { | |
throw new Error(error); | |
} | |
}); | |
// ▲ Write the test case for the page title above here ▲ | |
// And then after all the tests, we can close the web page | |
after(closeWebsite(driver)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment