add basic support for mobile mode

This commit is contained in:
Géry Debongnie
2019-01-30 12:34:45 +01:00
parent 6012d76388
commit c627f87463
7 changed files with 78 additions and 3 deletions
@@ -21,3 +21,12 @@ exports[`can render one menu item 1`] = `
</ul>
</div>"
`;
exports[`mobile mode: navbar is different 1`] = `
"<div class=\\"o_navbar\\">
<span class=\\"title\\">Odoo MOBILE</span>
<ul>
</ul>
</div>"
`;
+7
View File
@@ -34,3 +34,10 @@ test("can render one menu item", async () => {
await navbar.mount(fixture);
expect(fixture.innerHTML).toMatchSnapshot();
});
test("mobile mode: navbar is different", async () => {
env.isMobile = true;
const navbar = new Navbar(env);
await navbar.mount(fixture);
expect(fixture.innerHTML).toMatchSnapshot();
});