import { expect, test } from "@odoo/hoot"; import { contains, defineModels, fields, models, mountView, onRpc, } from "@web/../tests/web_test_helpers"; import { mailModels } from "@mail/../tests/mail_test_helpers"; class AccountBankStatementLine extends models.Model { transaction_details = fields.Json(); _records = [ { id: 1, transaction_details: { name: "Downpayment for your services", amount: 350, status: "posted", identifier: "cb38d10c-4c93-41c7-bbbb-e0f57745cf0a", counter_part: { name: "Azure Interior" }, is_zero_balancing: false, }, }, ]; } defineModels({ ...mailModels, AccountBankStatementLine }); test.tags("desktop"); test("Check Formatted Transactions Details Widget on Desktop", async () => { onRpc( "account.bank.statement.line", "format_transaction_details", () => { return "
name: Downpayment for your services\namount: 350.0\nstatus: posted\nidentifier: cb38d10c-4c93-41c7-bbbb-e0f57745cf0a\ncounter_part: \n name: Azure Interior\nis_zero_balancing: False\n