yyqdbngt opened a new pull request, #3824:
URL: https://github.com/apache/rocketmq-dashboard/pull/3824
### Motivation
The existing `alertRules.test.ts` covers the basic CRUD and toggle/delete of
cluster alert rules, but the paged listing, runtime listing and the bulk/test
endpoints of the same API module were untested.
### Changes
- `loads the paged rules and runtime through the cluster path`: page params
(search/page/pageSize) and the runtime list are asserted against
`/cluster-alert-rules/page` and `/runtime`.
- `bulk toggles, bulk deletes and tests rules through the cluster path`:
bulk bodies `{ ids, enabled }`/`{ ids }` and the test body are verified on
`/bulk-toggle`, `/bulk-delete` and `/test`.
### Verification
```
./node_modules/.bin/vitest run src/api/alertRules.test.ts # 5 passed
./node_modules/.bin/tsc --noEmit # clean
./node_modules/.bin/eslint src/api/alertRules.test.ts # 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]