G7 증명과 G8 clean-head 승격 준비
This commit is contained in:
parent
94c681d450
commit
5221f79e3f
52 changed files with 6876 additions and 506 deletions
|
|
@ -85,6 +85,8 @@ interface SessionDetailResponse {
|
|||
session_id: string;
|
||||
theory_mode: string;
|
||||
status: "active" | "ended";
|
||||
started_at: string;
|
||||
ended_at?: string | null;
|
||||
turns?: Array<{
|
||||
speaker: "learner" | "client";
|
||||
text: string;
|
||||
|
|
@ -548,6 +550,8 @@ async function openReviewTab(page: Page, label: "축어록" | "피드백" | "워
|
|||
}
|
||||
|
||||
test.describe("session persistence", () => {
|
||||
test.use({ timezoneId: "Asia/Seoul" });
|
||||
|
||||
test("persists selected CBT theory mode from session UI into DB-backed detail @single-run", async ({
|
||||
page,
|
||||
}) => {
|
||||
|
|
@ -922,6 +926,21 @@ test.describe("session persistence", () => {
|
|||
await expect(page.locator(".sx-utt.is-learner").filter({ hasText: learnerText })).toBeVisible({
|
||||
timeout: 15_000,
|
||||
});
|
||||
const reloadedDetailResponse = await page.request.get(`/api/sessions/${sessionId}`);
|
||||
await expectResponseOk(reloadedDetailResponse);
|
||||
const reloadedDetail = (await reloadedDetailResponse.json()) as SessionDetailResponse;
|
||||
expect(reloadedDetail.status).toBe("active");
|
||||
expect(reloadedDetail.ended_at).toBeNull();
|
||||
expect(reloadedDetail.started_at).toMatch(/(?:Z|[+-]\d{2}:\d{2})$/);
|
||||
const sessionAgeMs = Date.now() - Date.parse(reloadedDetail.started_at);
|
||||
expect(Number.isFinite(sessionAgeMs)).toBe(true);
|
||||
expect(sessionAgeMs).toBeGreaterThanOrEqual(-5_000);
|
||||
expect(sessionAgeMs).toBeLessThan(10 * 60 * 1_000);
|
||||
await expect(
|
||||
page.locator(".sx-session-progress__grid > span").first().locator("b"),
|
||||
).toHaveText(/^0\d:[0-5]\d$/);
|
||||
await expect(page.locator(".sx-timebar.is-over")).toHaveCount(0);
|
||||
await expect(page.getByRole("dialog", { name: "회기 시간이 끝났어요" })).toHaveCount(0);
|
||||
const coachMark = page.locator(".sx-utt.is-learner .sx-utt__coach-mark");
|
||||
await expect(coachMark).toBeVisible({
|
||||
timeout: 15_000,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue