I frequently use byebug to create breakpoints where I can fiddle with the correct capybara command while writing/editing tests. It seems that when I do this, my test will freeze. It seems to be inconsistent. Sometimes it happens, other times it doesn't - sorry for the lack of reproducible case. I've seen this happens with the headless option set to either true or false.
Here's what I do:
1) Add byebug somewhere in my test suite
2) run the test with: ./bin/rails test path/to/test.rb
3) watch browser open, test run and wait for breakpoint
4) attempt some finder at the byebug promt (for example: find('#some_ele'))
5) test freezes(?) - the command doesn't return. Nothing happens in the browser.
I cannot do anything at this point. crtl-c doesn't stop the running test, using kill <pid> doesn't work either. I have to resort to kill -9 <pid>
As stated above, I still don't have a concrete reproducible test case. In some test runs, using the same breakpoint and the same finder command it works. Other times it does not. I'd say it happens about 50% of the time.
perhaps unsurprising, but worth mentioning, when I kill -9 the process, the browser (chrome) is left open. I also cmd-q that before attempting a second run.
I frequently use byebug to create breakpoints where I can fiddle with the correct capybara command while writing/editing tests. It seems that when I do this, my test will freeze. It seems to be inconsistent. Sometimes it happens, other times it doesn't - sorry for the lack of reproducible case. I've seen this happens with the
headless
option set to either true or false.Here's what I do: 1) Add
byebug
somewhere in my test suite 2) run the test with:./bin/rails test path/to/test.rb
3) watch browser open, test run and wait for breakpoint 4) attempt some finder at the byebug promt (for example: find('#some_ele')) 5) test freezes(?) - the command doesn't return. Nothing happens in the browser.I cannot do anything at this point. crtl-c doesn't stop the running test, using
kill <pid>
doesn't work either. I have to resort tokill -9 <pid>
As stated above, I still don't have a concrete reproducible test case. In some test runs, using the same breakpoint and the same finder command it works. Other times it does not. I'd say it happens about 50% of the time.