zjncs opened a new pull request, #5708:
URL: https://github.com/apache/rocketmq-dashboard/pull/5708
### What
`RuntimeNotices` — the page-level notices between the transcript and the
composer — had no test. This adds `RuntimeNotices.test.tsx` with 6 tests
pinning the severity discipline its own documentation spells out.
### Why
The component doc draws a three-way severity line that nothing guarded: the
mock-mode explanation is an `Alert type="info"` (legacy banner), the
missing-rmqctl notice is the neutral `InfoBanner` (never a yellow warning Alert
— nothing is wrong, a capability is simply absent), and a run error is
genuinely semantic and gets `Alert type="error"`.
### What is pinned
- mock mode shows the info Alert and **suppresses the missing-rmqctl banner
even when rmqctl is also missing** — the AI page does not participate in mock
mode, so the capability notice is moot;
- real mode without rmqctl shows the neutral banner, with no coloured
`ant-alert` at all;
- real mode with rmqctl shows neither notice;
- a run error gets the semantic error Alert carrying the error text;
- an empty run error renders no error alert;
- a healthy runtime renders nothing at all.
### Verification
- New tests on unmodified code: **6/6 green** (`npx vitest run`).
- Discriminating mutations on `RuntimeNotices`, vitest result verified red
each time:
1. the mock alert dropped — red;
2. the mock guard removed from the rmqctl banner so it shows in mock mode
too — red;
3. the run-error condition inverted — red.
- Restored: 6/6 green. Test-only change; no product code touched.
--
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]