mirror of
https://github.com/bringout/oca-ocb-pos.git
synced 2026-04-25 06:42:06 +02:00
19.0 vanilla
This commit is contained in:
parent
6e54c1af6c
commit
3ca647e428
1087 changed files with 132065 additions and 108499 deletions
|
|
@ -0,0 +1,22 @@
|
|||
import { test, expect, describe } from "@odoo/hoot";
|
||||
import { setupPosEnv } from "@point_of_sale/../tests/unit/utils";
|
||||
import { LoginScreen } from "@point_of_sale/app/screens/login_screen/login_screen";
|
||||
import { mountWithCleanup } from "@web/../tests/web_test_helpers";
|
||||
import { definePosModels } from "@point_of_sale/../tests/unit/data/generate_model_definitions";
|
||||
|
||||
definePosModels();
|
||||
|
||||
describe("pos_login_screen.js", () => {
|
||||
test("openRegister", async () => {
|
||||
const store = await setupPosEnv();
|
||||
const comp = await mountWithCleanup(LoginScreen, {});
|
||||
comp.openRegister();
|
||||
expect(store.login).toBe(true);
|
||||
});
|
||||
test("backBtnName", async () => {
|
||||
const store = await setupPosEnv();
|
||||
store.login = true;
|
||||
const comp = await mountWithCleanup(LoginScreen, {});
|
||||
expect(comp.backBtnName).toBe("Discard");
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
import { test, expect } from "@odoo/hoot";
|
||||
import { setupPosEnv } from "@point_of_sale/../tests/unit/utils";
|
||||
import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen";
|
||||
import { mountWithCleanup } from "@web/../tests/web_test_helpers";
|
||||
import { definePosModels } from "@point_of_sale/../tests/unit/data/generate_model_definitions";
|
||||
|
||||
definePosModels();
|
||||
|
||||
test("validateOrder", async () => {
|
||||
const store = await setupPosEnv();
|
||||
store.addNewOrder();
|
||||
const orderUuid = store.getOrder().uuid;
|
||||
const comp = await mountWithCleanup(PaymentScreen, {
|
||||
props: { orderUuid },
|
||||
});
|
||||
await comp.validateOrder();
|
||||
const order = store.getOrder();
|
||||
expect(order.employee_id.id).toBe(2);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue