store refactoring

This commit is contained in:
Géry Debongnie
2019-02-20 14:55:49 +01:00
parent 16dc33cc05
commit 264420a96b
9 changed files with 376 additions and 289 deletions
+10
View File
@@ -62,3 +62,13 @@ test("mobile mode: navbar is different", async () => {
await navbar.mount(fixture);
expect(fixture.innerHTML).toMatchSnapshot();
});
test("clicking on left icon toggle home menu ", async () => {
props.app = menuInfo.menus[96]!;
store.state.inHome = false;
const navbar = new Navbar(env, props);
await navbar.mount(fixture);
expect(store.state.inHome).toBe(false);
(<any>fixture).getElementsByClassName("o_title")[0].click();
expect(store.state.inHome).toBe(true);
});