Frun1na opened a new pull request, #4663:
URL: https://github.com/apache/rocketmq-dashboard/pull/4663
## Which Issue(s) This PR Fixes
Fixes #PLACEHOLDER_ISSUE
## Brief Description
The payload preview warned that duplicate property names "would overwrite
the earlier values", but the actual behavior keeps only the first value in both
input modes (form rows skip later duplicates, and the pasted `key=value` text
parser never overwrites an existing key). So the warning text described the
opposite of what happens.
This PR corrects the message to say that only the first value is kept,
renames the test case to match the real behavior, and adds an assertion on the
corrected message so the copy and the behavior can no longer drift apart.
## How Did You Test This Change?
```
cd web
npx vitest run src/utils/messagePayloadPreview.test.ts
```
```
Test Files 1 passed (1)
Tests 13 passed (13)
```
The new assertion fails against the old message and passes after the copy
change.
```
npx tsc --noEmit
npx eslint src/utils/messagePayloadPreview.ts
src/utils/messagePayloadPreview.test.ts
```
Both pass with no output.
## Checklist
- [x] Follows the project's coding style
- [x] Tests cover the changed behavior
- [x] Did not modify unrelated files
--
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]