Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.

Commit

Permalink
test: increasing timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
evertonfraga committed May 29, 2019
1 parent 0170d03 commit 77565e5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion test/e2e/_ClientSettingsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ClientSettingsForm {
}

waitUntilModalIsClosed() {
return this.client.waitUntil(async () => (await this.client.$('div[role=presentation]')).state === 'failure')
return this.client.waitUntil(async () => (await this.client.$('div[role=presentation]')).state === 'failure', 1000)
}
}

Expand Down
4 changes: 2 additions & 2 deletions test/e2e/_Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class Node {
}

waitUntilStarted() {
return this.client.waitUntilTextExists('[data-test-id=node-state]', 'STARTED')
return this.client.waitUntilTextExists('[data-test-id=node-state]', 'STARTED', 3000)
}

waitUntilStopped() {
return this.client.waitUntilTextExists('[data-test-id=node-state]', 'STOPPED')
return this.client.waitUntilTextExists('[data-test-id=node-state]', 'STOPPED', 3000)
}

}
Expand Down
8 changes: 5 additions & 3 deletions test/e2e/_VersionList.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const DELAY_FACTOR = 3

class VersionList {
constructor(client) {
this.client = client
Expand Down Expand Up @@ -44,19 +46,19 @@ class VersionList {

// Events
waitToLoad() {
return this.client.waitUntilTextExists('h6', '61 versions available', 5000)
return this.client.waitUntilTextExists('h6', '61 versions available', DELAY_FACTOR * 7500)
}

waitUntilVersionSelected(index = 0) {
// nth-child is not zero-based
index++
return this.client.waitUntilTextExists(`[data-test-id=version-list] [role=button]:nth-child(${index}) span span`, 'SELECTED', 20000)
return this.client.waitUntilTextExists(`[data-test-id=version-list] [role=button]:nth-child(${index}) span span`, 'SELECTED', DELAY_FACTOR * 20000)
}

waitUntilVersionDownloading(index = 0) {
// nth-child is not zero-based
index++
return this.client.waitUntilTextExists(`[data-test-id=version-list] [role=button]:nth-child(${index}) span span`, 'DOWNLOADING', 1000)
return this.client.waitUntilTextExists(`[data-test-id=version-list] [role=button]:nth-child(${index}) span span`, 'DOWNLOADING', DELAY_FACTOR * 1000)
}
}

Expand Down
4 changes: 0 additions & 4 deletions test/e2e/acceptance.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ test('As a user, I want to have the connection details remembered', async t => {
const clientAppBar = new ClientAppBar(client)
const settings = new ClientSettingsForm(client)

await versionList.waitToLoad()
await versionList.clickOnItem(0)
await versionList.waitUntilVersionSelected(0)

await clientAppBar.settings.click()
await settings.getPathInput('dataDir').setValue('/tmp/ac5718')

Expand Down

0 comments on commit 77565e5

Please sign in to comment.