You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "moonming (via GitHub)" <gi...@apache.org> on 2026/05/21 02:58:04 UTC

[PR] test(e2e): regression/edge/integration suite + 4 bug fixes [apisix-dashboard]

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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(e2e): regression suite + form-state refactor (fixes #3293, #3342, #3344, #3370) [apisix-dashboard]

Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop merged PR #3391:
URL: https://github.com/apache/apisix-dashboard/pull/3391


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(e2e): regression/edge/integration suite + 4 bug fixes [apisix-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #3391:
URL: https://github.com/apache/apisix-dashboard/pull/3391#discussion_r3278380728


##########
e2e/server/apisix_conf.yml:
##########
@@ -1,47 +1,26 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
 apisix:

Review Comment:
   ```suggestion
   # Licensed to the Apache Software Foundation (ASF) under one
   # or more contributor license agreements.  See the NOTICE file
   # distributed with this work for additional information
   # regarding copyright ownership.  The ASF licenses this file
   # to you under the Apache License, Version 2.0 (the
   # "License"); you may not use this file except in compliance
   # with the License.  You may obtain a copy of the License at
   #
   #   http://www.apache.org/licenses/LICENSE-2.0
   #
   # Unless required by applicable law or agreed to in writing,
   # software distributed under the License is distributed on an
   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   # KIND, either express or implied.  See the License for the
   # specific language governing permissions and limitations
   # under the License.
   
   apisix:
   ```
   <!-- license-eye hidden identification -->



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org