apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

test: add stream route E2E tests with detail page flows

Open DSingh0304 opened this issue 5 months ago • 3 comments

Why submit this pull request?

  • [ ] Bugfix
  • [x] 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:

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

DSingh0304 avatar Nov 15 '25 06:11 DSingh0304

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.

DSingh0304 avatar Nov 19 '25 03:11 DSingh0304

Also pls fix tests

SkyeYoung avatar Nov 21 '25 02:11 SkyeYoung

The CI is fixed; all tests are passing locally.

DSingh0304 avatar Nov 21 '25 06:11 DSingh0304