Last active
August 1, 2018 13:18
-
-
Save tuliobluz/eb99fe3f463f0be3e1b37b5c3746c91a to your computer and use it in GitHub Desktop.
spec.spec.js
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
let specPage = require('../pages/spec.po.js'); | |
let chai = require('chai'); | |
let chaiAsPromised = require('chai-as-promised'); | |
chai.use(chaiAsPromised); | |
let expect = chai.expect; | |
Before(function(){ | |
specPage.init(); | |
}) | |
Given('The user go to {string}', function (string) { | |
specPage.get(string); | |
}); | |
When('The user adds {string} in the name field', function (string) { | |
specPage.setName(string); | |
}); | |
Then('The user should see Hello with the username', function () { | |
expect(specPage.getGreetingText()) | |
.to.eventually.equal('Hello Julie!') | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment