Skip to content

test(e2e): bateria abrangente + relatório de auditoria 2026-05-22#85

Closed
adm01-debug wants to merge 1 commit into
mainfrom
claude/e2e-test-battery-9lNtU
Closed

test(e2e): bateria abrangente + relatório de auditoria 2026-05-22#85
adm01-debug wants to merge 1 commit into
mainfrom
claude/e2e-test-battery-9lNtU

Conversation

@adm01-debug
Copy link
Copy Markdown
Owner

@adm01-debug adm01-debug commented May 22, 2026

Sumário

PROMPT-3 — Bateria abrangente de testes E2E focada em validar as melhorias dos PRs #34#43.

Veredito por melhoria

PR Resumo Veredito
#42 SPA rewrite Vercel ✅ Validado por specs novos
#41 OptimizedImage onLoad/onError ⚠️ Spec criado (skip por ausência de creds)
#40 Catálogo: nome real da categoria ⚠️ Spec criado (skip por ausência de creds)
#39 CORS *.vercel.app check:edge-cors 81/81
#36 Supabase URL → projeto correto ✅ Grep defensivo: 0 refs ao projeto antigo
#34 CI: deploy edges sem rate limit 🔵 Fora do escopo E2E — check:no-inline-cors 81/81

Gaps detectados (priorizados no relatório)

  • Crítico — TS baseline drift +118 erros (1380 atuais vs 1262 baseline). Pré-existente; bloqueia CI npm run lint/typecheck.
  • Crítico — 73 novos toast leaks com .message cru vazando ao usuário; npm run check:toast-leaks lista cada arquivo.
  • Moderado — 50 fails na regression pública todos atrelados a auth/Supabase placeholder; sem E2E_USER_EMAIL/PASSWORD o ambiente não exercita ProtectedRoute corretamente.
  • Moderado — 7 fails no smoke gate (OAuth handshake + visual snapshots desatualizados).

Test plan

  • npm run check:edge-cors → 81/81 verde
  • npm run check:no-inline-cors → 81/81 verde
  • npm run check:{route-error-element,aschild-nesting,seller-scope,route-ref-usage} → todos verdes
  • npm run smoke → 1 ok / 2 warn / 0 fail
  • npx playwright test e2e/spa-rewrite.spec.ts --project=chromium-public → 11 pass / 1 skip
  • npm run test:theme-validation → 38/38 pass
  • npm run test:e2e:smoke (chromium-smoke) → 5 pass / 7 fail (todos por OAuth/snapshot — fora do escopo)
  • npm run test:e2e:critical → 2 pass / 4 fail (todos por auth)
  • npm run test:fuzz / test:contract / test:stress → executados em modo simulação

Próximos passos recomendados

  1. Re-deploy de simulation-orchestrator e sync-external-db para propagar o helper de CORS.
  2. Configurar E2E_USER_EMAIL/E2E_USER_PASSWORD no CI para desbloquear ~32 smoke autenticados + os 2 novos do catalog.
  3. Decidir typecheck:baseline:update vs corrigir top-25 ofensores do drift de TS.

https://claude.ai/code/session_011nXFRRG58esCThfczTQuXG


Generated by Claude Code


Summary by cubic

Adds a comprehensive E2E test battery and an audit report validating fixes #34#43. Also standardizes CORS handling across remaining edge functions and corrects script fallbacks to the right Supabase project.

Written for commit acd4550. Summary will update on new commits. Review in cubic

Cobertura nova focada nos fixes #34#43:

- e2e/spa-rewrite.spec.ts (Fix #42): 12 testes que validam que
  /admin/*, /orcamentos/*, /produtos, /colecoes etc. servem index.html
  e não retornam 404 (defesa contra regressão do rewrite Vercel).
  11/12 verdes (1 skip esperado em dev por assets inline).

- e2e/catalog.spec.ts (Fix #40 + #41): +2 testes registrando contratos
  de regressão para "categoria real" (≤5% cards com "Sem categoria")
  e OptimizedImage chaining (<=20% imgs em opacity-0).

CORS gate corrigido nos dois últimos hold-outs:

- supabase/functions/{sync-external-db,simulation-orchestrator}:
  migrar de literais inline para buildPublicCorsHeaders() +
  handleCorsPreflight(). check:edge-cors e check:no-inline-cors agora
  cobrem 81/81 funções.

- scripts/{contract,massive-load}-testing.mjs: fallback URL
  alinhado ao projeto correto (doufsxqlfjyuvxuezpln, fix #36).

docs/AUDITORIA_E2E_2026-05-22.md consolida:
  - veredito por melhoria #34#43
  - matriz de cobertura, projects do Playwright, métricas de perf
  - gaps priorizados (TS baseline drift +118, 73 toast leaks novos)
  - recomendações imediatas/curto/médio prazo

https://claude.ai/code/session_011nXFRRG58esCThfczTQuXG
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9540f627-6759-43af-8622-f3db2185dcae

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/e2e-test-battery-9lNtU

Comment @coderabbitai help to get the list of available commands and usage tips.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
we-dream-big Ready Ready Preview, Comment May 22, 2026 3:11am

@supabase
Copy link
Copy Markdown

supabase Bot commented May 22, 2026

This pull request has been ignored for the connected project doufsxqlfjyuvxuezpln due to reaching the limit of concurrent preview branches.
Go to Project Integrations Settings ↗︎ if you wish to update this limit.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants