test: isolate unavailable-state regression
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
const unavailableRun = process.env.EXPECT_UNAVAILABLE === "1";
|
||||
|
||||
for (const path of [
|
||||
"/waterbodies",
|
||||
"/waterbodies/vyunok",
|
||||
@@ -11,6 +13,7 @@ for (const path of [
|
||||
"/tackle/items/00000000-0000-0000-0000-000000000000",
|
||||
]) {
|
||||
test(`${path} exposes a cache-safe unavailable state`, async ({ page }) => {
|
||||
test.skip(!unavailableRun, "Run with EXPECT_UNAVAILABLE=1 and an API-unavailable web process.");
|
||||
const response = await page.goto(path);
|
||||
expect(response?.status(), `${path} status`).toBe(503);
|
||||
expect(response?.headers()["retry-after"], `${path} retry header`).toBe("60");
|
||||
|
||||
Reference in New Issue
Block a user