[REF] components: remove .el

This commit is contained in:
Géry Debongnie
2021-12-20 13:54:52 +01:00
committed by Samuel Degueldre
parent a727347d60
commit cca8438d38
17 changed files with 80 additions and 104 deletions
+8
View File
@@ -13,6 +13,7 @@ import {
onWillUpdateProps,
status,
useComponent,
xml,
} from "../src";
import { UTILS } from "../src/app/template_helpers";
import { globalTemplates, TemplateSet } from "../src/app/template_set";
@@ -37,6 +38,9 @@ export function makeTestFixture() {
return fixture;
}
beforeEach(() => {
xml.nextId = 999;
});
export async function nextTick(): Promise<void> {
await new Promise((resolve) => setTimeout(resolve));
await new Promise((resolve) => requestAnimationFrame(resolve));
@@ -185,6 +189,10 @@ export function isDirectChildOf(child: Component, parent: Component): boolean {
return children(parent).includes(child);
}
export function elem(component: Component): any {
return component.__owl__.firstNode();
}
export async function editInput(input: HTMLInputElement | HTMLTextAreaElement, value: string) {
input.value = value;
input.dispatchEvent(new Event("input"));