unbridled-41 commented on PR #4752:
URL:
https://github.com/apache/rocketmq-dashboard/pull/4752#issuecomment-5760011745
### Evidence added in the second commit (`1b23b8cc`)
The first commit's case covered the failure path; the description also
claims the *in-flight* window ("A failed **or in-flight** load now renders the
header, the error and an empty table with the export disabled"). The switch
with a pending request is now pinned as well.
**Teeth, measured against the base source** (only
`web/src/pages/instance/dlq.tsx` reverted to `cd448e17`; the test file
untouched):
```
$ cd web && npx vitest run src/pages/instance/__tests__/DLQPage.test.tsx
--maxWorkers=2
× drops the previous group messages when the next detail load fails
638ms
× clears the previous group messages while the next detail load is in
flight 5570ms
Tests 2 failed | 21 passed (23)
```
Restored immediately afterwards (`git diff --stat` = the test file only),
then:
```
$ npx vitest run src/pages/instance/__tests__/DLQPage.test.tsx --maxWorkers=2
Tests 23 passed (23)
$ npx vitest run src/pages/instance --maxWorkers=2
Test Files 8 passed (8) Tests 171 passed (171)
$ npx tsc -b
# exit 0
$ npx eslint src/pages/instance/dlq.tsx
src/pages/instance/__tests__/DLQPage.test.tsx
✖ 1 problem (0 errors, 1 warning) #
react-refresh/only-export-components on dlq.tsx:82, pre-existing
```
The in-flight case also asserts the pagination total (`共 1 条消息`) is gone, so
it fails on the total alone even if a future change kept the rows hidden but
left the count.
**State of this PR**
- head `1b23b8cc`, 2 commits (`40e43943` fix + `1b23b8cc` test), base
`rocketmq-studio`, MERGEABLE/CLEAN, not merged.
- numstat: `web/src/pages/instance/dlq.tsx +4/-0`, `DLQPage.test.tsx +96/-0`.
- Every claim in the description now has a case: the stale rows in flight,
the stale rows after a failure, the disabled export and the stale total.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]