Skip to content

Conversation

@DSingh0304
Copy link

Why submit this pull request?

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What changes will this PR take into?

This PR introduces End-to-End (E2E) tests for the following resources:

  • Consumers: Adds comprehensive E2E tests for the consumer resource, covering creation, updating, and deletion of consumers.
  • Consumer Credentials: Adds E2E tests for managing consumer credentials, including tests for various authentication plugins like key-auth, basic-auth, and jwt-auth.

These tests will help ensure the stability and correctness of the consumer and credentials management functionality in the dashboard.

Related issues

fix/resolve #3093

Checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

- Add Page Object Model for Consumers (e2e/pom/consumers.ts)
- Add list and pagination tests (consumers.list.spec.ts)
- Add CRUD tests with required fields (consumers.crud-required-fields.spec.ts)
- Add CRUD tests with all fields (consumers.crud-all-fields.spec.ts)
- Add deleteAllConsumers() helper function in src/apis/consumers.ts

All tests follow the established pattern:
- *.list.spec.ts for list page and pagination
- *.crud-required-fields.spec.ts for basic CRUD operations
- *.crud-all-fields.spec.ts for comprehensive CRUD with all fields

Tests cover:
- Navigation and page assertions
- Form validation
- Create, Read, Update, Delete operations
- Labels management with tags input
- Pagination with table controls and URL params

Fixes username validation by using only allowed characters [a-zA-Z0-9_-]
- Add credentialsPom for page object model
- Add comprehensive test suite for credentials CRUD operations
- Test credential isolation between consumers
- Test empty state handling
- Configure serial mode to avoid race conditions

All 8 tests passing
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.

Test(resource): consumer and credentials

1 participant