mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-18 11:35:54 +00:00
677ce50b24
WebdriverIO has dropped support of sync mode, hence changed to async. Update npm packages: @wdio/*, wdio-mediawiki because async mode needs at least @wdio v7.9. Remove npm packages: @wdio/dot-reporter and @wdio/sync. Bug: T293084 Change-Id: I5babbdadf21e9f951f69de93bfca5213a50965aa
42 lines
1.1 KiB
JavaScript
42 lines
1.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 = async () => {
|
|
await ArticlePage.search_icon_element.waitForDisplayed();
|
|
await ArticlePage.search_icon_element.click();
|
|
};
|
|
|
|
const iTypeIntoTheSearchBox = async ( term ) => {
|
|
const input = await ArticlePageWithOverlay.overlay_element
|
|
.$( 'input' );
|
|
await input.waitForExist();
|
|
await input.setValue( term );
|
|
};
|
|
|
|
const iSeeSearchResults = async () => {
|
|
await ArticlePageWithOverlay.overlay_element
|
|
.$( '.page-list' ).waitForExist( 5000 );
|
|
};
|
|
|
|
const iClickASearchWatchstar = async () => {
|
|
await iSeeSearchResults();
|
|
const watchThisArticle = ArticlePageWithOverlay.overlay_element
|
|
.$( '.watch-this-article' );
|
|
watchThisArticle.waitForExist( 5000 );
|
|
watchThisArticle.click();
|
|
};
|
|
|
|
const iSeeTheSearchOverlay = async () => {
|
|
await iSeeAnOverlay();
|
|
};
|
|
|
|
module.exports = {
|
|
iClickTheSearchIcon,
|
|
iTypeIntoTheSearchBox,
|
|
iClickASearchWatchstar,
|
|
iSeeTheSearchOverlay
|
|
};
|