DSingh0304 opened a new pull request, #3250:
URL: https://github.com/apache/apisix-dashboard/pull/3250

   ### Why submit this pull request?
   
   - [x] New feature provided
   - [x] Improve performance (test coverage)
   
   ### What changes will this PR take into?
   
   This PR adds comprehensive E2E tests for the Consumer Groups resource, 
covering all CRUD operations and list page functionality.
   
   **Test Coverage (5 tests, all passing ✅):**
   
   1. **List page tests** (`consumer_groups.list.spec.ts`) - 3 tests
      - Navigation to consumer groups page
      - Pagination using table controls
      - Pagination using URL search parameters
   
   2. **CRUD with required fields** 
(`consumer_groups.crud-required-fields.spec.ts`) - 1 test
      - Creates consumer group via API with minimal required fields (id + 
plugins)
      - Tests view, edit mode, and delete operations through UI
   
   3. **CRUD with all fields** (`consumer_groups.crud-all-fields.spec.ts`) - 1 
test
      - Creates consumer group with description and basic-auth plugin via UI
      - Tests full CRUD workflow including plugin addition
      - Verifies edit and delete operations
   
   **Files Added:**
   
   - `e2e/pom/consumer_groups.ts` - Page Object Model with navigation helpers 
and assertions
   - `e2e/tests/consumer_groups.list.spec.ts` - List page and pagination tests
   - `e2e/tests/consumer_groups.crud-required-fields.spec.ts` - Required fields 
CRUD tests
   - `e2e/tests/consumer_groups.crud-all-fields.spec.ts` - All fields CRUD 
tests with plugins
   
   **Files Modified:**
   
   - `src/apis/consumer_groups.ts` - Added `deleteAllConsumerGroups` helper for 
test cleanup
   
   **Implementation Details:**
   
   - Consumer Groups require `plugins` field (even if empty object `{}`) per 
APISIX validation
   - Required fields test creates via API due to UI form validation requirements
   - All-fields test demonstrates full UI workflow with plugin configuration 
(basic-auth)
   - Uses Monaco editor for plugin JSON configuration
   - Follows test patterns from routes, upstreams, and ssls tests
   - Proper cleanup with `deleteAllConsumerGroups` helper
   
   **Test Results:**


-- 
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