Extend Self-Serve Studio with vehicle type management, mutation options, and enhanced simulation/debug tools. Update OpenAPI, UI components, and related E2E/unit tests.
This commit is contained in:
@@ -90,6 +90,7 @@ function captureSelfServeGatewayRequests(page) {
|
||||
const captured = {
|
||||
previews: [],
|
||||
summaries: [],
|
||||
answers: [],
|
||||
allowedServices: [],
|
||||
commands: [],
|
||||
};
|
||||
@@ -114,6 +115,8 @@ function captureSelfServeGatewayRequests(page) {
|
||||
captured.previews.push(entry);
|
||||
} else if (url.pathname.endsWith("/department/selfserve/washes/summary")) {
|
||||
captured.summaries.push(entry);
|
||||
} else if (url.pathname.endsWith("/department/selfserve/vehicle/conditions")) {
|
||||
captured.answers.push(entry);
|
||||
} else if (url.pathname.endsWith("/modules/self-serve/lane/services/allowed")) {
|
||||
captured.allowedServices.push(entry);
|
||||
} else if (url.pathname.endsWith("/modules/self-serve/lane/command")) {
|
||||
@@ -387,6 +390,15 @@ test.describe("Self-serve wash", () => {
|
||||
|
||||
await expect(page.getByTestId("self-serve-runtime-error")).toBeHidden();
|
||||
await expect(page.getByTestId("self-serve-action-error")).toBeHidden();
|
||||
expect(requests.answers).toHaveLength(1);
|
||||
expect(requests.answers[0].body).toMatchObject({
|
||||
lane: 7,
|
||||
question: 11,
|
||||
value: true,
|
||||
vehicle_type: 2,
|
||||
activate_machine: false,
|
||||
sync_relay_state: false,
|
||||
});
|
||||
expect(requests.allowedServices).toHaveLength(0);
|
||||
expect(requests.commands).toHaveLength(0);
|
||||
expect(requests.previews.some((entry) => entry.url.searchParams.get("vehicle_type") === "2")).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user