Skip to content

Commit d6b3b97

Browse files
committed
add lazy-loading spec
1 parent 1ede281 commit d6b3b97

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/e2e/specs/lazy-loading.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
'lazy loading': function (browser) {
3+
browser
4+
.url('http://localhost:8080/lazy-loading/')
5+
.waitForElementVisible('#app', 1000)
6+
.assert.count('li a', 3)
7+
.assert.containsText('.view', 'home')
8+
9+
.click('li:nth-child(2) a')
10+
.assert.containsText('.view', 'This is Foo!')
11+
12+
.click('li:nth-child(3) a')
13+
.assert.containsText('.view', 'This is Bar!')
14+
15+
.click('li:nth-child(1) a')
16+
.assert.containsText('.view', 'home')
17+
18+
// test initial visit
19+
.url('http://localhost:8080/lazy-loading/foo')
20+
.waitForElementVisible('#app', 1000)
21+
.assert.containsText('.view', 'This is Foo!')
22+
.end()
23+
}
24+
}

0 commit comments

Comments
 (0)