zjncs commented on PR #5194:
URL:
https://github.com/apache/rocketmq-dashboard/pull/5194#issuecomment-5943763380
Thanks for the review — all three points are addressed in 3f02e34f, plus the
placeholder:
1. **BrokerCluster brought along.** Its cleanup now advances the counter
(`loadRequestId.current += 1`) like every other page, with a comment naming the
exposure you pointed out: `useVisiblePolling` advances the counter between
effect runs, so the rewind needed no user mutation there.
`BrokerCluster.test.tsx` (15 tests) and the Proxy suite both pass.
2. **Toast assertion now pins the suppression.** It asserts on `'Proxy
address added'` — the English string that a fired toast would actually render
after `setLang('en')` — instead of the Chinese one that was trivially absent.
3. **Spinner half is pinned.** The stale-add test asserts the add button has
`ant-btn-loading` while in flight and clears it after the stale response; a new
symmetric test (`clears the remove spinner when a stale remove resolves after a
language switch`) does the same for the per-row remove button, on a fresh
reload that still contains both rows so the row stays mounted and observable.
Both fail if the `finally` blocks are moved back inside the staleness guard —
verified by reverting just those two blocks locally (2 failed → restored →
17/17 green). antd v5 expresses the loading state as the `ant-btn-loading`
class rather than the `disabled` attribute, so the assertions check the class.
4. The `Fixes #<issue-id>` placeholder is removed from the description.
```
$ NODE_OPTIONS=--no-experimental-webstorage npx --prefix web vitest run
--root web src/pages/studio/__tests__/Proxy.test.tsx
src/pages/studio/__tests__/BrokerCluster.test.tsx
Test Files 2 passed (2)
Tests 32 passed (32) # Proxy 17 (15 before + hardened add + new
remove), BrokerCluster 15
$ npx --prefix web tsc -p web --noEmit # clean
```
--
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]