GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
I'm having a strange issue using Capybara-webkit with Rspec 2.
I have a "before do" block that looks like this:
click_link "Log in"
fill_in "Email", :with => user.email
fill_in "Password", :with => "password"
click_button "Sign in"
it "should show me a link to my profile on the home page" do
page.should have_content "My profile"
This fails, as the login is not completed (although it should work).
However, if I access the page object at the end of the before block, e.g.
page.should_not have_content "NOTONTHEPAGE"
Then the login succeeds and this test passes.
It looks like Capybara-webkit requests aren't actually being run until the page object is accessed...
Have you tried to click on a link to the homepage instead of using visit() in the example?
It happened to me in the past, that if you use visit() after signing in, the session is lost.
This is happening to me too. I need to 'touch' my Scenarios as a first step when a Background block is present. I have been using "And I should be logged in" as my 'touch'. Has anyone found a solution or an alternative to visit()? Thanks -G
Can you guys retry on the latest master? We've fixed a number of async issues.
Had the same problem, tested with master. Now the test just hangs without ever coming back. Any way to give you more information to help you fix this problem?
Could you provide us with a failing scenario, including fixture HTML? I tried reproducing this bug but was unsuccessful.
@mhoran will try, but currently this is deep down within the app. Will try to extract it to a rails sample app that reproduces the error. Fun weekend project.
It does not seem to be related to the timeout handling: We had the problem, then we never ran into a timeout with a JS file that couldn't be loaded. Timeout didn't fire causing capybara-webkit to hang. But this is a different issue.
@willrjmarshall I think this is no longer issue. Current capybara-webkit version waits till the expectations are met unless capybara timeout is not reached.
Can someone confirm this is no longer an issue?
I'll close this issue due to inactivity. Please re-open it if you're still experiencing these issues.