Update self-serve lane checks to include availability and self-serve status validation

This commit is contained in:
Jeppe Bundgaard
2026-06-29 15:45:59 +02:00
parent 4ab49794de
commit b2f6165ae3
+4 -3
View File
@@ -89,9 +89,10 @@ describe("MyWashStart.vue production recovery contracts", () => {
expect(source).toContain("isAllowedSelfServeValue(selfServeSession.value?.allowed)");
expect(source).toContain("selfServeSession.value?.lane_id");
expect(source).toContain("getAllowedSelfServeLaneIds().has(laneId)");
expect(source).toContain(
'(isCurrentActiveWashLane(lane) || isCurrentAllowedSelfServeLane(lane) || lane.status === "AVAILABLE")'
);
expect(source).toContain("if (isCurrentActiveWashLane(lane) || isCurrentAllowedSelfServeLane(lane))");
expect(source).toContain("return isLaneSelfServeEnabled(lane);");
expect(source).toContain('Object.prototype.hasOwnProperty.call(lane || {}, "selfserve_available")');
expect(source).toContain('return lane?.status === "AVAILABLE" && isLaneSelfServeEnabled(lane);');
});
it("does not auto-complete active washes from polling before the customer completes them", () => {