test(e2e): give the stand smoke data assertion a real-backend timeout

The only data assertion on the stand tier ran on Playwright's 5s default expect
timeout — the config overrides only the screenshot timeout — so a healthy but
slow stand backend serving the list a little late would fail the smoke falsely.
Give it a 30s budget, matching the real-backend nature of the tier.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Sergey Kozyrenko
2026-07-25 03:48:24 +07:00
co-authored by Claude Opus 4.8
parent dc7eedfae4
commit 44d471f290
+7 -1
View File
@@ -11,6 +11,10 @@ const ROUTES = [
{ emptyTitle: 'No API tokens configured', path: '/settings/api-tokens', title: 'API Tokens' },
];
// The data assertion waits on a real backend query, so it must not run on the 5s default expect
// timeout — a healthy but slow stand would flake. The config overrides only the screenshot timeout.
const STAND_DATA_TIMEOUT = 30_000;
test.describe('stand smoke', { tag: '@stand' }, () => {
for (const { emptyTitle, path, title } of ROUTES) {
test(`renders ${path} without a page error`, async ({ page }) => {
@@ -29,7 +33,9 @@ test.describe('stand smoke', { tag: '@stand' }, () => {
// settings-sidebar <a> at runtime, the breadcrumb title is a span.
await expect(page.locator('span[aria-current="page"]')).toHaveText(title);
// Either branch: a query error renders neither, and a stand may hold no rows.
await expect(page.locator('[data-slot="table"]').first().or(page.getByText(emptyTitle))).toBeVisible();
await expect(page.locator('[data-slot="table"]').first().or(page.getByText(emptyTitle))).toBeVisible({
timeout: STAND_DATA_TIMEOUT,
});
expect(pageErrors, `uncaught errors on ${path}`).toEqual([]);
});
}