fix issue with navbar in home menu with no active app

This commit is contained in:
Géry Debongnie
2019-02-20 15:03:32 +01:00
parent 203ce91e92
commit 16dc33cc05
4 changed files with 21 additions and 6 deletions
+9 -1
View File
@@ -34,7 +34,15 @@ afterEach(() => {
// Tests
//------------------------------------------------------------------------------
test("can be rendered", async () => {
test("can be rendered (in home menu, no app)", async () => {
props.inHome = true;
const navbar = new Navbar(env, props);
await navbar.mount(fixture);
expect(fixture.innerHTML).toMatchSnapshot();
});
test("can be rendered (in home menu, one active app)", async () => {
props = { inHome: true, app: menuInfo.menus[96]! };
const navbar = new Navbar(env, props);
await navbar.mount(fixture);
expect(fixture.innerHTML).toMatchSnapshot();