feat: shorten mobile path to activity
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user