Before this commit, all the custom code for the widgets, form, list and kanban views are always in OWL and have to be migrate to the new JS framework. This commit converts all the widgets, list, kanban and form views used in the project app in OWL. Some JS tours has been adapted according to the OWL views, the project right side panel has been reviewed since it was LegacyComponent (in old component in OWL) task-2944742 Part-of: odoo/odoo#98380
34 lines
1.0 KiB
JavaScript
34 lines
1.0 KiB
JavaScript
/** @odoo-module */
|
|
|
|
import { getFixture } from "@web/../tests/helpers/utils";
|
|
import { makeView, setupViewRegistries } from "@web/../tests/views/helpers";
|
|
|
|
let makeViewParams, target;
|
|
|
|
QUnit.module("Project", (hooks) => {
|
|
hooks.beforeEach(() => {
|
|
makeViewParams = {
|
|
type: "form",
|
|
resModel: "project.project",
|
|
serverData: {
|
|
models: {
|
|
"project.project": {
|
|
fields: {
|
|
id: { string: "Id", type: "integer" },
|
|
},
|
|
records: [{ id: 1, display_name: "First record" }],
|
|
},
|
|
},
|
|
},
|
|
arch: `<form js_class="project_form"><field name="display_name"/></form>`,
|
|
};
|
|
target = getFixture();
|
|
setupViewRegistries();
|
|
});
|
|
QUnit.module("Form");
|
|
QUnit.test("project form view", async function (assert) {
|
|
await makeView(makeViewParams);
|
|
assert.containsOnce(target, ".o_form_view");
|
|
});
|
|
});
|