Skip to content

test: Onda 7 — cover app components (nodes, Canvas, App); gate to 92/83/91/94 - #32

Open
RVerdiF wants to merge 11 commits into
mainfrom
feat/coverage-onda7
Open

test: Onda 7 — cover app components (nodes, Canvas, App); gate to 92/83/91/94#32
RVerdiF wants to merge 11 commits into
mainfrom
feat/coverage-onda7

Conversation

@RVerdiF

@RVerdiF RVerdiF commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Onda 7 — cobertura do app renderer (alvo 60%+ estourado)

⚠️ Stacked PR: esta branch contém os commits do #31 (feat/e2e-ci). Após o merge do #31, o diff deste PR encolhe automaticamente para a Onda 7.

Resultado

Métrica Antes Depois
Statements 51.2% 94.76%
Branches 49.6% 85.91%
Functions 48.3% 94.31%
Lines 51.7% 97.05%
Testes 589 896

O que entrou (só testes + ratchet, produção intocada)

  • 7a nós do app: TerminalNode 98.8%, NoteNode 96.8%, PortalNode 96.6%, FileTreeNode 100%, FloorBar 100%
  • 7b Canvas (2109 linhas): 0% → 92.15%, incl. harnesses e2e query-param-gated (?smoke, ?fileopstest, ?layouttest…)
  • 7c App 99.6%, CodeEditor 89.9%, GitDiffView/GitGraphView/GitBranchMenu/dnd 100%
  • Ratchet: thresholds 48/46/45/48 → 92/83/91/94

Validação

  • 896 testes / 54 arquivos verdes; typecheck e lint 0 erros

Findings (sem fix — registrados para PR futuro)

  • Bug latente NoteNode.onPaste: lê e.currentTarget após awaits (TypeError; feature deferida v0.3)
  • NoteImage data: URI — ramo morto (react-markdown sanitiza)
  • Harnesses do Canvas acoplados a sleeps fixos

RVerdiF added 11 commits August 13, 2026 18:25
Boots the packaged Electron app under Xvfb (ubuntu runner) and runs
e2e/app.spec.ts, e2e/canvas.spec.ts and e2e/portal.spec.ts. The specs
launch .vite/build/main.js, so the job builds with electron-forge
package first; playwright install-deps provides the system libs (no
browser download — Electron ships via npm).
GitHub Actions runners run as root in a container, where Chromium's SUID
sandbox helper is unavailable and the app never opens a window. Pass
--no-sandbox only when process.env.CI is set; local runs are unchanged.
Coverage (suite 553 tests / 42 files, all green):
- icons.tsx 37% -> 100% (39 tests)
- Panel.tsx 45% -> 93%, Composer.tsx 63% -> 99%, TerminalPalette.tsx 70% -> 100%
- presetStore.ts 64% -> 100%, skillInstall.ts 55% -> 100%
- fsService.ts 80% -> 100%, gitService.ts 65% -> 99% (lines/funcs 100%)

e2e CI: shared launchApp() helper adds --no-sandbox --disable-gpu
--disable-dev-shm-usage on CI runners (root container); ELECTRON_ENABLE_LOGGING
surfaces app stderr for diagnosable failures. Local launches unchanged.
The runner log only showed a silent firstWindow timeout; the Electron
child's own output was swallowed. Attach listeners on launch so the next
run reveals the actual boot failure.
@RVerdiF
RVerdiF requested a review from caribeedu August 14, 2026 23:10
@RVerdiF RVerdiF self-assigned this Aug 14, 2026
@RVerdiF RVerdiF added the tests Test coverage, CI and quality-gate changes (no user-facing behavior) label Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Test coverage, CI and quality-gate changes (no user-facing behavior)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant