diff --git a/addons/web/static/tests/core/commands/command_service_tests.js b/addons/web/static/tests/core/commands/command_service_tests.js index 61fb53c601d..8cebd1a1ce3 100644 --- a/addons/web/static/tests/core/commands/command_service_tests.js +++ b/addons/web/static/tests/core/commands/command_service_tests.js @@ -20,9 +20,8 @@ import { patchWithCleanup, triggerHotkey, } from "../../helpers/utils"; -import { LegacyComponent } from "@web/legacy/legacy_component"; -const { xml } = owl; +const { Component, xml } = owl; let env; let target; @@ -37,7 +36,7 @@ export async function editSearchBar(searchValue) { await nextTick(); } -class TestComponent extends LegacyComponent { +class TestComponent extends Component { get DialogContainer() { return registry.category("main_components").get("DialogContainer"); } @@ -137,7 +136,7 @@ QUnit.test("useCommand hook when the activeElement change", async (assert) => { } } - class OtherComponent extends LegacyComponent { + class OtherComponent extends Component { setup() { useActiveElement("active"); useCommand("I'm taking the throne", () => {}); @@ -200,7 +199,7 @@ QUnit.test("global command with hotkey", async (assert) => { await nextTick(); assert.verifySteps([globalHotkey, hotkey]); - class MyComponent extends LegacyComponent { + class MyComponent extends Component { setup() { useActiveElement("active"); } @@ -218,7 +217,7 @@ QUnit.test("global command with hotkey", async (assert) => { QUnit.test("data-hotkey added to command palette", async (assert) => { assert.expect(8); - class MyComponent extends LegacyComponent { + class MyComponent extends Component { onClick() { assert.step("Hodor"); } @@ -278,7 +277,7 @@ QUnit.test("access to hotkeys from the command palette", async (assert) => { hotkey, }); - class MyComponent extends LegacyComponent { + class MyComponent extends Component { onClickB() { assert.step("B"); } @@ -831,7 +830,7 @@ QUnit.test("command categories", async (assert) => { QUnit.test("data-command-category", async (assert) => { assert.expect(3); - class MyComponent extends LegacyComponent {} + class MyComponent extends Component {} MyComponent.components = { TestComponent }; MyComponent.template = xml`
@@ -872,7 +871,7 @@ QUnit.test("data-command-category", async (assert) => { }); QUnit.test("display shortcuts correctly for non-MacOS ", async (assert) => { - class MyComponent extends LegacyComponent {} + class MyComponent extends Component {} MyComponent.components = { TestComponent }; MyComponent.template = xml`
@@ -913,7 +912,7 @@ QUnit.test("display shortcuts correctly for MacOS ", async (assert) => { }, }); - class MyComponent extends LegacyComponent {} + class MyComponent extends Component {} MyComponent.components = { TestComponent }; MyComponent.template = xml`
@@ -955,7 +954,7 @@ QUnit.test( overlayModifier: "alt+control", }); - class MyComponent extends LegacyComponent {} + class MyComponent extends Component {} MyComponent.components = { TestComponent }; MyComponent.template = xml`
@@ -988,7 +987,7 @@ QUnit.test("display shortcuts correctly for MacOS with a new overlayModifier", a overlayModifier: "alt+control", }); - class MyComponent extends LegacyComponent {} + class MyComponent extends Component {} MyComponent.components = { TestComponent }; MyComponent.template = xml`