fix: restore GX theme parity and stabilize admin/notification test suites#37
Conversation
…ites - Restore GX preset lightness parity in src/lib/theme-presets.ts (pink-addiction, rose-quartz, hackerman, frutti-di-mare, razer) to zapp-web values; this also fixes derived glass-border tokens and the ThemeInitializer reload/sequence tests. - Fix NotificationDrawer timing tests: repoint vi.mock to @/hooks/ui/useNotifications (the specifier the component actually imports), so useAuth/AuthProvider no longer throws. - Fix brittle AdminTelemetriaPage assertion: the page does not wrap MainLayout (layout comes from routing); assert the page's own marker (page-title-telemetria) instead. - Give the 500-row AdminTelemetria render test a 30s timeout (same convention already used by the heavy test in the same file). Validation: 4/4 target suites green (243 passed, 1 skipped, 0 failed).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughO PR ajusta valores de luminosidade em cinco presets Opera GX para alcançar paridade com zapp, atualiza um caminho de import em mock de teste de notificações, e revisa testes de página admin com novo validador de testid e timeout explícito de 30s. ChangesManutenção de Tema e Testes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR restores Opera GX theme preset lightness values to match the upstream zapp-web presets (fixing derived token/test regressions), and stabilizes a few flaky/red test suites in admin and notifications by correcting mocks and adjusting assertions/timeouts.
Changes:
- Reverted several GX preset
l(lightness) values back tozapp-webparity insrc/lib/theme-presets.ts. - Fixed
NotificationDrawertiming tests by mocking the correctuseNotificationsmodule specifier. - Made
AdminTelemetriaPagetests less brittle by asserting a page-owned marker and extending the heavy 500-row test timeout.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/lib/theme-presets.ts |
Restores GX preset lightness values to match upstream parity. |
tests/components/NotificationDrawer-trigger-to-fetch-timing.test.tsx |
Fixes mock path so the intended hook is actually intercepted during tests. |
tests/pages/AdminTelemetriaPage.test.tsx |
Updates a brittle layout assertion and increases timeout for the heavy 500-row test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Resumo
Restaura a paridade de tema GX e estabiliza as suítes de teste de admin/notification que estavam vermelhas no
main.Mudanças
src/lib/theme-presets.ts— os skinsgx-pink-addiction(60),gx-rose-quartz(68),gx-hackerman(46),gx-frutti-di-mare(42) egx-razer(51) tiveram a lightness baixada "para WCAG", quebrando a paridade com o zapp-web. Revertido para os valores zapp. Isso também conserta os tokens derivadosglass-border(§4) e os testes de reload/sequência do ThemeInitializer (§11).vi.mockapontava para@/hooks/useNotifications, mas o componente importa de@/hooks/ui/useNotifications(via barrel@/hooks/ui). O mock nunca interceptava, então o hook real rodava euseAuthlançavauseAuth must be used within an AuthProvider. Mock repontado para o specifier correto.data-testid="main-layout", mas a página NÃO envelopaMainLayout(o layout vem do roteamento), então o mock nunca era exercido. Asserção trocada para o marcador que a própria página renderiza (page-title-telemetria).Validação
4/4 suítes-alvo verdes localmente:
Estado anterior no
main: 16 falhas.Summary by cubic
Restores GX theme preset lightness to match zapp-web and stabilizes admin/notification test suites. All targeted tests now pass locally.
gx-pink-addiction,gx-rose-quartz,gx-hackerman,gx-frutti-di-mare,gx-razerinsrc/lib/theme-presets.tsto zapp parity; fixes derivedglass-bordertokens and ThemeInitializer reload/sequence tests.vi.mockto@/hooks/ui/useNotifications(was@/hooks/useNotifications) so NotificationDrawer timing tests stub correctly and avoiduseAuthprovider errors.page-title-telemetriainstead ofmain-layout.Written for commit f909b94. Summary will update on new commits. Review in cubic
Summary by CodeRabbit
Notas de Lançamento
Style
Tests