Merge "Skip the flaking watchstar test"

This commit is contained in:
jenkins-bot 2019-05-09 12:00:45 +00:00 committed by Gerrit Code Review
commit cd7a50682f
3 changed files with 15 additions and 10 deletions

View file

@ -19,7 +19,8 @@ const login = () => {
const createPages = ( pages ) => {
const summary = 'edit by selenium test';
return login().then( () =>
browser.call( () => login() );
browser.call( () =>
api.batch(
pages.map( ( page ) => [ 'create' ].concat( page ).concat( [ summary ] ) )
)
@ -27,7 +28,8 @@ const createPages = ( pages ) => {
};
const createPage = ( title, wikitext ) => {
return login().then( () => Api.edit( title, wikitext ) );
browser.call( () => login() );
browser.call( () => Api.edit( title, wikitext ) );
};
const iAmUsingTheMobileSite = () => {
@ -56,11 +58,11 @@ const iAmLoggedIntoTheMobileWebsite = () => {
};
const pageExists = ( title ) => {
return createPage( title, 'Page created by Selenium browser test.' ).then( () => {
const d = new Date();
// wait 2 seconds so the change can propogate.
browser.waitUntil( () => new Date() - d > 2000 );
} );
browser.call( () =>
createPage( title, 'Page created by Selenium browser test.' )
);
// wait 2 seconds so the change can propogate.
waitForPropagation( 2000 );
};
const iAmOnAPageThatDoesNotExist = () => {

View file

@ -13,7 +13,7 @@ const {
} = require( '../features/step_definitions/search_steps' );
// @test2.m.wikipedia.org @vagrant @login
describe( 'Search', () => {
describe.skip( 'Search', () => {
it( 'Clicking on a watchstar toggles the watchstar', () => {
iAmUsingTheMobileSite();

View file

@ -19,12 +19,15 @@ const { iAmOnAPageWithNoTalkTopics } = require( '../features/step_definitions/cr
// @chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org @vagrant
describe( 'Talk', () => {
beforeEach( () => {
iAmUsingTheMobileSite();
before( () => {
pageExists( 'Talk:Selenium talk test' );
pageExists( 'Selenium talk test' );
} );
beforeEach( () => {
iAmUsingTheMobileSite();
} );
it( 'Add discussion on talk page not possible as logged out user', () => {
iAmOnPage( 'Selenium talk test' );
thereShouldBeNoTalkButton();