test: enforce first-answer evidence contract

This commit is contained in:
ik
2026-09-21 07:55:09 +07:00
parent f0b63df803
commit a8c01f01e9
3 changed files with 46 additions and 2 deletions
+6
View File
@@ -8,11 +8,17 @@ test("player can complete the first useful answer journey", async ({ page }) =>
const firstCard = page.locator(".spot-card").first();
await expect(firstCard).toBeVisible();
await expect(firstCard).toContainText("Свежесть");
await expect(firstCard).toContainText("Наблюдения");
await expect(firstCard).toContainText("Координаты");
await expect(firstCard.locator(".source-chip").first()).toBeVisible();
await expect(firstCard.getByText("Открыть точку")).toBeVisible();
await firstCard.getByText("Открыть точку").click();
await expect(page.getByRole("heading", { name: /^Точка / })).toBeVisible();
await expect(page.getByRole("heading", { name: "Что взять" })).toBeVisible();
await expect(page.locator("aside .data-passport")).toContainText("Доверие");
await expect(page.locator("aside .data-passport")).toContainText("Наблюдения");
const save = page.getByRole("button", { name: "Сохранить в план" });
await save.click();
await expect(page.getByRole("button", { name: "В плане" })).toHaveAttribute("aria-pressed", "true");