sdlc-hub/web/e2e/login.spec.ts
Andrey Epifancev e2c925bff2 docs(web-modules): ARCHITECTURE, CLAUDE.md, README, e2e под модули
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 15:38:46 +04:00

23 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { expect, test } from "@playwright/test";
import { login } from "./hub.ts";
test("неверный токен — пояснение; верный — доска", async ({ page }) => {
await page.goto("/app/jira/board");
await page.getByLabel("Клиентский токен хаба").fill("wrong-token");
await page.getByRole("button", { name: "Войти" }).click();
await expect(page.getByText(/Токен не подошёл/)).toBeVisible();
await login(page);
await expect(page.locator(".card[data-key]").first()).toBeVisible();
});
test("прежние адреса ведут на страницы модулей, /app — на «Обзор»", async ({ page }) => {
await login(page);
await page.goto("/app");
await expect(page).toHaveURL(/\/app\/?\?project=AWPCA$/);
await expect(page.getByTestId("page-overview")).toBeVisible();
await page.goto("/app/board?project=AWPCA");
await expect(page).toHaveURL(/\/app\/jira\/board\?project=AWPCA$/);
await page.goto("/app/issues/AURORA-9001?project=AWPCA");
await expect(page).toHaveURL(/\/app\/jira\/issues\/AURORA-9001\?project=AWPCA$/);
});