import { setupHTMLBuilder } from "@html_builder/../tests/helpers"; import { expect, test, describe } from "@odoo/hoot"; import { click, queryOne } from "@odoo/hoot-dom"; describe.current.tags("desktop"); test("should not allow edition of currency sign of monetary fields", async () => { await setupHTMLBuilder( `750.00 ` ); expect(":iframe span[data-oe-type]").toHaveProperty("isContentEditable", false); expect(":iframe span.oe_currency_value").toHaveProperty("isContentEditable", true); }); test("clicking on the monetary field should select the amount", async () => { const { getEditor } = await setupHTMLBuilder( ` $ 750.00 ` ); const editor = getEditor(); await click(":iframe span.span-in-currency"); expect( editor.shared.selection.areNodeContentsFullySelected( queryOne(":iframe span.oe_currency_value") ) ).toBe(true, { message: "value of monetary field is selected" }); });