In MobileFrontend, we assume that the user always starts in the desktop view of the site.
We have an explicit step "I am using the mobile site" for asserting we are inside the mobile site.
As a result, tests that pass in @integration mode fail in this environment.
Let's update the environment variable so that it uses the correct domain for this job.
Note: There may be some old tests that are not tagged @integration that may need to be updated as a result of this change.
- Update mediawiki_url in integration/config/jjb/browsertests.yaml
- Update switch_views.feature to run in Jenkins on the beta cluster
- Delete test job as part of sign off.
This work is currently blocked due to not having a decision on how this should work.
When we tried to do this previously we encountered issues with how the browser tests function - navigating to a URL uses an absolute URI as defined in browser_uri which always points to the desktop site. When a user switches to the mobile site future visits will not be redirected there.
Three potential solutions are:
- Specify mobile or desktop in URL e.g. visit(MainPage,true) where second parameter is isMobile
- Spoof user agent in all tests to force mobile site on all views
- Make switching to mobile set a cookie that forces a redirect from desktop to mobile on further visits