feat: shorten mobile path to activity
CI / backend-and-migrations (push) Canceled after 0s
CI / astro-build (push) Canceled after 0s
CI / compose-e2e (push) Canceled after 0s

This commit is contained in:
ik
2026-09-07 08:10:07 +07:00
parent 5e27a5b066
commit aeef99920a
5 changed files with 38 additions and 15 deletions
+4
View File
@@ -49,11 +49,15 @@ for (const viewport of [{ name: "desktop", width: 1280, height: 900 }, { name: "
await page.goto("/");
await page.getByLabel("Водоём").selectOption("kuori");
await page.getByLabel("Рыба").selectOption("lake-trout");
if (viewport.name === "mobile") await page.getByText("Период и порядок").click();
await page.getByLabel("Период").selectOption("72");
await page.getByLabel("Сначала").selectOption("freshness");
await page.getByRole("button", { name: "⌕ Найти клёв" }).click();
await expect(page).toHaveURL(/waterbody=kuori.*fish=lake-trout.*hours=72.*sort=freshness/);
await expect(page.getByRole("heading", { name: "Горячие точки" })).toBeVisible();
await expect(page.getByLabel("Применённые фильтры")).toContainText("Куори");
await expect(page.getByLabel("Применённые фильтры")).toContainText("Озёрная форель");
await expect(page.getByRole("link", { name: "Сбросить" })).toBeVisible();
await expect(page.locator(".spot-list, .state")).toBeVisible();
const dimensions = await page.evaluate(() => ({ width: document.documentElement.clientWidth, scroll: document.documentElement.scrollWidth }));
expect(dimensions.scroll).toBeLessThanOrEqual(dimensions.width);