test(setRoot): close menu on nav resolve

This commit is contained in:
Adam Bradley
2015-10-30 15:58:36 -05:00
parent 1f390d0fda
commit eb46236b8e

View File

@ -37,12 +37,13 @@ class E2EApp {
}
openPage(page) {
// close the menu when clicking a link from the menu
this.app.getComponent('leftMenu').close();
// Reset the content nav to have just this page
// we wouldn't want the back button to show in this scenario
let nav = this.app.getComponent('nav');
nav.setRoot(page.component);
nav.setRoot(page.component).then(() => {
// wait for the root page to be completely loaded
// then close the menu
this.app.getComponent('leftMenu').close();
});
}
}