mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] components: re-add a bunch of components tests from owl 1
Some tests are skipped because they rely on not-yet-implemented features.
This commit is contained in:
committed by
Aaron Bohy
parent
900a3ee501
commit
9d5ffe11c7
@@ -190,4 +190,24 @@ describe("t-component", () => {
|
||||
await nextTick();
|
||||
expect(fixture.innerHTML).toBe("<div><div>1<button>Inc</button></div></div>");
|
||||
});
|
||||
|
||||
test.skip("t-component not on a <t> node", async () => {
|
||||
class Child extends Component {
|
||||
static template = xml`<span>1</span>`;
|
||||
}
|
||||
class Parent extends Component {
|
||||
static components = { Child };
|
||||
static template = xml`<div><div t-component="Child"/></div>`;
|
||||
}
|
||||
let error;
|
||||
try {
|
||||
await mount(Parent, fixture);
|
||||
} catch (e) {
|
||||
error = e;
|
||||
}
|
||||
expect(error).toBeDefined();
|
||||
expect(error.message).toBe(
|
||||
`Directive 't-component' can only be used on <t> nodes (used on a <div>)`
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user