mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
29 lines
853 B
TypeScript
29 lines
853 B
TypeScript
import { HomeMenu } from "../../src/ts/ui/home_menu";
|
|
import { makeTestEnv, makeTestFixture } from "../helpers";
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Setup and helpers
|
|
//------------------------------------------------------------------------------
|
|
|
|
let fixture: HTMLElement;
|
|
|
|
beforeEach(() => {
|
|
fixture = makeTestFixture();
|
|
});
|
|
|
|
afterEach(() => {
|
|
fixture.remove();
|
|
});
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Tests
|
|
//------------------------------------------------------------------------------
|
|
|
|
test("can be rendered", async () => {
|
|
const testEnv = makeTestEnv();
|
|
const props = { menuInfo: testEnv.store.menuInfo };
|
|
const homeMenu = new HomeMenu(testEnv, props);
|
|
await homeMenu.mount(fixture);
|
|
expect(fixture.innerHTML).toMatchSnapshot();
|
|
});
|