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

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

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

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>
batmanisko added 1 commit 2026-04-29 00:26:36 +02:00
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
fe6bb3290e
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>
batmanisko added spent time 30 minutes 2026-04-29 00:28:05 +02:00
batmanisko added the Vylepšení label 2026-04-29 00:28:21 +02:00
batmanisko self-assigned this 2026-04-29 00:28:31 +02:00
Author
Member

Session
Total cost: $12.98
Total duration (API): 35m 41s
Total duration (wall): 1h 34m 1s
Total code changes: 1283 lines added, 92 lines removed
Usage by model:
claude-haiku-4-5: 879 input, 37 output, 0 cache read, 0 cache write ($0.0011)
claude-opus-4-7: 549 input, 46.6k output, 1.6m cache read, 323.3k cache write ($3.97)
claude-sonnet-4-6: 162 input, 82.9k output, 20.4m cache read, 439.5k cache write ($9.01)

Session Total cost: $12.98 Total duration (API): 35m 41s Total duration (wall): 1h 34m 1s Total code changes: 1283 lines added, 92 lines removed Usage by model: claude-haiku-4-5: 879 input, 37 output, 0 cache read, 0 cache write ($0.0011) claude-opus-4-7: 549 input, 46.6k output, 1.6m cache read, 323.3k cache write ($3.97) claude-sonnet-4-6: 162 input, 82.9k output, 20.4m cache read, 439.5k cache write ($9.01)
batmanisko added 1 commit 2026-04-29 18:34:24 +02:00
fix: oprava HTTP_REMOTE_TRUSTED_IPS pro CI Playwright
ci/woodpecker/push/workflow Pipeline failed
ci/woodpecker/pr/workflow Pipeline was canceled
d3224a36d5
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>
batmanisko added 2 commits 2026-04-29 19:08:04 +02:00
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>
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
bfe819020d
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>
batmanisko added 1 commit 2026-04-29 19:31:26 +02:00
batmanisko added 1 commit 2026-04-29 19:34:35 +02:00
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
99260a3250
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
batmanisko added 1 commit 2026-04-29 19:39:52 +02:00
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
2067c21a29
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
batmanisko added 1 commit 2026-04-29 19:43:15 +02:00
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
e83cf14594
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
batmanisko added 1 commit 2026-04-29 19:46:25 +02:00
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
d91c48c599
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
mates added 1 commit 2026-04-29 19:56:20 +02:00
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
85cda34881
mates added 1 commit 2026-04-29 20:06:21 +02:00
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
ec6df8700b
mates added 1 commit 2026-04-29 20:16:16 +02:00
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
f400d1c5f2
mates added 1 commit 2026-04-29 20:29:28 +02:00
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
e9c570b3d5
mates added 1 commit 2026-04-29 20:42:00 +02:00
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
ecbbeb2cec
mates added 1 commit 2026-04-29 20:48:07 +02:00
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
d7c8a4663d
mates added 1 commit 2026-04-29 21:04:02 +02:00
test: opravy Playwright testů
CI / Playwright E2E tests (push) Blocked by required conditions
CI / Build and push Docker image (push) Blocked by required conditions
CI / Notify (push) Blocked by required conditions
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
db1fe473cd
mates force-pushed feat/tests from 1e13a1d02b to db1fe473cd 2026-04-29 21:04:02 +02:00 Compare
Some checks are pending
CI / Playwright E2E tests (push) Blocked by required conditions
CI / Build and push Docker image (push) Blocked by required conditions
CI / Notify (push) Blocked by required conditions
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
This pull request has changes conflicting with the target branch.
  • .woodpecker/workflow.yaml
  • server/jest.config.js
  • server/src/tests/auth.test.ts
  • server/src/tests/pizza.test.ts
  • server/src/tests/voting.test.ts
  • server/tsconfig.json
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/tests:feat/tests
git checkout feat/tests
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Total Time Spent: 30 minutes
batmanisko
30 minutes
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Marbes/Luncher#54