Skip to content

fix(e2e): pause-resume mock contract — itemresource#93

Merged
mastermanas805 merged 1 commit into
mainfrom
fix/pause-resume-e2e-mock-contract
May 16, 2026
Merged

fix(e2e): pause-resume mock contract — itemresource#93
mastermanas805 merged 1 commit into
mainfrom
fix/pause-resume-e2e-mock-contract

Conversation

@mastermanas805
Copy link
Copy Markdown
Member

What

The pause-resume.spec.ts route mock returned {ok, item}, but the agent API's POST /resources/:id/pause|resume actually responds {ok, id, token, status, message, resource} and api.pauseResource() reads r.resource. The stale item key made adaptResource(undefined) throw → confirm()'s catch fired → the modal never closed → the CI playwright job failed on every run (including both retries) on main.

Fix

Mock now returns resource, matching the backend handler (resource.go Pause/Resume) and api/index.ts. Test bug only — no product code touched.

Verification

Full chromium suite locally: 23 passed.

🤖 Generated with Claude Code

The pause-resume.spec.ts route mock returned `{ok, item}`, but the agent
API's POST /resources/:id/pause|resume responds `{ok, id, token, status,
message, resource}` and api.pauseResource() reads `r.resource`. With the
wrong key adaptResource(undefined) threw, confirm()'s catch fired, and the
modal never closed — failing "Pause → confirm → Resume label flips" on
every run (incl. both retries). Mock now returns `resource`, matching the
backend handler (resource.go Pause/Resume) and api/index.ts.

Full chromium suite: 23 passed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mastermanas805 mastermanas805 merged commit c096dd2 into main May 16, 2026
2 checks passed
@mastermanas805 mastermanas805 deleted the fix/pause-resume-e2e-mock-contract branch May 16, 2026 17:16
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