mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-18 03:31:34 +00:00
791cb1081a
Avoid time outs Error in "Opening and closing the reference drawer.Opening a nested reference" Error: waitUntil condition timed out after 5000ms at Browser.<anonymous> (/workspace/src/skins/MinervaNeue/node_modules/@wdio/utils/build/shim.js:270:24) at iShouldSeeDrawerWithText (/workspace/src/skins/MinervaNeue/tests/selenium/features/step_definitions/reference_steps.js:25:10) at Context.<anonymous> (/workspace/src/skins/MinervaNeue/tests/selenium/specs/references.js:44:3) FAILED in chrome - /tests/selenium/specs/references.js Change-Id: Ia5d493fba4995c1122721b76ae98d6ba60399238
42 lines
1 KiB
JavaScript
42 lines
1 KiB
JavaScript
'use strict';
|
|
|
|
const { iSeeAnOverlay } = require( './common_steps' );
|
|
const { ArticlePage } = require( '../support/world.js' );
|
|
const ArticlePageWithOverlay = require( '../support/pages/article_page_with_overlay' );
|
|
|
|
const iClickTheSearchIcon = () => {
|
|
ArticlePage.search_icon_element.waitForDisplayed();
|
|
ArticlePage.search_icon_element.click();
|
|
};
|
|
|
|
const iTypeIntoTheSearchBox = ( term ) => {
|
|
const input = ArticlePageWithOverlay.overlay_element
|
|
.$( 'input' );
|
|
input.waitForExist();
|
|
input.setValue( term );
|
|
};
|
|
|
|
const iSeeSearchResults = () => {
|
|
ArticlePageWithOverlay.overlay_element
|
|
.$( '.page-list' ).waitForExist( 5000 );
|
|
};
|
|
|
|
const iClickASearchWatchstar = () => {
|
|
iSeeSearchResults();
|
|
const watchThisArticle = ArticlePageWithOverlay.overlay_element
|
|
.$( '.watch-this-article' );
|
|
watchThisArticle.waitForExist( 5000 );
|
|
watchThisArticle.click();
|
|
};
|
|
|
|
const iSeeTheSearchOverlay = () => {
|
|
iSeeAnOverlay();
|
|
};
|
|
|
|
module.exports = {
|
|
iClickTheSearchIcon,
|
|
iTypeIntoTheSearchBox,
|
|
iClickASearchWatchstar,
|
|
iSeeTheSearchOverlay
|
|
};
|