mirror of
https://github.com/bringout/oca-ocb-project.git
synced 2026-04-20 04:22:03 +02:00
19.0 vanilla
This commit is contained in:
parent
a2f74aefd8
commit
4a4d12c333
844 changed files with 212348 additions and 270090 deletions
|
|
@ -0,0 +1,32 @@
|
|||
import { expect, test } from "@odoo/hoot";
|
||||
import { press } from "@odoo/hoot-dom";
|
||||
import { animationFrame } from "@odoo/hoot-mock";
|
||||
import { mountView } from "@web/../tests/web_test_helpers";
|
||||
|
||||
import { ProjectTask, defineProjectModels } from "./project_models";
|
||||
|
||||
defineProjectModels();
|
||||
|
||||
test("project.task (form): check ProjectTaskPrioritySwitch", async () => {
|
||||
ProjectTask._records = [{ id: 1, priority: "0" }];
|
||||
|
||||
await mountView({
|
||||
resModel: "project.task",
|
||||
type: "form",
|
||||
arch: `
|
||||
<form class="o_kanban_test">
|
||||
<field name="priority" widget="priority_switch"/>
|
||||
</form>
|
||||
`,
|
||||
});
|
||||
|
||||
expect("div[name='priority'] .fa-star-o").toHaveCount(1, {
|
||||
message: "The low priority should display the fa-star-o (empty) icon",
|
||||
});
|
||||
await press("alt+r");
|
||||
await animationFrame();
|
||||
expect("div[name='priority'] .fa-star").toHaveCount(1, {
|
||||
message:
|
||||
"After using the alt+r hotkey the priority should be set to high and the widget should display the fa-star (filled) icon",
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue