Last modified: 2014-03-25 21:18:22 UTC
In the course of shoring up the Chrome builds for browser tests, I noticed this unusual behavior. This may be a WONTFIX, but I thought I would report it in case. Run the browser test mainmenu.feature. The step in question is: Given(/^I am on the "(.+)" page$/) do |article| visit(ArticlePage, :using_params => {:article_name => article}) end and the |article| param is "Main Page" (not "Main_Page") Watch the URLs for "Main_Page" as the test runs In Firefox the URL changes from "Main_Page" to "Main Page" In Chrome the URL changes from "Main_Page" to "Main%20Page" The issue for the browser tests was that checking the URL depends on the browser reporting correctly that it was done processing all of the URL changes and had reached its final state. This was true for Firefox, but Chrome seems to be reporting final state before all the URL switching, thus causing the test to fail for Chrome only. I added an implicit wait to the test so that the test would pass without an explicit sleep() command, but I thought the URL munging was unusual enough to report.
Prioritization and scheduling of this bug is tracked on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1793
So the %20 and ' ' inconsistency is a Chrome/Firefox inconsistency. Nothing we can really do there. Anything without the '_' will cause a redirect. We should probably avoid the redirect where we can....
Change 120564 had a related patch set uploaded by Jdlrobson: Avoid redirects when visiting URLS in browser tests https://gerrit.wikimedia.org/r/120564
Change 120564 merged by jenkins-bot: Avoid redirects when visiting URLS in browser tests https://gerrit.wikimedia.org/r/120564