diff --git a/addons/website/static/src/core/website_core.js b/addons/website/static/src/core/website_core.js index 31a959ce428b1..426529b4faf30 100644 --- a/addons/website/static/src/core/website_core.js +++ b/addons/website/static/src/core/website_core.js @@ -52,9 +52,6 @@ class WebsiteCore { }; this.owlApp = new App(null, appConfig); } - if (!this.active) { - return; - } const root = this.owlApp.createRoot(C, { props: null, env: this.env }); this.roots.push(root); const compElem = document.createElement("owl-component"); diff --git a/addons/website/static/tests/core/website_core.test.js b/addons/website/static/tests/core/website_core.test.js index 9a61b4351c641..ce87534ca5ad6 100644 --- a/addons/website/static/tests/core/website_core.test.js +++ b/addons/website/static/tests/core/website_core.test.js @@ -3,6 +3,7 @@ import { animationFrame } from "@odoo/hoot-mock"; import { Interaction } from "@website/core/interaction"; import { startInteraction } from "./helpers"; +import { Component, xml } from "@odoo/owl"; test("wait for translation before starting interactions", async () => { let flag = false; @@ -35,3 +36,13 @@ test("starting interactions twice should only actually do it once", async () => await animationFrame(); expect(n).toBe(1); }); + + +test("can mount a component", async () => { + class Test extends Component { + static selector = ".test"; + static template = xml`owl component`; + } + const {el} = await startInteraction(Test, `
`); + expect(el.querySelector(".test").innerHTML).toBe(`