-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9bbc388
commit 419c65f
Showing
4 changed files
with
21 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const { browser } = require('protractor'); | ||
|
||
module.exports = { | ||
gotoGitHub: function () { return browser.get(''); }, | ||
gotoGitHub: async function () { return await browser.get(''); }, | ||
}; |
This file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
const { expect } = require('chai');; | ||
const { Given, When, Then } = require('cucumber'); | ||
const { expect } = require('chai');; | ||
const { navigator, searchPane, searchSummaryPane } = require('../pages'); | ||
|
||
Given('the user visits GitHub', { timeout: 60 * 1000 }, function () { | ||
return navigator.gotoGitHub(); | ||
Given('the user visits GitHub', { timeout: 60 * 1000 }, async function () { | ||
return await navigator.gotoGitHub(); | ||
}); | ||
|
||
When('a contributor name types and hit enter', function () { | ||
return searchPane.search(); | ||
When('a contributor search for {string}', async function (name) { | ||
return await searchPane.query(name); | ||
}); | ||
|
||
Then('the search result summary should have at least 1 contributor', function () { | ||
return expect(searchSummaryPane.countUsers()).to.eventually.equal('1'); | ||
Then('the search result summary should have at least {int} contributor', async function (nrOfContributors) { | ||
const actualNrOfContributors = await searchSummaryPane.countUsers(); | ||
return expect(actualNrOfContributors).to.be.at.least(nrOfContributors); | ||
}); |