Files
goodie/frontend/project/static/tests/project_task_groupby.test.js
Marc 8741282322 Eliminate Python dependency: embed frontend assets in odoo-go
- Copy all OWL frontend assets (JS/CSS/XML/fonts/images) into frontend/
  directory (2925 files, 43MB) — no more runtime reads from Python Odoo
- Replace OdooAddonsPath config with FrontendDir pointing to local frontend/
- Rewire bundle.go, static.go, templates.go, webclient.go to read from
  frontend/ instead of external Python Odoo addons directory
- Auto-detect frontend/ and build/ dirs relative to binary in main.go
- Delete obsolete Python helper scripts (tools/*.py)

The Go server is now fully self-contained: single binary + frontend/ folder.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 23:09:12 +02:00

60 lines
1.8 KiB
JavaScript

import { beforeEach, expect, test } from "@odoo/hoot";
import { mountView, quickCreateKanbanColumn } from "@web/../tests/web_test_helpers";
import { defineProjectModels, ProjectTask } from "./project_models";
defineProjectModels();
const kanbanViewParams = {
resModel: "project.task",
type: "kanban",
arch: `<kanban default_group_by="stage_id" js_class="project_task_kanban">
<templates>
<t t-name="card"/>
</templates>
</kanban>`,
};
beforeEach(() => {
ProjectTask._records = [
{
id: 1,
name: "My task",
project_id: false,
user_ids: [],
date_deadline: false,
},
];
});
test("project.task (kanban): Can create stage if we are in tasks of specific project", async () => {
await mountView({
...kanbanViewParams,
context: {
default_project_id: 1,
},
});
expect(".o_column_quick_create").toHaveCount(1, {
message: "should have a quick create column",
});
expect(".o_column_quick_create.o_quick_create_folded").toHaveCount(1, {
message: "Add column button should be visible",
});
await quickCreateKanbanColumn();
expect(".o_column_quick_create input").toHaveCount(1, {
message: "the input should be visible",
});
});
test("project.task (kanban): Cannot create stage if we are not in tasks of specific project", async () => {
await mountView({
...kanbanViewParams,
});
expect(".o_column_quick_create").toHaveCount(0, {
message: "quick create column should not be visible",
});
expect(".o_column_quick_create.o_quick_create_folded").toHaveCount(0, {
message: "Add column button should not be visible",
});
});