Skip to content

Commit 823407e

Browse files
committed
test: adjust e2e tests so they are more stable when run on saucelabs
1 parent cf675ff commit 823407e

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

example/advanced/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Advanced Example
22

3-
This example uses Webpack to bundle the app, and uses vue-loader to enable single file Vue components.
3+
This example uses Webpack to bundle the app, and uses vue-loader to enable single file Vue components. Note this app is also used for end-to-end testing, so some of the fake timeouts are made particularly long to ensure the tests pass consistently.
44

55
- `route-config.js` is the main route file. It demonstrates nested routing, redirection and global before hook.
66
- `components/inbox/index.vue` demonstrates the use of common transition lifecycle hooks.

example/advanced/route-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function configRouter (router) {
7575
router.app.authenticating = false
7676
alert('this route is forbidden by a global before hook')
7777
transition.abort()
78-
}, 1500)
78+
}, 3000)
7979
} else {
8080
transition.next()
8181
}

example/advanced/services/messages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ export default {
66
id: params.id,
77
text: 'Hello this is a message'
88
})
9-
}, 1500)
9+
}, 3000)
1010
}
1111
}

test/e2e/test.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = {
6161
.waitForElementVisible('h1', 1000)
6262
.assert.containsText('.view div', 'Loading data')
6363
.assert.containsText('.view h2', 'inbox!')
64-
.pause(1500)
64+
.pause(3000)
6565
.assert.containsText('.view div', 'message #123: Hello this is a message')
6666
// confirm navigation
6767
.click('a[href^="/user"]')
@@ -83,10 +83,9 @@ module.exports = {
8383

8484
// forbidden
8585
.url(base + '/forbidden')
86-
.waitForElementVisible('h1', 1000)
87-
.assert.visible('#app > p')
86+
.waitForElementVisible('#app > p', 1000)
8887
.assert.containsText('#app > p', 'Authenticating')
89-
.pause(1500)
88+
.pause(3000)
9089
.getAlertText(function (text) {
9190
this.assert.ok(/forbidden by a global before hook/.test(text.value))
9291
})

0 commit comments

Comments
 (0)