Skip to content

[YW-360] Upgrade the test coverage#19

Merged
sherryy021229-sys merged 4 commits intomainfrom
YW-360
Oct 23, 2025
Merged

[YW-360] Upgrade the test coverage#19
sherryy021229-sys merged 4 commits intomainfrom
YW-360

Conversation

@sherryy021229-sys
Copy link
Collaborator

upgrade the test coverage

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades test coverage across multiple admin pages and components by adding new test cases, removing placeholder tests, and improving test implementation quality. The changes focus on enhancing coverage for user management, yuan statistics, category management, novels moderation, and various hooks.

Key changes:

  • Added comprehensive test coverage for readers page filters, pagination, and bulk actions
  • Enhanced yuan and yuan statistics tests with totals computation, mixed data shapes, and navigation scenarios
  • Expanded category form and index tests with validation, error handling, and custom actions
  • Improved novels moderation tests covering action flows, loading states, and error scenarios
  • Added extensive coverage for useSearch and useExport hooks
  • Removed placeholder/dummy test files across multiple modules

Reviewed Changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/pages/admin/yuan/yuanstatistics.test.jsx Added tests for header/navigation, totals computation, mixed data shapes, and table pagination
src/pages/admin/yuan/test.jsx Removed placeholder test file
src/pages/admin/yuan/index.test.jsx Removed duplicate header tests, added tests for mixed response shapes and row keys
src/pages/admin/users/writers-columns.test.jsx Removed unused imports and join date column test
src/pages/admin/users/readers.test.jsx Enhanced mock interactivity, added comprehensive filter/pagination/bulk action tests
src/pages/admin/users/readers-columns.test.jsx Removed unused imports and join date column test
src/pages/admin/settings/test.jsx Removed placeholder test file
src/pages/admin/novels/test.jsx Removed placeholder test file
src/pages/admin/novels/moderate.test.jsx Improved table mock to render columns, added action coverage tests
src/pages/admin/library/test.jsx Removed placeholder test file
src/pages/admin/dashboard/test.jsx Removed placeholder test file
src/pages/admin/comments/test.jsx Removed placeholder test file
src/pages/admin/chapters/test.jsx Removed placeholder test file
src/pages/admin/categories/test.jsx Removed placeholder test file
src/pages/admin/categories/index.test.jsx Added tests for custom navigation actions and toggle status error handling
src/pages/admin/categories/categoryform.test.jsx Comprehensive rewrite with validation, loading states, and error scenarios
src/pages/admin/categories/categories.test.jsx Removed placeholder test file
src/index.test.js Added mocks for react-dom/client, antd, and App component
src/hooks/admin/usesearch.test.js Added extensive coverage for search flow, history, suggestions, filtering, and utilities
src/hooks/admin/useexport.test.js Complete rewrite with end-to-end tests for converters, download, and export flows
src/components/admin/modals/editmodal.test.jsx Enhanced validation failure test with console.error spy
src/App.test.js Added comprehensive routing tests for all admin pages

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sherryy021229-sys sherryy021229-sys merged commit 7629bbb into main Oct 23, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants