diff --git a/tests/smoke/uat-smoke.spec.mjs b/tests/smoke/uat-smoke.spec.mjs index bde4da8..0b32aa1 100644 --- a/tests/smoke/uat-smoke.spec.mjs +++ b/tests/smoke/uat-smoke.spec.mjs @@ -183,8 +183,10 @@ test("public API and disposable learner journey", async () => { const { data: cases } = await call("/api/ccs/cases", { token }); expect(Array.isArray(cases)).toBeTruthy(); expect(cases.length).toBeGreaterThan(0); + const managementCase = cases.find((item) => item.experienceMode === "management"); + expect(managementCase, "UAT requires a published management CCS case for the smoke journey").toBeTruthy(); const { data: attempt } = await call("/api/ccs/attempts", { - method: "POST", token, body: { caseExternalId: "", mode: "timed" } + method: "POST", token, body: { caseExternalId: managementCase.externalId, mode: "timed" } }); activeCcsAttempt = attempt.id; expect(activeCcsAttempt).toBeTruthy(); @@ -204,6 +206,8 @@ test("public API and disposable learner journey", async () => { } }); expect(opened.openingCompleted).toBe(true); + expect(Array.isArray(opened.availableExams)).toBeTruthy(); + expect(opened.availableExams.length, "management CCS smoke case must expose at least one exam").toBeGreaterThan(0); const exam = opened.availableExams[0]; const { data: examined } = await call(`/api/ccs/attempts/${activeCcsAttempt}/commands/batch`, { method: "POST", token, body: {