Skip to content

Commit b686e07

Browse files
timdavishbbmoz
authored andcommitted
Chore/#155114660 - Make e2e tests more stable (#171)
* chore(e2e): add more waitForElement's * chore(yarn): update yarn.lock
1 parent ae0b410 commit b686e07

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

e2e/step_definitions/steps.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ const { Given, Then, When } = require('cucumber')
33

44
Given(/^I am logged out$/, async () => {
55
const header = client.page.header()
6-
await client.pause(250)
7-
await header.expect.element('@loginButton').to.be.visible
8-
await header.expect.element('@signupButton').to.be.visible
6+
await header.waitForElementVisible('@loginButton', 2500)
7+
await header.waitForElementVisible('@signupButton', 2500)
98
})
109

1110
Given(/^I am logged in$/, async () => {
1211
const header = client.page.header()
13-
await client.pause(250)
14-
await header.expect.element('@loginButton').to.not.be.present
15-
await header.expect.element('@signupButton').to.not.be.present
12+
await header.waitForElementNotPresent('@loginButton', 2500)
13+
await header.waitForElementNotPresent('@signupButton', 2500)
1614
})
1715

1816
Given(/^I open the "(.*)" page$/, async selector => {
@@ -22,7 +20,7 @@ Given(/^I open the "(.*)" page$/, async selector => {
2220

2321
Then(/^I am on the "(.*)" page$/, async selector => {
2422
const page = client.page[selector]()
25-
await page.waitForElementVisible('@body', 1000)
23+
await page.waitForElementVisible('@body', 2500)
2624
await client.assert.urlEquals(page.url)
2725
})
2826

@@ -52,11 +50,13 @@ When(/^I apply to a project with the project details (.*?)$/, async name => {
5250
})
5351

5452
Then(/^I do not see the project with the project details (.*?)$/, async name => {
55-
const createProject = client.page.createProject()
56-
await createProject.expect.element('@body').text.to.not.contain(name)
53+
const profile = client.page.profile()
54+
await profile.waitForElementPresent('@body', 2500)
55+
await profile.expect.element('@body').text.to.not.contain(name)
5756
})
5857

5958
Then(/^I see the project with the project details (.*?)$/, async name => {
60-
const createProject = client.page.createProject()
61-
await createProject.expect.element('@body').text.to.contain(name)
59+
const profile = client.page.profile()
60+
await profile.waitForElementPresent('@body', 2500)
61+
await profile.expect.element('@body').text.to.contain(name)
6262
})

yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3338,14 +3338,14 @@ eslint-plugin-import@^2.7.0:
33383338
minimatch "^3.0.3"
33393339
read-pkg-up "^2.0.0"
33403340

3341-
eslint-plugin-node@^5.2.0:
3342-
version "5.2.1"
3343-
resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-5.2.1.tgz#80df3253c4d7901045ec87fa660a284e32bdca29"
3341+
eslint-plugin-node@^6.0.0:
3342+
version "6.0.0"
3343+
resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-6.0.0.tgz#5ad5ee6b5346aec6cc9cde0b8619caed2c6d8f25"
33443344
dependencies:
33453345
ignore "^3.3.6"
33463346
minimatch "^3.0.4"
33473347
resolve "^1.3.3"
3348-
semver "5.3.0"
3348+
semver "^5.4.1"
33493349

33503350
eslint-plugin-promise@^3.5.0:
33513351
version "3.6.0"
@@ -8329,14 +8329,14 @@ semver-diff@^2.0.0:
83298329
version "5.5.0"
83308330
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
83318331

8332-
[email protected], semver@~5.3.0:
8333-
version "5.3.0"
8334-
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
8335-
83368332
semver@~5.0.1:
83378333
version "5.0.3"
83388334
resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a"
83398335

8336+
semver@~5.3.0:
8337+
version "5.3.0"
8338+
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
8339+
83408340
83418341
version "0.15.2"
83428342
resolved "https://registry.yarnpkg.com/send/-/send-0.15.2.tgz#f91fab4403bcf87e716f70ceb5db2f578bdc17d6"

0 commit comments

Comments
 (0)