Skip to content

fix(test): tighten waitForURL in E2E spec 100 to match edit redirect - #1079

Merged
lane711 merged 1 commit into
mainfrom
lane711/sonicjs-release-engineer-v3
Sep 8, 2026
Merged

lane711 merged 1 commit into
mainfrom
lane711/sonicjs-release-engineer-v3

Conversation

@lane711

@lane711 lane711 commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Problem

waitForURL(/\/admin\/content/) in the create test matched the current URL /admin/content/new?collection=example immediately — before the HTMX form submission completed. The subsequent page.goto('/admin/content?collection=example') raced with the in-flight POST, causing net::ERR_ABORTED.

Fix

Wait for the POST success redirect pattern /admin/content/<ID>/edit instead. The create handler redirects to /admin/content/${doc.rootId}/edit?success=... on success, which is unambiguous.

Test plan

  • CI passes for E2E spec 100

🤖 Generated with Claude Code

POST create redirects to /admin/content/<ID>/edit, not the list.
The broad /\/admin\/content/ pattern matched the current new-form URL
immediately, racing with the HTMX submission and causing ERR_ABORTED
on the subsequent page.goto call.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lane711
lane711 merged commit 9700dd5 into main Sep 8, 2026
1 check passed

This branch was previously deployed

1 inactive deployment
internal — 98a29dd2 Deployed Sep 8, 2026 by lane711 via authorize #1563
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.

1 participant