Align unit contracts with latest master routes and POS UI
This commit is contained in:
@@ -74,12 +74,12 @@ describe("edge gateway workspace contract", () => {
|
||||
expect(manageSource).toContain('data-testid="gateway-settings-page"');
|
||||
expect(manageSource).toContain('data-testid="gateway-rotate-confirmation"');
|
||||
expect(manageSource).toContain('data-testid="gateway-delete-confirmation"');
|
||||
expect(managerSource).toContain("const mergeStatisticsSnapshot = (statistics, gateway) =>");
|
||||
expect(managerSource).toContain("const localGateway = findLocalGatewaySnapshot(gatewayId);");
|
||||
expect(managerSource).toContain("if (payload?.gateway && !localGateway)");
|
||||
expect(managerSource).toContain("statisticsSnapshot.value = mergeStatisticsSnapshot(");
|
||||
expect(managerSource).toContain("payload || {},");
|
||||
expect(managerSource).toContain("localGateway || payload?.gateway || null");
|
||||
expect(managerSource).toContain("const refreshStatisticsSnapshot = async (gatewayId = activeGatewayId.value) =>");
|
||||
expect(managerSource).toContain(
|
||||
'statisticsSnapshot.value = payload && typeof payload === "object" ? payload : {};'
|
||||
);
|
||||
expect(managerSource).toContain("if (statisticsSnapshot.value?.gateway) {");
|
||||
expect(managerSource).toContain("setSelectedGatewaySnapshot(statisticsSnapshot.value.gateway);");
|
||||
});
|
||||
|
||||
it("mounts a module workspace and a safe-subset department workspace", () => {
|
||||
|
||||
@@ -312,9 +312,9 @@ describe("SelectVehicleFormPOS", () => {
|
||||
await wrapper.get('[data-testid="expandable-toggle"]').trigger("click");
|
||||
await nextTick();
|
||||
|
||||
expect(wrapper.findAll('[data-testid="customer-search-field-pos-stub"]')).toHaveLength(2);
|
||||
expect(wrapper.findAll('[data-testid="customer-search-new-customer-stub"]')).toHaveLength(2);
|
||||
expect(wrapper.findAll('[data-testid="customer-search-card-payment-stub"]')).toHaveLength(2);
|
||||
expect(wrapper.findAll('[data-testid="customer-search-field-pos-stub"]')).toHaveLength(1);
|
||||
expect(wrapper.findAll('[data-testid="customer-search-new-customer-stub"]')).toHaveLength(1);
|
||||
expect(wrapper.findAll('[data-testid="customer-search-card-payment-stub"]')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it("moves customer selection into the expanded other section for linked vehicles", async () => {
|
||||
@@ -328,8 +328,8 @@ describe("SelectVehicleFormPOS", () => {
|
||||
await wrapper.get('[data-testid="expandable-toggle"]').trigger("click");
|
||||
await nextTick();
|
||||
|
||||
expect(wrapper.findAll('[data-testid="customer-search-field-pos-stub"]')).toHaveLength(1);
|
||||
expect(wrapper.findAll('[data-testid="customer-search-new-customer-stub"]')).toHaveLength(1);
|
||||
expect(wrapper.findAll('[data-testid="customer-search-card-payment-stub"]')).toHaveLength(1);
|
||||
expect(wrapper.findAll('[data-testid="customer-search-field-pos-stub"]')).toHaveLength(2);
|
||||
expect(wrapper.findAll('[data-testid="customer-search-new-customer-stub"]')).toHaveLength(2);
|
||||
expect(wrapper.findAll('[data-testid="customer-search-card-payment-stub"]')).toHaveLength(2);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -8,7 +8,9 @@ const recordPageSource = readFileSync(join(root, "src/views/search/SystemSearchR
|
||||
|
||||
describe("system search generic record route contract", () => {
|
||||
it("registers authenticated generic record route in router", () => {
|
||||
expect(routerSource).toContain('import SystemSearchRecordPage from "@/views/search/SystemSearchRecordPage.vue";');
|
||||
expect(routerSource).toContain(
|
||||
"const SystemSearchRecordPage = lazyView('@/views/search/SystemSearchRecordPage.vue');"
|
||||
);
|
||||
expect(routerSource).toContain("name: 'systemsearchrecord'");
|
||||
expect(routerSource).toContain("path: '/search/system/record/:entityType/:entityId'");
|
||||
expect(routerSource).toContain("component: SystemSearchRecordPage");
|
||||
|
||||
Reference in New Issue
Block a user