mediawiki-skins-MinervaNeue/tests/selenium/specs/watchstar.js
Vaughn Walters 677ce50b24 selenium: Refactor WebdriverIO tests from sync to async mode
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
2023-04-08 16:18:28 -05:00

26 lines
776 B
JavaScript

'use strict';
const { iAmViewingAnUnwatchedPage } = require( '../features/step_definitions/create_page_api_steps' ),
{
iShouldSeeAToastNotificationWithMessage,
iAmLoggedIntoTheMobileWebsite
} = require( '../features/step_definitions/common_steps' ),
{
theWatchstarShouldBeSelected,
iClickTheWatchstar } = require( '../features/step_definitions/watch_steps' );
// @chrome @smoke @test2.m.wikipedia.org @login @vagrant
describe( 'Manage Watchlist', () => {
beforeEach( async () => {
await iAmLoggedIntoTheMobileWebsite();
} );
it( 'Add an article to the watchlist', async () => {
await iAmViewingAnUnwatchedPage();
await iClickTheWatchstar();
await iShouldSeeAToastNotificationWithMessage( 'added' );
await theWatchstarShouldBeSelected();
} );
} );