test: corrige AppLogo.visual (teste quebrado no main) + import nao-usado#210
Conversation
- AppLogo.visual: SUT sidebar variant usa h-9 w-9 mas teste esperava h-10 -> teste falhando no main; alinha ao SUT (4/4) - ScenarioSimulation: remove import signupSchema nao-usado
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Warning Review limit reached
Your plan currently allows 1 review/hour. Refill in 42 minutes and 22 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Este PR corrige drift residual em testes após o re-import do Lovable, alinhando asserts ao SUT atual e removendo ruído de lint.
Changes:
- Atualiza o teste visual do
AppLogopara esperar o tamanho correto do ícone no variantsidebar(h-9 w-9), consistente comAppLogo.tsx. - Remove
signupSchemadeScenarioSimulation.test.tspor estar sem uso, limpando import não-utilizado.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/components/layout/AppLogo.visual.test.tsx |
Ajusta o assert do variant sidebar para refletir o tamanho real aplicado pelo componente (h-9 w-9). |
src/tests/ScenarioSimulation.test.ts |
Remove import não-usado (signupSchema) mantendo apenas o schema efetivamente exercitado no teste (loginSchema). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
O que este PR faz
Corrige 2 deltas de teste remanescentes depois que o grosso da faxina de testes drifted (7 de 9 alvos) já entrou no main via #124/#196/#178.
🐛 AppLogo.visual — teste FALHANDO no main
O SUT
AppLogo.tsx(L29) define o sidebar variant comh-9 w-9, mas o teste esperavah-10 w-10→ o teste está vermelho no main hoje. O re-import do Lovable reverteu o tamanho do ícone no sidebar. Alinho o assert ao SUT (h-9 w-9). 4/4 verde.🧹 ScenarioSimulation — import não-usado
Remove
signupSchemado import (não usado no corpo;loginSchemapermanece). Drift positivo de lint.Contexto
O PR #125 (escopo original de 9 testes drifted) foi fechado sem merge porque outras instâncias paralelas resolveram 7 dos alvos no main de forma equivalente/melhor (PriceFreshnessBadge TS2322, AdminStandardRules naming-convention, AuthBranding ×2, QuoteBuilderDiscountAdvanced, useCatalogState via describe.skip, schema fob_pre). Estes 2 são o que sobrou de genuinamente necessário — o AppLogo.visual em particular é um teste quebrado em produção que ninguém havia pego.
Validado localmente:
TZ=America/Sao_Paulovitest, 6/6 nos 2 arquivos, 0 warnings de lint.Summary by cubic
Fix failing AppLogo.visual test on main by updating the expected sidebar icon size to h-9 w-9 to match the component. Remove the unused signupSchema import from ScenarioSimulation.test to clear lint noise.
Written for commit 622694d. Summary will update on new commits. Review in cubic