Skip to content

internal: (studio) skip cancelling studio on watched:file:changed #31804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2025

Conversation

mschile
Copy link
Contributor

@mschile mschile commented May 29, 2025

Additional details

  • Skipped calling studioStore.cancel() when the cloud studio is requested
  • Fixed an issue where rerun was getting called twice due to watched:filed:changed being listened to twice. Depending on timing, this would lead to weird behavior where logs were duplicated on the reporter (it appeared there were two event managers running)

Steps to test

  • Verify saving in the cloud studio doesn't cancel studio but still reruns the test
  • Verify modifying the spec on the file system doesn't cancel studio but still reruns the test

How has the user experience changed?

studio_save.mov

PR Tasks

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the runner’s event handling to avoid cancelling studio when a file change should only trigger a rerun, and adds an end-to-end test for the cloud studio scenario.

  • Skip calling studioStore.cancel() on watched:file:changed when studio (local or cloud) is active
  • Remove the generic rerun binding array and explicitly bind only runner:restart and the custom watched:file:changed handler
  • Add a Cypress test to verify cloud studio remains open after spec file changes

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/app/src/runner/event-manager.ts Conditional studioStore.cancel() and explicit rerun event binding
packages/app/cypress/e2e/studio/studio-cloud.cy.ts New test for cloud studio behavior on spec file changes
Comments suppressed due to low confidence (2)

packages/app/cypress/e2e/studio/studio-cloud.cy.ts:209

  • [nitpick] The test description says 'exits studio mode' but the assertion checks that the studio panel remains visible. Consider renaming it to 'does not exit studio mode...' or similar to match the behavior.
it('exits studio mode if the spec is changed on the file system', () => {

packages/app/src/runner/event-manager.ts:161

  • Add a test case covering the scenario when LOCAL_STUDIO_PATH is set (local studio) to ensure that studioStore.cancel() is correctly skipped for local studio as well.
if (!Cypress.env('LOCAL_STUDIO_PATH') && !Cypress.env('ENABLE_CLOUD_STUDIO')) {

Copy link

cypress bot commented May 29, 2025

cypress    Run #62752

Run Properties:  status check passed Passed #62752  •  git commit 5a32613f57: update test title
Project cypress
Branch Review mschile/studio/skip_studio_cancel_on_file_changed
Run status status check passed Passed #62752
Run duration 18m 49s
Commit git commit 5a32613f57: update test title
Committer Matthew Schile
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 8
Tests that did not run due to a developer annotating a test with .skip  Pending 1232
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 32182
View all changes introduced in this branch ↗︎
UI Coverage  46.11%
  Untested elements 189  
  Tested elements 166  
Accessibility  92.74%
  Failed rules  3 critical   9 serious   2 moderate   2 minor
  Failed elements 698  

@mschile mschile merged commit 280c417 into develop May 30, 2025
89 of 91 checks passed
@mschile mschile deleted the mschile/studio/skip_studio_cancel_on_file_changed branch May 30, 2025 20:15
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.

2 participants