mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
move demo code to examples/
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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();
|
||||
});
|
||||
Reference in New Issue
Block a user