mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-18 08:40:49 +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
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
const {
|
|
pageExists, iShouldSeeAToastNotification,
|
|
iAmUsingMobileScreenResolution,
|
|
iAmUsingTheMobileSite,
|
|
iAmLoggedIntoTheMobileWebsite,
|
|
iAmOnPage
|
|
} = require( '../features/step_definitions/common_steps' ),
|
|
{
|
|
iClickTheSearchIcon,
|
|
iTypeIntoTheSearchBox,
|
|
iClickASearchWatchstar,
|
|
iSeeTheSearchOverlay
|
|
} = require( '../features/step_definitions/search_steps' );
|
|
|
|
// @test2.m.wikipedia.org @vagrant @login
|
|
describe( 'Search', () => {
|
|
it( 'Clicking on a watchstar toggles the watchstar', async () => {
|
|
await iAmUsingTheMobileSite();
|
|
await pageExists( 'Selenium search test' );
|
|
await iAmLoggedIntoTheMobileWebsite();
|
|
await iAmOnPage( 'Main Page' );
|
|
await iAmUsingMobileScreenResolution();
|
|
await iClickTheSearchIcon();
|
|
await iSeeTheSearchOverlay();
|
|
await iTypeIntoTheSearchBox( 'Selenium search tes' );
|
|
// This pause statement is a temporary bandaid until we figure a bettery dynamic sync
|
|
// eslint-disable-next-line wdio/no-pause
|
|
await browser.pause( 1000 );
|
|
await iClickASearchWatchstar();
|
|
await iShouldSeeAToastNotification();
|
|
} );
|
|
} );
|