Skip to content
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

change: Allow Cypress file watching to be disabled using environment variable #9653

Conversation

jdamore-linode
Copy link
Contributor

Description 📝

Allows file watching and automatic reloading to be disabled via an environment variable (including in .env) when using the Cypress UI.

By default, Cypress's UI will automatically reload a test if any changes are made to the spec file which can be disruptive. This PR allows the behavior to optionally be disabled by setting the CY_TEST_DISABLE_FILE_WATCHING environment variable when running Cypress.

Developers can permanently set this behavior by adding it to their .env file.

Major Changes 🔄

  • Reads CY_TEST_DISABLE_FILE_WATCHING environment variable to determine whether or not to disable file watching UI
  • Adds docs for CY_TEST_DISABLE_FILE_WATCHING

How to test 🧪

  1. Run yarn cy:debug
  2. Run a test, and modify and save the corresponding test file; observe that Cypress reloads automatically
  3. Close Cypress, and run it again with the environment variable: CY_TEST_DISABLE_FILE_WATCHING=1 yarn cy:debug
  4. Repeat step 2, confirm that Cypress does not reload automatically

@jdamore-linode jdamore-linode self-assigned this Sep 8, 2023
Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

yessss - thank you 👍 🚢

@jdamore-linode jdamore-linode merged commit b8db204 into linode:develop Sep 12, 2023
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.

3 participants