WIP: feat: přidání testů – Jest unit testy + Playwright E2E + CI pipeline #54

Draft
batmanisko wants to merge 19 commits from feat/tests into master

19 Commits

Author SHA1 Message Date
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
mates d7c8a4663d 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 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 33s
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
2026-04-29 20:48:05 +02:00
mates ecbbeb2cec test: opravy Playwright testů
CI / Generate TypeScript types (push) Successful in 9s
CI / Generate TypeScript types (pull_request) Successful in 11s
CI / Server unit tests (push) Successful in 22s
CI / Build server (push) Successful in 29s
CI / Server unit tests (pull_request) Successful in 25s
CI / Build client (push) Successful in 34s
CI / Build server (pull_request) Successful in 30s
CI / Build client (pull_request) Successful in 32s
CI / Playwright E2E tests (push) Failing after 1m48s
CI / Build and push Docker image (push) Has been skipped
CI / Notify (push) Successful in 4s
CI / Playwright E2E tests (pull_request) Failing after 1m48s
CI / Build and push Docker image (pull_request) Has been skipped
CI / Notify (pull_request) Has been skipped
2026-04-29 20:41:57 +02:00
mates e9c570b3d5 test: opravy Playwright testů
CI / Generate TypeScript types (push) Successful in 9s
CI / Generate TypeScript types (pull_request) Successful in 10s
CI / Server unit tests (push) Successful in 19s
CI / Build server (push) Successful in 24s
CI / Server unit tests (pull_request) Successful in 22s
CI / Build client (push) Successful in 32s
CI / Build server (pull_request) Successful in 25s
CI / Build client (pull_request) Successful in 33s
CI / Playwright E2E tests (push) Failing after 2m3s
CI / Build and push Docker image (push) Has been skipped
CI / Notify (push) Successful in 3s
CI / Playwright E2E tests (pull_request) Failing after 2m19s
CI / Build and push Docker image (pull_request) Has been skipped
CI / Notify (pull_request) Has been skipped
2026-04-29 20:29:25 +02:00
mates f400d1c5f2 fix: notifikace přes ntfy
CI / Generate TypeScript types (push) Successful in 11s
CI / Generate TypeScript types (pull_request) Successful in 10s
CI / Server unit tests (push) Successful in 25s
CI / Build server (push) Successful in 30s
CI / Build client (push) Successful in 45s
CI / Server unit tests (pull_request) Successful in 19s
CI / Build server (pull_request) Successful in 44s
CI / Build client (pull_request) Successful in 40s
CI / Playwright E2E tests (push) Failing after 1m57s
CI / Build and push Docker image (push) Has been skipped
CI / Notify (push) Successful in 4s
CI / Playwright E2E tests (pull_request) Failing after 2m14s
CI / Build and push Docker image (pull_request) Has been skipped
CI / Notify (pull_request) Has been skipped
2026-04-29 20:16:10 +02:00
mates ec6df8700b fix: Discord notifikace i při selhání workflow
CI / Generate TypeScript types (push) Successful in 10s
CI / Generate TypeScript types (pull_request) Successful in 10s
CI / Server unit tests (push) Successful in 21s
CI / Build server (push) Successful in 27s
CI / Server unit tests (pull_request) Successful in 21s
CI / Build client (push) Successful in 34s
CI / Build server (pull_request) Successful in 34s
CI / Build client (pull_request) Successful in 32s
CI / Playwright E2E tests (push) Failing after 2m3s
CI / Build and push Docker image (push) Has been skipped
CI / Discord notification (push) Has been skipped
CI / Playwright E2E tests (pull_request) Failing after 2m23s
CI / Build and push Docker image (pull_request) Has been skipped
CI / Discord notification (pull_request) Has been skipped
2026-04-29 20:06:17 +02:00
mates 85cda34881 fix: instalace types před buildem klienta
CI / Generate TypeScript types (push) Successful in 10s
CI / Generate TypeScript types (pull_request) Successful in 10s
CI / Server unit tests (push) Successful in 20s
CI / Build server (push) Successful in 26s
CI / Server unit tests (pull_request) Successful in 21s
CI / Build client (push) Successful in 33s
CI / Build server (pull_request) Successful in 25s
CI / Build client (pull_request) Successful in 32s
CI / Playwright E2E tests (push) Failing after 3m38s
CI / Build and push Docker image (push) Has been skipped
CI / Discord notification (push) Has been skipped
CI / Playwright E2E tests (pull_request) Failing after 4m16s
CI / Build and push Docker image (pull_request) Has been skipped
CI / Discord notification (pull_request) Has been skipped
2026-04-29 19:56:17 +02:00
batmanisko d91c48c599 fix: instalace types/node_modules před buildem serveru (tsc kompiluje ../types/**)
CI / Generate TypeScript types (push) Successful in 12s
CI / Generate TypeScript types (pull_request) Successful in 9s
CI / Server unit tests (push) Successful in 24s
CI / Build server (push) Successful in 24s
CI / Build client (push) Failing after 26s
CI / Playwright E2E tests (push) Has been skipped
CI / Server unit tests (pull_request) Successful in 18s
CI / Build client (pull_request) Failing after 25s
CI / Build server (pull_request) Successful in 28s
CI / Build and push Docker image (push) Has been skipped
CI / Playwright E2E tests (pull_request) Has been skipped
CI / Discord notification (push) Has been skipped
CI / Build and push Docker image (pull_request) Has been skipped
CI / Discord notification (pull_request) Has been skipped
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 19:46:24 +02:00
batmanisko e83cf14594 fix: downgrade artifact actions na v3 (v4 nepodporováno na Gitea/GHES)
CI / Generate TypeScript types (push) Successful in 19s
CI / Generate TypeScript types (pull_request) Successful in 17s
CI / Build server (push) Failing after 32s
CI / Server unit tests (push) Successful in 34s
CI / Server unit tests (pull_request) Successful in 19s
CI / Build client (push) Failing after 28s
CI / Playwright E2E tests (push) Has been skipped
CI / Build server (pull_request) Failing after 21s
CI / Build and push Docker image (push) Has been skipped
CI / Discord notification (push) Has been skipped
CI / Build client (pull_request) Failing after 24s
CI / Playwright E2E tests (pull_request) Has been skipped
CI / Build and push Docker image (pull_request) Has been skipped
CI / Discord notification (pull_request) Has been skipped
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 19:43:14 +02:00
batmanisko 2067c21a29 fix: instalace yarn přes npm před setup-node (yarn nebyl v PATH)
CI / Generate TypeScript types (push) Failing after 10s
CI / Server unit tests (push) Has been skipped
CI / Build server (push) Has been skipped
CI / Build client (push) Has been skipped
CI / Playwright E2E tests (push) Has been skipped
CI / Build and push Docker image (push) Has been skipped
CI / Generate TypeScript types (pull_request) Failing after 10s
CI / Discord notification (push) Has been skipped
CI / Server unit tests (pull_request) Has been skipped
CI / Build server (pull_request) Has been skipped
CI / Build client (pull_request) Has been skipped
CI / Playwright E2E tests (pull_request) Has been skipped
CI / Build and push Docker image (pull_request) Has been skipped
CI / Discord notification (pull_request) Has been skipped
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 19:39:51 +02:00
batmanisko 99260a3250 fix: oprava YAML chyby v discord-notify kroku (víceřádkový string)
CI / Generate TypeScript types (push) Failing after 1m26s
CI / Server unit tests (push) Has been skipped
CI / Build server (push) Has been skipped
CI / Build client (push) Has been skipped
CI / Playwright E2E tests (push) Has been skipped
CI / Build and push Docker image (push) Has been skipped
CI / Discord notification (push) Has been skipped
CI / Generate TypeScript types (pull_request) Failing after 1m42s
CI / Server unit tests (pull_request) Has been skipped
CI / Build server (pull_request) Has been skipped
CI / Build client (pull_request) Has been skipped
CI / Playwright E2E tests (pull_request) Has been skipped
CI / Build and push Docker image (pull_request) Has been skipped
CI / Discord notification (pull_request) Has been skipped
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 19:34:25 +02:00
batmanisko 091294f7f3 feat: migrace CI z Woodpecker na Gitea Actions
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 19:31:20 +02:00
batmanisko bfe819020d fix: redis-stack-server RC3 → 7.4.0-v1, obnova Redis pro E2E
ci/woodpecker/push/workflow Pipeline failed
ci/woodpecker/pr/workflow Pipeline was canceled
7.2.0-RC3 havaroval kvůli RedisAI modulu (odstraněn ve verzi 7.4).
Stable 7.4.0-v1 RedisAI neobsahuje, RedisJSON zůstává.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 19:07:52 +02:00
batmanisko 467e3c155a fix: E2E testy přepnuty na json storage, odstraněna Redis služba
redis/redis-stack-server:7.2.0-RC3 havaroval v CI kvůli chybě
inicializace RedisAI modulu, takže se server nikdy nepřipojil
a webServer timeout vyprchával. E2E testy testují chování aplikace,
ne storage backend – json storage stačí.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 18:45:26 +02:00
batmanisko d3224a36d5 fix: oprava HTTP_REMOTE_TRUSTED_IPS pro CI Playwright
ci/woodpecker/push/workflow Pipeline failed
ci/woodpecker/pr/workflow Pipeline was canceled
proxy-addr nepodporuje CIDR notaci (0.0.0.0/0), takže server
havaroval při startu. V CI kontejneru se browser připojuje ze
smyčkového rozhraní, takže 127.0.0.1,::1,::ffff:127.0.0.1 stačí.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 18:33:28 +02:00
batmanisko fe6bb3290e feat: přidání testů – Jest unit testy + Playwright E2E + CI pipeline
ci/woodpecker/push/workflow Pipeline was canceled
ci/woodpecker/pr/workflow Pipeline failed
Server:
- Jest unit testy (88 testů): auth, utils, restaurants, service, voting, pizza
- in-memory storage mock pro izolaci testů
- oprava race condition při inicializaci Redis (storageReady promise)
- dev route dostupná i pro NODE_ENV=test
- getStatsMock deterministický (nahrazení Math.random)
- exporty interních helperů pro testovatelnost
- /api/health endpoint pro Playwright readiness check
- tsconfig vylučuje test soubory z produkčního buildu

E2E (e2e/):
- Playwright s Firefoxem + Chromiem
- testy: login, menu, výběr jídla, pizza day životní cyklus, QR/nastavení
- trusted-header auth bypass pro testy, video + trace při selhání

CI (Woodpecker):
- pipeline spouštěna na všech větvích a PR (nejen master)
- redis-stack-server service pro E2E – čistý Redis per větev automaticky
- kroky: unit testy, build, E2E testy (parallel kde možné)
- Docker build zůstává pouze pro master

Co-Authored-By: Claude Opus (extra usage) 4.7 <noreply@anthropic.com>
2026-04-29 00:25:22 +02:00