mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] components: remove .el
This commit is contained in:
committed by
Aaron Bohy
parent
7eaecac0b5
commit
bf9cceb56f
@@ -1,5 +1,5 @@
|
||||
import { Component, mount, onMounted, useState, xml } from "../../src/index";
|
||||
import { makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
||||
import { elem, makeTestFixture, nextTick, snapshotEverything } from "../helpers";
|
||||
import { status } from "../../src/component/status";
|
||||
|
||||
snapshotEverything();
|
||||
@@ -13,7 +13,7 @@ beforeEach(() => {
|
||||
describe("t-on", () => {
|
||||
test("t-on on destroyed components", async () => {
|
||||
const steps: string[] = [];
|
||||
let child;
|
||||
let child: any;
|
||||
class Child extends Component {
|
||||
static template = xml`<div t-on-click="onClick"/>`;
|
||||
setup() {
|
||||
@@ -31,7 +31,7 @@ describe("t-on", () => {
|
||||
state = useState({ flag: true });
|
||||
}
|
||||
const parent = await mount(Parent, fixture);
|
||||
let el = (child as any).el as HTMLElement;
|
||||
let el = elem(child!);
|
||||
el.click();
|
||||
expect(steps).toEqual(["click"]);
|
||||
(parent as any).state.flag = false;
|
||||
|
||||
Reference in New Issue
Block a user