Initial commit

This commit is contained in:
gsinghpal
2026-02-22 01:22:18 -05:00
commit 5200d5baf0
2394 changed files with 386834 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import { expect, test } from "@odoo/hoot";
import { click, press } from "@odoo/hoot-dom";
import { animationFrame } from "@odoo/hoot-mock";
import { mountWithCleanup, makeMockEnv, defineModels } from "@web/../tests/web_test_helpers";
import { mailModels } from "@mail/../tests/mail_test_helpers";
import { AccountReportLineCellEditable } from "@fusion_accounting/components/account_report/line_cell_editable/line_cell_editable";
// Due to dependency with mail module, we have to define their models for our tests.
defineModels(mailModels);
test("can unformat a value when focus and format when blur", async () => {
const env = await makeMockEnv({
controller: {},
});
await mountWithCleanup(AccountReportLineCellEditable, {
env,
props: {
cell: {
name: "5,702.22",
no_format: 5702.22,
edit_popup_data: {},
},
line: {},
},
});
expect(".o_input").toHaveValue("5,702.22");
await click(".o_input");
await animationFrame();
expect(".o_input").toHaveValue("5702.22");
await press("Enter");
await animationFrame();
expect(".o_input").toHaveValue("5,702.22");
});