-
Notifications
You must be signed in to change notification settings - Fork 260
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
Make poltergeist tests easier to debug #433
Comments
Getting a full devtools up seems powerful and flexible. It also takes a bit of learning to know how to activate this, and it's a lot of steps to then actually change and run the tests manually to get the devtools up for debugging. The second link you gave has a section about just "re-raising" the JavaScript errors in PhantomJS as errors in the overarching test framework (Capybara, so also Cucumber or RSpec tests that depend on Capybara...) So, from poltergeist's GitHub Readme:
We should set I think that would be more seamless, and quicker, but less powerful than a full devtools/remote debugging. I can't really figure out what this next paragraph of the post means, but it sounds like that nice
Looking forward to trying this out over the next couple of days and/or as I get time... |
Your intuition is correct that |
I think trying is the only way to find out, so we'll just see how it goes. EDIT: Posted too early, meant to add another sentence: My point was just, what if the JS errors being easily (lazily?) viewable is more worthwhile? But honestly we won't know what's worth what or which is better until we've tried both. |
I think it's a good idea to write about this in the Wiki. Where would be a good place? |
Good idea. I'd say this could be added in articles about the existing testing frameworks: Or in its own, new article. If you do make it its own article, that article can get a brief mention and a link from the articles about testing frameworks. I'd recommend that approach. But whatever is readable and discoverable are kind of two of the guiding principles of the Wiki as of yet. |
This should be incorporated into a guide. By using the
:poltergeist_debug
(#432) driver, you can writepage.driver.debug
statements in the cucumber step definitions to have it pause and show a browser window with a web inspector hooked up to the tests, in which you can see javascript errors and the DOM. See my PR for more information.Read more:
https://github.com/teampoltergeist/poltergeist#remote-debugging-experimental
http://www.jonathanleighton.com/articles/2012/poltergeist-0-6-0/
The text was updated successfully, but these errors were encountered: