From e26cfaf2a14a83da8aa64f7be2abae3000b0cac4 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Thu, 7 May 2020 12:04:51 +0200 Subject: [PATCH] test(e2e): add todos --- e2e/specs/multi-app.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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') -- 2.47.3