yyqdbngt opened a new pull request, #3816:
URL: https://github.com/apache/rocketmq-dashboard/pull/3816

   ### Motivation
   
   The existing `studioUsers.test.ts` covers the read path (filtered page and 
paginated export). The write endpoints — create, enable toggle and password 
reset — plus the empty-page export short-circuit were untested.
   
   ### Changes
   
   - `stops exporting when the first page is empty`: an empty first page 
returns immediately with one request.
   - `creates a studio user with the provided credentials`: posts 
username/password/admin and returns the created user.
   - `toggles the enabled state through the status endpoint`: posts `{ enabled 
}` to `/studio-users/:id/status` and returns the updated user.
   - `resets the password through the password endpoint`: posts the new 
password to `/studio-users/:id/password`.
   
   ### Verification
   
   ```
   ./node_modules/.bin/vitest run src/api/studioUsers.test.ts   # 6 passed
   ./node_modules/.bin/tsc --noEmit                             # clean
   ./node_modules/.bin/eslint src/api/studioUsers.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]

Reply via email to