mirror of
https://github.com/bringout/oca-ocb-web.git
synced 2026-04-18 19:32:06 +02:00
web_editor was removed in Odoo 19.0 and replaced by html_editor
and html_builder. The old web_editor was incorrectly included in
the 19.0 vanilla import.
🤖 assisted by claude
16 lines
800 B
JavaScript
16 lines
800 B
JavaScript
import { setupHTMLBuilder, dummyBase64Img } from "@html_builder/../tests/helpers";
|
|
import { expect, test, describe } from "@odoo/hoot";
|
|
import { contains } from "@web/../tests/web_test_helpers";
|
|
|
|
describe.current.tags("desktop");
|
|
|
|
test("image field should not be editable, but the image can be replaced", async () => {
|
|
await setupHTMLBuilder(
|
|
`<div data-oe-model="product.product" data-oe-id="12" data-oe-field="image_1920" data-oe-type="image" data-oe-expression="product_image.image_1920">
|
|
<img src="${dummyBase64Img}" alt="Product Image" style="max-width: 100%;"/>
|
|
</div>`
|
|
);
|
|
expect(":iframe img").toHaveProperty("isContentEditable", false);
|
|
await contains(":iframe img").click();
|
|
expect("span:contains('Double-click to edit')").toHaveCount(1);
|
|
});
|