Skip to content

test(dashboard): reactivate request logger coverage - #13843

Merged
diegosouzapw merged 3 commits into
diegosouzapw:release/v3.8.51from
pacocartones:test/reactivate-request-logger
Sep 17, 2026
Merged

diegosouzapw merged 3 commits into
diegosouzapw:release/v3.8.51from
pacocartones:test/reactivate-request-logger

Conversation

@pacocartones

Copy link
Copy Markdown
Contributor

Summary

  • Align the request-logger visibility and autorefresh regression with current locale and dialog contracts.
  • Remove its exclusion and inventory entry atomically.

Related Issues

Validation

  • Change type: UI
  • Focused tests and category gates from the golden path
  • npm run lint (focused ESLint and Prettier checks)
  • Reconciled with the current active release base; candidate routes are untouched and merge clean
  • No production code changed

Focused suite 6/6; Prettier; ESLint; dashboard typecheck adds no errors.

Tests Added Or Updated

  • tests/unit/ui/request-logger-autorefresh-visibility-3972.test.tsx
  • Removed the matching entries from vitest.config.ts and config/quality/vitest-exclusions.json.

Coverage Notes

This PR restores previously excluded dashboard coverage; no production file changes.

Reviewer Notes

The test preserves its visibility and autorefresh assertions while using the current locale/dialog contracts.

# Conflicts:
#	config/quality/vitest-exclusions.json
#	vitest.config.ts
The drift this PR unblocks is real — the next-intl mock lost its `useLocale`
export in diegosouzapw#7935, so the suite died on `No "useLocale" export is defined`.
Restoring it is the actual fix.

The dialog assertions were also loosened to `[role="dialog"]`, and that part
was not needed: 20 components under src/ render that role, so the selector
stops proving this particular modal is the one on screen. Measured — keeping
only the `useLocale` fix and restoring a precise selector still passes 6/6.

Now asserting `[aria-label="ariaLabel"]`, which is what RequestLoggerDetail.tsx:469
renders (the mock returns the key rather than the translation).
@diegosouzapw

Copy link
Copy Markdown
Owner

Mergeada com um ajuste. O conserto que você identificou é real e é o que destrava a suíte: o mock do next-intl perdeu o export useLocale na #7935, então o arquivo morria com No "useLocale" export is defined.

O que mudei: as asserções de diálogo tinham sido afrouxadas para [role="dialog"], e isso não era necessário. 20 componentes em src/ renderizam esse role, então o seletor deixa de provar que é este modal que está na tela. Medi mantendo só o useLocale e restaurando um seletor preciso: passa 6/6 igual. Agora assere [aria-label="ariaLabel"], que é o que o RequestLoggerDetail.tsx:469 renderiza (o mock devolve a chave, não a tradução).

Também resolvi o conflito com a #13844: a base listava os dois arquivos, esta branch removia a exclusão do request-logger e a #13844 removia a do webhook-wizard — o resultado combinado remove as duas. check:vitest-exclusions fica com 7 restantes e os dois arquivos reativados rodam 13/13.

Sobre a preocupação de estabilidade: rodei a suíte completa quatro vezes e ela oscila entre 25 e 70 falhas na mesma árvore, com conjuntos diferentes a cada rodada. Mas nenhum dos quatro arquivos reativados aparece em nenhuma das quatro listas — eles são estáveis. A instabilidade é da base, não do seu trabalho, e é a mesma dívida que a #13204 rastreia.

@diegosouzapw
diegosouzapw merged commit 9688032 into diegosouzapw:release/v3.8.51 Sep 17, 2026
3 of 7 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
* test(dashboard): reactivate request logger coverage

* test(dashboard): assert the request-logger modal by its own label

The drift this PR unblocks is real — the next-intl mock lost its `useLocale`
export in diegosouzapw#7935, so the suite died on `No "useLocale" export is defined`.
Restoring it is the actual fix.

The dialog assertions were also loosened to `[role="dialog"]`, and that part
was not needed: 20 components under src/ render that role, so the selector
stops proving this particular modal is the one on screen. Measured — keeping
only the `useLocale` fix and restoring a precise selector still passes 6/6.

Now asserting `[aria-label="ariaLabel"]`, which is what RequestLoggerDetail.tsx:469
renders (the mock returns the key rather than the translation).

---------

Co-authored-by: Paco Cartones <pacocartones@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
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