Page MenuHomePhabricator

unusual URL changes Firefox vs. Chrome
Closed, ResolvedPublic

Description

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.


Version: unspecified
Severity: normal

Details

Reference
bz62932

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:52 AM
bzimport set Reference to bz62932.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

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