mbolotov / intellij-cypress

IntelliJ-Cypress plugin: https://plugins.jetbrains.com/plugin/13819-intellij-cypress Pro version: https://plugins.jetbrains.com/plugin/13987-cypress-support-pro
MIT License
35 stars 5 forks source link

Cypress runner disables watch mode #54

Closed martaver closed 2 years ago

martaver commented 2 years ago

Heya, thanks for this plugin I've purchased a subscription :) It's nice to have cypress native in WebStorm!

I've noticed that your plugin appends watchForFileChanges=false to CLI config args, even when being run in "interactive mode"... this is pretty annoying, since I'd like to use the same session for development and debugging, but now in order to re-run my tests when file changes are made I have to run cypress from terminal in open mode and separately debug when I find a problem.

Ideally, I'd just like to develop with a debugger attached, and just add breakpoints when necessary without breaking the flow.

Can we remove the watchForFileChanges=false arg from the CLI commands passed to cypress?

mbolotov commented 2 years ago

Hi Sebastian! Thanks for the reports! I added forced setting to disable watchForFileChanges because I found this auto-restart a bit annoying when I continue to edit test code and Cypress restarts the test in background. I wanted to control the time when to make a restart. But I agree that watchForFileChanges option may be useful for other users besides me =)

I think I will add an option in the run config UI to manage this behavior.

As for the run/debug flow, I think you've just missed the Fast test restart feature of the plugin. You can just launch your run configuration again, and it will relaunch the test using the same browser instance. Moreover, it supports the same behavior when you start a debug session.

I think I will create an video overview of this feature as it might be missed by many users.

mbolotov commented 2 years ago

I decided to not include watchForFileChanges option in run UI. So it will be true by default and can be redefined in the Cypress config file if needed. @martaver, could you please check if this bundle works as you expected? Cypress Support Pro-2.4.0-SNAPSHOT-1.zip

mbolotov commented 2 years ago

fixed in 2.4.0 version