18 lines
727 B
TypeScript
18 lines
727 B
TypeScript
import { expect, test } from "@playwright/test";
|
||
import { login } from "./hub.ts";
|
||
|
||
test("неверный токен — пояснение; верный — доска", async ({ page }) => {
|
||
await page.goto("/app/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\/board$/);
|
||
});
|