You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
944 B
28 lines
944 B
(function () {
|
|
'use strict'
|
|
|
|
function Steps() {
|
|
this.Given(/^I am on the homepage$/, function (callback) {
|
|
// Write code here that turns the phrase above into concrete actions
|
|
browser.get('http://localhost:3000/#/home');
|
|
callback();
|
|
});
|
|
|
|
this.Then(/^I should see navigation bar$/, function (callback) {
|
|
// Write code here that turns the phrase above into concrete actions
|
|
element(by.tagName('nav')).getText().then(function (name) {
|
|
callback();
|
|
});
|
|
});
|
|
|
|
this.Then(/^I should see a (.*) link at (.*)$/, function (title, count, callback) {
|
|
var li = browser.findElement(by.xpath('/html/body/nav/a[' + count + ']'));
|
|
li.getText().then(function (text) {
|
|
if (text === title)
|
|
callback();
|
|
});
|
|
});
|
|
}
|
|
module.exports = Steps;
|
|
|
|
})();
|