zjncs opened a new pull request, #5704:
URL: https://github.com/apache/rocketmq-dashboard/pull/5704
### What
`NoticeBlock` — the advisory line of the AI transcript — had no test. This
adds `NoticeBlock.test.tsx` with 3 tests pinning the contract its own
documentation calls out.
### Why
The component doc draws a deliberate line: a notice is part of the
transcript's furniture and gets the neutral `InfoBanner` treatment, **not** a
yellow antd `Alert` — the project reserves semantic colours for real states,
and a genuine failure arrives as an `error` block rendered by `ErrorBlock`. A
`warn` notice gets a title so it can be spotted while scanning, but keeps the
same neutral chrome. None of that was guarded.
### What is pinned
- an **info** notice renders the message alone, with no title;
- a **warn** notice gets the `注意` title so it can be spotted while scanning,
and keeps the message as the description;
- the neutral banner treatment holds even at warn level — no `ant-alert`
element at all.
### Verification
- New tests on unmodified code: **3/3 green** (`npx vitest run`).
- Discriminating mutations on `NoticeBlock`, vitest result verified red each
time:
1. the warn title dropped — the warn test reddens;
2. the title shown for every level — the info test reddens;
3. the description fed the level instead of the message — both message
assertions redden.
- Restored: 3/3 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]