Beta mode cookie must be set on mobile domain

On the Selenium daily job, there are 2 domains -
https://en.wikipedia.beta.wmflabs.org
and
https://en.m.wikipedia.beta.wmflabs.org

Currently the cookie gets set on the former, meaning it doesn't work
This should take care of this, while also accounting for running the
browser tests (as we do in the zuul runs) in a single domain

Bug: T219920
Change-Id: I54838fb8aba559c4d72c444968493dff2de9b4f9
This commit is contained in:
jdlrobson 2019-04-10 08:55:09 -07:00 committed by Jdlrobson
parent 4a5c719031
commit 1903d1adae
2 changed files with 5 additions and 3 deletions

View File

@ -6,6 +6,11 @@ const iAmUsingTheMobileSite = () => {
};
const iAmInBetaMode = () => {
// running beta mode requires being on the mobile domain
iAmUsingTheMobileSite();
// and making sure the browser URL is set to the mobile domain by triggering a page load
ArticlePage.open( 'Page on the mobile domain' );
// Cookie will now set on mobile domain
ArticlePage.setBetaMode();
};

View File

@ -6,7 +6,6 @@ const { iClickOnTheCategoryButton,
iAmInAWikiThatHasCategories
} = require( '../features/step_definitions/create_page_api_steps' ),
{
iAmUsingTheMobileSite,
iAmOnPage, iAmInBetaMode
} = require( '../features/step_definitions/common_steps' );
@ -19,8 +18,6 @@ describe( 'Categories', function () {
iAmInAWikiThatHasCategories( title );
// And I am using the mobile site
iAmUsingTheMobileSite();
// And I am in beta mode
iAmInBetaMode();