Repository navigation
fix: use sdk-js 5.7.2 so cy.vrtStop() finishes the build - #274
Merged
Merged
Conversation
pashidlos
force-pushed
the
fix/486-vrt-stop
branch
from
October 24, 2026 09:34
35b71a9 to
02c4dee
Compare
Register the plugin, run the VRT_START and VRT_STOP tasks against a
local HTTP server and check the requests the real sdk-js sends: stop
must PATCH the started build with { isRunning: false } (issue #486).
Fails with sdk-js 5.7.1, which sends an empty body. Passes with the
sdk-js fix (Visual-Regression-Tracker/sdk-js#345).
Add an npm test script, keep jest out of the Cypress e2e specs, keep
spec files out of dist and run the unit tests in CI.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sdk-js 5.7.2 sends isRunning: false when stopping a build. Fixes Visual-Regression-Tracker/Visual-Regression-Tracker#486 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pashidlos
force-pushed
the
fix/486-vrt-stop
branch
from
October 24, 2026 10:14
02c4dee to
9a2e3ce
Compare
pashidlos
marked this pull request as ready for review
October 24, 2026 10:14
|
🎉 This PR is included in version 5.7.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
cy.vrtStop()runs without errors, but the build stays Running in VRT (Visual-Regression-Tracker/Visual-Regression-Tracker#486).Root cause
agent-cypress itself is fine: the
VRT_STOPtask awaitsvrt.stop()and reports errors (lib/plugin.ts). The bug is in sdk-js.stop()sendsPATCH /builds/:idwith an empty body, and current backends no longer treat an empty body asisRunning: false. That is fixed in Visual-Regression-Tracker/sdk-js#345 (which supersedes sdk-js#343).agent-cypress pins sdk-js to an exact version (
5.7.0,5.7.1after #273). So Cypress users get the fix only after:This PR
New
lib/plugin.spec.ts: registers the plugin, runs theVRT_STARTandVRT_STOPtasks against a local stub HTTP server and checks the requests the real sdk-js sends. Stop mustPATCH /builds/<id>with{ isRunning: false }. A second test checks that stop does nothing when not started.npm testscript, Jest limited tolib/(thecypress/specs need the Cypress runner), specs excluded fromdist/, unit tests run in CI.@jest/globalsis imported explicitly because the globalexpecttype is Cypress' chai one.Pins
@visual-regression-tracker/sdk-jsto 5.7.2 (published 2026-10-24 via npm trusted publishing), which sends{ isRunning: false }on stop.With sdk-js 5.7.1 the stop test failed (it received
body: {}), reproducing #486. With 5.7.2: 2 passed. Build passes.Keep the
fix:title when squash-merging so semantic-release publishes a new agent-cypress version.Fixes Visual-Regression-Tracker/Visual-Regression-Tracker#486
🤖 Generated with Claude Code