import { expect, test } from "@odoo/hoot"; import { click, edit, queryFirst } from "@odoo/hoot-dom"; import { animationFrame } from "@odoo/hoot-mock"; import { defineModels, fields, models, mountView } from "@web/../tests/web_test_helpers"; class Report extends models.Model { int_field = fields.Integer(); html_field = fields.Html(); _records = [ { id: 1, html_field: /* html */ `
Some content
Some content
"); expect("iframe:iframe .nice_div p:first").toHaveStyle({ color: "rgb(255, 0, 0)", }); await click(".o_field_widget[name=int_field] input"); await edit(264, { confirm: "enter" }); await animationFrame(); expect(queryFirst("iframe:iframe .nice_div")).toHaveInnerHTML("New content
"); });