mediawiki-skins-MinervaNeue/tests/selenium/specs/watchstar.js
Vaughn Walters dd3fb66258 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
(cherry picked from commit 677ce50b24)
2023-08-18 12:15:47 +01: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();
} );
} );