Skip to content

Conversation

@DSingh0304
Copy link
Contributor

@DSingh0304 DSingh0304 commented Nov 15, 2025

Why submit this pull request?

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

What changes will this PR take into?

This PR adds comprehensive E2E test coverage for Stream Routes, which was previously missing from the test suite.

Changes:

  • Add stream_routes.crud-required-fields.spec.ts for minimal CRUD operations testing
  • Add stream_routes.crud-all-fields.spec.ts for extended CRUD with optional fields (server_addr, remote_addr, SNI, labels)
  • Add stream_routes.list.spec.ts for pagination testing
  • Create e2e/utils/ui/stream_routes.ts helper module for stream route form interactions
  • Update stream_routes POM with isIndexPage, isAddPage, isDetailPage assertions and navigation helpers

Test Flow:
All CRUD operations now use the detail page for edit/delete workflows instead of relying on non-existent list-page Edit buttons. Tests verify:

  • Creation automatically lands on detail page (read-only view)
  • Editing works via detail page Edit button
  • Deletion happens through detail page dialog with proper list verification
  • Pagination and list view functionality works correctly

Related issues

fix #3084

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

@DSingh0304
Copy link
Contributor Author

Fixed e2e flakiness: added retry to src/apis/upstreams.ts::deleteAllUpstreams and increased timeouts in stream_routes.ts. I ran CI=true pnpm e2e locally all 27 tests passed.

- Add stream_routes.crud-required-fields.spec.ts for minimal CRUD
- Add stream_routes.crud-all-fields.spec.ts for extended CRUD with optional fields
- Add stream_routes.list.spec.ts for pagination testing
- Create e2e/utils/ui/stream_routes.ts helper for form interactions
- Update stream_routes POM with isIndexPage, isAddPage, isDetailPage assertions

All CRUD operations now use detail page for edit/delete workflows instead of
relying on non-existent list-page Edit buttons. Tests verify creation lands on
detail page, editing works via detail toolbar, and deletion happens through
detail dialog with proper list verification.

Fixes apache#3085
@DSingh0304 DSingh0304 force-pushed the test/stream-routes-clean branch from fb21719 to 5cfc5c2 Compare November 20, 2025 10:54
@SkyeYoung
Copy link
Member

Also pls fix tests

Removed pnpm configuration for onlyBuiltDependencies.
- Explains why retry is needed (transient 500 errors in E2E tests)
- Documents PAGE_SIZE_MIN usage for efficient total count fetching
- Clarifies batch deletion strategy
- Documents 404 handling for idempotency in parallel test execution
@DSingh0304
Copy link
Contributor Author

The CI is fixed; all tests are passing locally.

@DSingh0304 DSingh0304 requested a review from SkyeYoung November 21, 2025 06:10
- Increase uiHasToastMsg timeout to 30s for all toast message assertions
- Increase stream routes navigation timeouts to 30s
- Increase stream routes list cell visibility timeouts to 30s
- Add waitForLoadState after page reload in SSL test
- Increase pagination test timeout to 10s
- Add toast message wait in stream routes CRUD tests

These changes ensure tests pass reliably in slower CI environments while
maintaining the principle that API calls are only used for setup/teardown.

All 76 E2E tests pass successfully with these changes.
…mprove `clearAll` error handling for stream routes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test(resource): stream routes

3 participants