test: cover waterbody error states
This commit is contained in:
@@ -17,3 +17,11 @@ test("unknown waterbody slug has a navigable not-found state", async ({ page })
|
||||
await expect(page.getByRole("alert")).toContainText("Такого водоёма нет в справочнике");
|
||||
await expect(page.getByRole("link", { name: "Открыть каталог" })).toHaveAttribute("href", "/waterbodies");
|
||||
});
|
||||
|
||||
test("unknown waterbody/fish pair keeps a clear not-found state", async ({ page }) => {
|
||||
await page.goto("/waterbodies/р-вьюнок/not-a-real-fish");
|
||||
|
||||
await expect(page.getByRole("heading", { name: "Данные не найдены" })).toBeVisible();
|
||||
await expect(page.getByRole("alert")).toContainText("Такого сочетания нет в справочнике");
|
||||
await expect(page.getByRole("link", { name: "Вернуться на главную" })).toHaveAttribute("href", "/");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user