Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .codex/story-4/EVIDENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,13 @@
- Genuine screenshots: favorite-pending.png, favorite-success.png, favorite-rejected.png, favorite-unknown.png, favorite-expired.png.
- Isolated profile identity tested against real backend: favorite POST 200 add and 200 remove, restoring original false state. Error scenarios explicitly intercepted as 400 and aborted response. Read-only recovery never sent another POST; Guest/expired actions sent none.
- Required checks passed: 12 suites / 105 tests; statements 39.59%.
## Batch 2 Task 4 ? comment submission
## Batch 2 Task 4 - comment submission
- Actual local screenshots in .codex/story-4/evidence/: comment-invalid.png, comment-pending.png, comment-success.png, comment-error.png, comment-unknown.png, comment-expired.png. Browser storage profile fixture; real backend POST 201 and personalized latest-three GET 200. Explicit 400 and aborted-response fixtures cover failure recovery. No automatic POST retry; Guest/expiration produced no protected request.
- Verified Enter/Shift+Enter, 501-character rejection, disabled pending controls, empty-after-success, server total 3 and three latest rows, safe textContent rendering, draft preservation, Guest hiding. All required checks passed: 124 tests, 45% statements. Story 3 browser regression passed.
## Batch 2 Task 5 ? comment likes
## Batch 2 Task 5 - comment likes
- Genuine local screenshots: like-pending.png, like-success.png, like-rejected.png, like-unknown.png, like-expired.png, like-guest.png in .codex/story-4/evidence/. Uploaded with task PR.
- Real backend like/unlike returned 200/200; isolated profile identity was restored to original false/count. Personalized reload returned active state. Explicit browser 403/aborted and late-response fixtures tested recovery without repeated toggle or expired UI resurrection. Guest/expired protected requests: zero.
- All required checks passed: 16 suites / 133 tests; 47.21% statements. Story 3 regression passed, no page errors.
## Batch 2 Task 6 - passing tests
- Actual process-output screenshots: .codex/story-4/evidence/passing-tests.png and passing-tests-coverage.png, with corresponding .txt logs. These display captured command stdout/stderr, timestamps and exit codes; they are not simulated terminal output. Both commands exited 0, all 133 tests / 16 suites passed. Coverage: statements 47.21%, branches 49.94%, functions 43.24%, lines 46.94%.
- All six required verification commands passed. Additional real Firebase regression: signUp/update/signIn 200, wrong-password signIn 400, recovery 200; isolated test account deleted. Original Batch 1 authentication evidence files were refreshed locally but Task 6 evidence is test output. CI verification pending PR creation.
3 changes: 2 additions & 1 deletion .codex/story-4/PROGRESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
- PR #38 merged at 845c4ce. Auth guard branch created from updated story-4; valid users blocked for UI/direct/history entry via replaceState. Preserved unknown query/hash and checked invalid/expired recovery before guarding. All checks passed: 93 tests, 34.90% statements. Browser direct/UI/Forward guard and Guest Back/Forward Details/Auth restoration passed.

- PR #39 merged at af700b4. Favorites implemented with personalized GET, exact guarded POST, pending lock, confirmed response state/count, read-only reconciliation after unknown outcomes, stale-session rejection. Fixed erasableSyntaxOnly class syntax and inactive feedback display; all checks passed (105 tests, 39.59%). Browser real add/remove returned 200 and restored isolated identity favorite to false; injected 400 and lost response verified recovery, Guest/expiration sent no POST.
- PR #40 confirmed merged at 846a68f. Comment submission now validates 1?500 trimmed characters, locks input/send, supports Enter/Shift+Enter, retains drafts on failures, and refreshes personalized latest-three comments after confirmed 201. Added textContent rendering and server-total checks. Browser real creation passed; backend strips tags, so harness assertion was corrected without changing app behavior. Three isolated verification comments remain on Cozy Sudoku. All checks passed: 124 tests / 15 suites, 45% statements. Story 3 regression checks passed with no page errors.
- PR #40 confirmed merged at 846a68f. Comment submission now validates 1-500 trimmed characters, locks input/send, supports Enter/Shift+Enter, retains drafts on failures, and refreshes personalized latest-three comments after confirmed 201. Added textContent rendering and server-total checks. Browser real creation passed; backend strips tags, so harness assertion was corrected without changing app behavior. Three isolated verification comments remain on Cozy Sudoku. All checks passed: 124 tests / 15 suites, 45% statements. Story 3 regression checks passed with no page errors.
- PR #41 merged at aba9c4d. Comment likes now use personalized initial state, exact guarded UUID toggle, pending indicator/lock, confirmed state/count, and read-only reconciliation after unknown results. Old controllers disposed before list refresh; late responses cannot restore expired state. All checks passed: 133 tests / 16 suites, 47.21% statements. Browser real like/unlike 200/200 restored original state/count; personalized reload, injected 403/aborted recovery, Guest/expired no POST and late-response expiration verified. Story 3 regression passed.
- PR #42 confirmed merged at c56835c. Final authorized branch passing-tests adds CI checks for lint/format/build and both complete-suite commands plus coverage artifact. All local checks passed: 16 suites, 133 tests, zero failures; 47.21% statements. Genuine execution output screenshots captured from actual subprocess stdout/stderr. Repeated real Firebase registration/displayName update, wrong-password failure and successful login passed; temporary account deleted. No coverage exclusions or dummy tests added.
8 changes: 4 additions & 4 deletions .codex/story-4/TASKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ Prerequisite: PR #30 MERGED at 90dbaa5. Provider enabled status confirmed by own
## RSS-QS-4-2-4 (15 points)

- Official specification: https://github.com/rolling-scopes-school/qualifying-stage/blob/main/tasks/minigames/tasks/story-4/RSS-QS-4-2-4-like-comment-api.md
- Status: VERIFIED
- Status: MERGED
- Branch: comment-likes
- Dependencies: preceding task PR merged; Batch 1 complete.
- Tests: 133 passed, 47.21% statements; genuine screenshots captured; commits f26a430, 28a007e; PR pending; merge pending
- Tests: 133 passed, 47.21% statements; screenshots attached; commits f26a430, 28a007e, e974f61; PR https://github.com/abnzrdev/minigames/pull/42; merge c56835c8c3444ce5c40409393654c594ff849354 (GitHub MERGED)

## RSS-QS-4-4-3 (35 points)

- Official specification: https://github.com/rolling-scopes-school/qualifying-stage/blob/main/tasks/minigames/tasks/story-4/RSS-QS-4-4-3-successful-test-execution.md
- Status: NOT_STARTED
- Status: VERIFIED
- Branch: passing-tests
- Dependencies: preceding task PR merged; Batch 1 complete.
- Tests: pending; screenshots: pending; commits: pending; PR: pending; merge: pending.
- Tests: 133 passed in both commands, 47.21% statements; genuine output screenshots captured; commit 5ebce2e; PR pending; CI pending; merge pending
47 changes: 47 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Verify application

on:
pull_request:
branches: [story-4]
push:
branches: [story-4]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: verify-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
quality:
name: Lint, build and unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- name: Install locked dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Check formatting
run: npm run format:check
- name: Build
run: npm run build
- name: Run all unit tests
run: npm test
- name: Run the same suite with coverage
run: npm run test:coverage
- name: Preserve coverage evidence
uses: actions/upload-artifact@v4
with:
name: unit-test-coverage
path: coverage/
retention-days: 14
if-no-files-found: error
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
The app stores one profile JSON object under localStorage key `minigames:minigames-rsschool:app-session`. Fields: displayName, email, authenticatedAt (Date.now() milliseconds), and optional avatarUrl. Lifetime is exactly five minutes from successful authentication. Reloads and navigation do not renew the timestamp. Firebase identity is separate and never restores the app UI on its own; no passwords or Firebase tokens are stored in this record.

Review expiration by changing authenticatedAt to Date.now() - 300000, then reloading, navigating, or trying a protected action. Only this key is removed. Expiration clears UI state and calls Firebase signOut. Blocked actions are never replayed automatically; Game Details is restored when Auth closes.

## Unit tests

Use Node.js 24 and install the locked dependencies with `npm ci`. Run `npm test` for all TypeScript unit tests, or `npm run test:coverage` for the same suite plus terminal, HTML and JSON coverage reports in `coverage/`. Both commands exit nonzero on assertion failures. Vitest discovers `src/**/*.test.ts`; DOM suites opt into jsdom. Firebase and network boundaries are mocked in unit tests.

The Story 4 verification workflow runs lint, formatting, build and both test commands on pull requests and pushes to `story-4`, preserving coverage as a GitHub Actions artifact for 14 days. On 11.10.2026 both commands passed all 133 tests across 16 suites with zero failures; statement coverage was 47.21%. The dedicated 80% coverage task remains deferred.
Loading