forked from vuejs/vue-router
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroute-props.js
29 lines (23 loc) · 982 Bytes
/
route-props.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module.exports = {
'route-props': function (browser) {
browser
.url('http://localhost:8080/route-props/')
.waitForElementVisible('#app', 1000)
.assert.count('li a', 5)
.assert.urlEquals('http://localhost:8080/route-props/')
.assert.containsText('.hello', 'Hello Vue!')
.click('li:nth-child(2) a')
.assert.urlEquals('http://localhost:8080/route-props/hello/you')
.assert.containsText('.hello', 'Hello you')
.click('li:nth-child(3) a')
.assert.urlEquals('http://localhost:8080/route-props/static')
.assert.containsText('.hello', 'Hello world')
.click('li:nth-child(4) a')
.assert.urlEquals('http://localhost:8080/route-props/dynamic/1')
.assert.containsText('.hello', 'Hello ' + ((new Date()).getFullYear() + 1)+ '!')
.click('li:nth-child(5) a')
.assert.urlEquals('http://localhost:8080/route-props/attrs')
.assert.containsText('.hello', 'Hello attrs')
.end()
}
}