question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve how config changes are handled

See original GitHub issue

Currently, when cypress.json file is changed, we re-open the project and close the browser if it is currently open and running a spec. We do this because a config option like modifyObstructiveCode or chromeWebSecurity could have changed, which requires restarting the project and/or browser. The downside is that the currently running spec is ‘lost’ and the user has to manually re-select it to run their tests again.

When the plugins file is changed, we reload the plugins file and it automatically takes effect without re-opening the project or closing the browser. This is arguably wrong because the user could have changed options that affect the project or the browser. New events coming in 4.0 (run:start, spec:start, etc) will also necessitate the need to ‘restart’ the run (re-open the project). It’s also an issue because it’s not clear to the user that anything has happened when they change their plugins file, so they might think they need to completely quit and re-open Cypress for their changes to take effect.

We should make this consistent and improve the user experience for both these cases by doing the following:

  • On cypress.json/plugins file updates, notify user in the browser that changes have occurred, noting where they occurred (cypress.json, plugins file, etc). These changes will not be loaded yet.
  • In that notification, give the user a button with the option to restart the browser and project. It will re-open the browser with the current spec.

Tasks:

  • Research/design
  • Add change UI to Desktop GUI
  • Add change UI to reporter
  • Reload specs on config change events
  • Review tests, make sure they’re comprehensive

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
flotwigcommented, Jan 23, 2019

I feel like the user knows that they’ve made changes, so we just need to gently remind them that their changes will not be applied until they restart. Some phrasing like: “cypress.json has been modified since starting Cypress. Changes will not take effect until you restart Cypress.”

Looks good in the reporter pane!

0reactions
lilaconleecommented, Jan 23, 2019

Think we’ve got to direct folks to actually click the restart button, maybe something like this?

screen shot 2019-01-23 at 3 09 26 pm screen shot 2019-01-23 at 2 59 43 pm
Read more comments on GitHub >

github_iconTop Results From Across the Web

Handle configuration changes - Android Developers
It is not recommended to handle configuration changes yourself due to the hidden complexity of handling the configuration changes.
Read more >
How to Handle Configuration Changes in Android?
How to Handle Configuration Changes in Android? · Step 1: Create empty activity Android Studio project · Step 2: Adding the required dependencies....
Read more >
Configuration Change - an overview | ScienceDirect Topics
How individual device configuration changes are recorded is important, but the process of reviewing and approving such changes is equally important. Again, from ......
Read more >
Configuration Management Best Practices - Inedo Blog
Software changes rapidly. Configuration management best practices allow organizations to keep track of changes in a way that allows for ...
Read more >
Handling Orientation Changes in Android - Medium
Android does this so that application can reload its resources based on the new configuration. The restart behavior helps application to adapt new ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found