test: opravy Playwright testů
CI / Generate TypeScript types (push) Has been cancelled
CI / Server unit tests (push) Has been cancelled
CI / Build server (push) Has been cancelled
CI / Build client (push) Has been cancelled
CI / Playwright E2E tests (push) Has been cancelled
CI / Build and push Docker image (push) Has been cancelled
CI / Notify (push) Has been cancelled
CI / Generate TypeScript types (pull_request) Successful in 14s
CI / Server unit tests (pull_request) Successful in 37s
CI / Build server (pull_request) Successful in 36s
CI / Build client (pull_request) Successful in 35s
CI / Playwright E2E tests (pull_request) Failing after 2m40s
CI / Build and push Docker image (pull_request) Has been skipped
CI / Notify (pull_request) Has been skipped

This commit is contained in:
2026-04-29 21:27:16 +02:00
parent 9383cd7d4c
commit ace4130171
+7 -1
View File
@@ -20,6 +20,8 @@ test.describe.serial('pizza day životní cyklus', () => {
});
test('vytvoří, uzamkne a dokončí pizza day', async ({ page }) => {
// Tento test má více kroků a server při MOCK_DATA=true záměrně zpožďuje scraping pizz o 3s
test.setTimeout(60_000);
await page.goto('/');
await page.waitForLoadState('networkidle');
// Sekce pizza-section se zobrazí jen pokud má uživatel zvolenou možnost "Pizza day"
@@ -30,7 +32,11 @@ test.describe.serial('pizza day životní cyklus', () => {
const createBtn = page.locator('.pizza-section button', { hasText: 'Založit Pizza day' });
await expect(createBtn).toBeVisible({ timeout: 10_000 });
// Čekáme na odpověď API před reloadem jinak by reload přerušil probíhající request
const createResponse = page.waitForResponse(resp => resp.url().includes('/api/pizzaDay/create'));
// Server s MOCK_DATA=true záměrně zpožďuje stahování pizz o 3s, proto velkorysý timeout
const createResponse = page.waitForResponse(
resp => resp.url().includes('/api/pizzaDay/create'),
{ timeout: 15_000 },
);
await createBtn.click();
await createResponse;
await page.reload();