From: Eduardo San Martin Morote Date: Thu, 7 May 2020 10:04:51 +0000 (+0200) Subject: test(e2e): add todos X-Git-Tag: v4.0.0-alpha.11~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e26cfaf2a14a83da8aa64f7be2abae3000b0cac4;p=thirdparty%2Fvuejs%2Frouter.git test(e2e): add todos --- diff --git a/e2e/specs/multi-app.js b/e2e/specs/multi-app.js index f03f62da..fe251ed4 100644 --- a/e2e/specs/multi-app.js +++ b/e2e/specs/multi-app.js @@ -56,16 +56,29 @@ module.exports = { // navigation on app 1 .click('#app-1 li:nth-child(2) a') + .assert.containsText('#guardcount', '2') .assert.containsText('#app-1 .user', 'User 1') .assert.containsText('#app-2 .user', 'User 1') .assert.containsText('#app-3 .user', 'User 1') // navigation on app 2 .click('#app-2 li:nth-child(3) a') + .assert.containsText('#guardcount', '3') .assert.containsText('#app-1 .user', 'User 2') .assert.containsText('#app-2 .user', 'User 2') .assert.containsText('#app-3 .user', 'User 2') + // should trigger the guard only once + .back() + .assert.containsText('#guardcount', '4') + + /** + * TODO: + * - add in-component guards and check each one of them is called + * - check `this` is the actual instance by injecting a global property + * per app equal to their id and using it somewhere in the template + */ + // unmounting apps should end up removing the popstate listener // .click('#unmount1') // .click('#unmount2')