5 Commits

Author SHA1 Message Date
mates 70ed59ab9d test: opravy Playwright testů
CI / Generate TypeScript types (push) Successful in 12s
CI / Generate TypeScript types (pull_request) Successful in 11s
CI / Server unit tests (push) Successful in 23s
CI / Build server (push) Successful in 23s
CI / Server unit tests (pull_request) Successful in 19s
CI / Build client (push) Successful in 34s
CI / Build server (pull_request) Successful in 23s
CI / Build client (pull_request) Successful in 33s
CI / Playwright E2E tests (push) Failing after 2m24s
CI / Playwright E2E tests (pull_request) Failing after 2m14s
CI / Build and push Docker image (push) Has been skipped
CI / Build and push Docker image (pull_request) Has been skipped
CI / Notify (push) Successful in 4s
CI / Notify (pull_request) Has been skipped
2026-04-29 22:06:46 +02:00
mates 6b2deff215 test: opravy Playwright testů
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 / Generate TypeScript types (push) Has been cancelled
CI / Notify (push) Has been cancelled
CI / Generate TypeScript types (pull_request) Successful in 9s
CI / Server unit tests (pull_request) Successful in 19s
CI / Build server (pull_request) Successful in 23s
CI / Build client (pull_request) Successful in 32s
CI / Playwright E2E tests (pull_request) Failing after 2m23s
CI / Build and push Docker image (pull_request) Has been skipped
CI / Notify (pull_request) Has been skipped
2026-04-29 21:40:32 +02:00
mates ace4130171 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
2026-04-29 21:27:16 +02:00
mates 9383cd7d4c fix: oprava použití yarn v Gitea Actions
CI / Generate TypeScript types (push) Successful in 12s
CI / Generate TypeScript types (pull_request) Successful in 10s
CI / Server unit tests (push) Successful in 19s
CI / Server unit tests (pull_request) Has been cancelled
CI / Build server (pull_request) Has been cancelled
CI / Build client (pull_request) Has been cancelled
CI / Playwright E2E tests (pull_request) Has been cancelled
CI / Build and push Docker image (pull_request) Has been cancelled
CI / Notify (pull_request) Has been cancelled
CI / Build server (push) Successful in 32s
CI / Build client (push) Successful in 40s
CI / Playwright E2E tests (push) Failing after 3m24s
CI / Build and push Docker image (push) Has been skipped
CI / Notify (push) Successful in 2s
2026-04-29 21:12:50 +02:00
mates db1fe473cd test: opravy Playwright testů
CI / Generate TypeScript types (push) Successful in 10s
CI / Generate TypeScript types (pull_request) Successful in 9s
CI / Server unit tests (push) Successful in 19s
CI / Build server (push) Successful in 23s
CI / Server unit tests (pull_request) Failing after 7s
CI / Build server (pull_request) Failing after 8s
CI / Build client (pull_request) Failing after 8s
CI / Playwright E2E tests (pull_request) Has been skipped
CI / Build and push Docker image (pull_request) Has been skipped
CI / Notify (pull_request) Has been skipped
CI / Build client (push) Successful in 33s
CI / Playwright E2E tests (push) Failing after 4m13s
CI / Build and push Docker image (push) Has been skipped
CI / Notify (push) Successful in 3s
2026-04-29 21:03:53 +02:00
4 changed files with 17 additions and 10 deletions
+5 -5
View File
@@ -24,7 +24,7 @@ jobs:
with:
node-version: "22"
- run: npm install -g yarn
- run: corepack enable
- run: cd types && yarn install --frozen-lockfile && yarn openapi-ts
@@ -51,7 +51,7 @@ jobs:
with:
node-version: "22"
- run: npm install -g yarn
- run: corepack enable
- uses: actions/download-artifact@v3
with:
@@ -73,7 +73,7 @@ jobs:
with:
node-version: "22"
- run: npm install -g yarn
- run: corepack enable
- uses: actions/download-artifact@v3
with:
@@ -102,7 +102,7 @@ jobs:
with:
node-version: "22"
- run: npm install -g yarn
- run: corepack enable
- uses: actions/download-artifact@v3
with:
@@ -189,7 +189,7 @@ jobs:
with:
node-version: "22"
- run: npm install -g yarn
- run: corepack enable
- uses: actions/download-artifact@v3
with:
-1
View File
@@ -1,5 +1,4 @@
import { test, expect } from '@playwright/test';
import { clearPizzaDay } from './helpers';
test.beforeEach(async ({ page, request }) => {
// Vyčistíme volby dne, aby testy neovlivnily navzájem
+10 -3
View File
@@ -20,17 +20,26 @@ 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"
await page.locator('select').selectOption({ label: 'Pizza day' });
await page.waitForLoadState('networkidle');
// Přijmeme všechny window.confirm() dialogy v celém testu (vytvoření i doručení pizza dne)
page.on('dialog', dialog => dialog.accept());
// --- CREATED ---
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();
@@ -66,8 +75,6 @@ test.describe.serial('pizza day životní cyklus', () => {
// --- DELIVERED ---
const deliverBtn = page.locator('.pizza-section button', { hasText: 'Doručeno' });
await expect(deliverBtn).toBeVisible({ timeout: 5_000 });
// window.confirm dialog Playwright automaticky potvrdí
page.on('dialog', dialog => dialog.accept());
await deliverBtn.click();
await page.waitForLoadState('networkidle');
await expect(page.locator('.pizza-section')).toContainText('doručeny', { timeout: 5_000 });
+2 -1
View File
@@ -141,8 +141,9 @@ router.post("/clear", async (req: Request<{}, any, any>, res, next) => {
const dateKey = formatDate(date);
const data = await storage.getData<any>(dateKey);
// Vymažeme všechny volby
// Vymažeme všechny volby i aktivní pizza day
data.choices = {};
delete data.pizzaDay;
await storage.setData(dateKey, data);