Mostly I'm looking for help on how to debug this... I suppose this could be a bug capybara-webkit but I'd be surprised. I'm not doing anything really odd.
I have one test that I run via cucumber. I can add @webkit to the feature and run it with capybara-webkit or remove it and it runs it via selenium.
Before the upgrade, it worked both ways.
After the upgrade, I had to dork with the authentication part to make it work with selenium but that should not affect the path using webkit.
The part I changed is this step:
Given /^I am on the welcome page$/ do
case page.mode.to_s
when 'selenium'
# r = page.driver.rack_server
when 'rack_test'
encoded_login = ["ped...@us.ibm.com:lostgr8t"].pack("m*")
page.driver.header 'Authorization', "Basic #{encoded_login}"
visit(welcome_path)
when 'webkit'
encoded_login = ["ped...@us.ibm.com:lostgr8t"].pack("m*")
page.driver.header 'Authorization', "Basic #{encoded_login}"
visit(welcome_path)
end
end
The test itself is pretty simple:
And /^I enter a defect into the swinfo form$/ do
within('#swinfo_form') do
end
end
When /^I hit the submit button$/ do
within('#swinfo_form') do
click_button('Submit')
end
end
Then /^I should see the results$/ do
within('table.upd_apar_defs tbody') do
tr1 = find('tr:first-child')
tds = tr1.all('td')
tds[0].text.should == '1'
tds[2].text.should == "IV22222"
end
end
If I save the page in after the fill_in, the text is not filled in. If I save the page after the click button, the app is complaining about no route which I think is because the item is not filled in.
I know capybara 2 is more restrictive than before but it works with selenium.
Any ideas of what is going wrong or how to track it down?
Thank you,
Perry