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

   ## Summary
   
   This PR does two things in one pass: (1) adds a comprehensive E2E test suite 
that documents and guards known failure modes, and (2) fixes every confirmed 
bug the tests surface.
   
   ### New Playwright tests (51 tests, all passing in CI workers=1)
   
   | Directory | Count | What it covers |
   |---|---|---|
   | `regression/` | 19 | Known issue guards: plugin delete confirm, 
cancel-discard warn, empty-plugin config, labels display, crashes, validation |
   | `edge/` | 10 | Input boundaries: XSS, unicode, long names, port ranges, 
URI patterns |
   | `integration/` | 3 | Cross-resource flows: empty state i18n, language 
switch, delete-referenced-upstream |
   | `bulk/` | 2 | Performance: 100-row pagination, 1 000-row search 
responsiveness |
   
   One test (`upstreams.node-sync-on-save`) is marked `.fixme` — the underlying 
bug (#3293) is real but the fix needs deeper work on EditableProTable's 
editable lifecycle.
   
   ### Bug fixes
   
   **#3342 — Plugin delete requires confirmation**
   `PluginCard.tsx`: wraps `onDelete` in a Mantine `openConfirmModal` so users 
can't accidentally remove a plugin by mis-clicking.
   
   **#3344 — Cancel on dirty detail form warns before discarding**
   New `useEditCancelGuard` hook; applied to all 11 resource detail pages 
(routes, upstreams, services, consumers, consumer_groups, credentials, 
global_rules, plugin_configs, protos, secrets, ssls, stream_routes).
   
   **#3370 — Credentials list crash on undefined network response**
   `src/apis/credentials.ts`: guards `e.response === undefined` so an aborted 
request doesn't crash the page.
   
   **Whitespace-only name validation**
   `src/types/schema/apisix/common.ts`: `.trim().min(1)` on name fields rejects 
`"   "` inputs.
   
   ### Test infrastructure fixes
   
   - `deleteAllStreamRoutes` now swallows `"stream mode disabled"` 400s, so 
`deleteAllServices` works in non-stream deployments (fixes cleanup failures in 
CI without stream proxy)
   - `uiFillMonacoEditor` switches from `fill()` to `setValue()` to avoid 
Monaco auto-bracket corruption
   - `uiFillUpstreamRequiredFields` derives `Page` from the `Locator` context 
and adds `force:true` + 300 ms settle between rapid Add Node clicks (fixes 
second/third node race condition)
   - `__root.tsx`: devtools hidden in test mode to avoid UI interference during 
E2E
   
   ## Test plan
   
   - [x] All 51 new tests pass locally with `--workers=1`
   - [x] All existing tests that touch affected code paths pass 
(routes/upstreams/services/consumers/plugin_metadata CRUD, plugin editor 
drawer, hot-path)
   - [x] `pnpm lint` passes with `--max-warnings=0`
   - [x] `pnpm tsc --noEmit` clean
   - [ ] CI green on all non-stream_routes tests (stream_routes require 
`proxy_mode: http&stream` which the e2e compose already configures)
   
   ## Known pre-existing failures (not introduced by this PR)
   
   - `secrets.crud-all-fields`: expects `"Secret Manager"` label that the UI 
doesn't render — pre-existing test gap, unrelated to this PR
   - `stream_routes.*` in non-stream environments: APISIX 400 when stream mode 
is disabled — expected


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