fix(test): await async data in auditLog test #51

Merged
sarman merged 1 commits from fix/audit-log-test into master 2026-04-20 01:21:57 +00:00
Owner

Summary

  • Fix flaky auditLog.test.tsx that queries role="table" synchronously before async mock data resolves
  • Use findByRole("table") instead of findByText("Audit Log") + getByRole("table") to properly wait for data

Test plan

  • npm run test:run — 94/94 pass (18/18 files)
  • auditLog.test.tsx — 3/3 pass consistently
## Summary - Fix flaky `auditLog.test.tsx` that queries `role="table"` synchronously before async mock data resolves - Use `findByRole("table")` instead of `findByText("Audit Log")` + `getByRole("table")` to properly wait for data ## Test plan - [x] `npm run test:run` — 94/94 pass (18/18 files) - [x] `auditLog.test.tsx` — 3/3 pass consistently
sarman added 1 commit 2026-04-20 00:57:06 +00:00
fix(test): await async data in auditLog test to prevent race condition
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Successful in 1m7s
Test / frontend-typecheck (pull_request) Successful in 1m16s
Test / frontend-tests (pull_request) Successful in 1m48s
Test / rust-clippy (pull_request) Successful in 8m28s
Test / rust-tests (pull_request) Successful in 10m48s
1db21ae3c1
sarman force-pushed fix/audit-log-test from 1db21ae3c1 to 4a0c7957ec 2026-04-20 01:21:45 +00:00 Compare
sarman merged commit 5a12718566 into master 2026-04-20 01:21:57 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sarman/tftsr-devops_investigation#51
No description provided.