@@ -9,8 +9,8 @@ module.exports = {
99 browser
1010 .url('http://localhost:8080/basic/')
1111 .waitForElementVisible('#app', 1000)
12- .assert.count('li', 9 )
13- .assert.count('li a', 9 )
12+ .assert.count('li', 11 )
13+ .assert.count('li a', 11 )
1414 // assert correct href with base
1515 .assert.attributeContains('li:nth-child(1) a', 'href', '/basic/')
1616 .assert.attributeContains('li:nth-child(2) a', 'href', '/basic/foo')
@@ -76,5 +76,19 @@ module.exports = {
7676 .assert.containsText('#popstate-count', '0 popstate listeners')
7777
7878 .end()
79+ },
80+
81+ 'cancelling ongoing navigations': function (browser) {
82+ browser
83+ .url('http://localhost:8080/basic/?delay=200')
84+ .waitForElementVisible('#app', 1000)
85+ .assert.containsText('.view', 'home')
86+ // go to foo with a delay
87+ .click('li:nth-child(11) a')
88+ .click('li:nth-child(10) a')
89+ .waitFor(300)
90+ // we should stay at /basic after the delay
91+ .assert.urlEquals('http://localhost:8080/basic/?delay=200')
92+ .assert.containsText('.view', 'home')
7993 }
8094}
0 commit comments