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

apparition doesn't play nice with byebug #78

Open
josh-m-sharpe opened this issue Jun 2, 2021 · 1 comment
Open

apparition doesn't play nice with byebug #78

josh-m-sharpe opened this issue Jun 2, 2021 · 1 comment

Comments

@josh-m-sharpe
Copy link

josh-m-sharpe commented Jun 2, 2021

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.

@josh-m-sharpe
Copy link
Author

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.

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

No branches or pull requests

1 participant