mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-12-04 12:48:44 +00:00
078cfb2347
WebdriverIO has dropped support of sync mode due to breaking changes in Chromium, hence all tests have been changed to async. Update npm packages: @wdio/*, wdio-mediawiki and webdriverio because async mode needs at least webdriverio v7.9. Remove npm package: @wdio/sync. Bug: T300797 Change-Id: Ia2a857eb46dbd613a10f48c686bcf6b2fdc3e202
33 lines
874 B
JavaScript
33 lines
874 B
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
Api = require( 'wdio-mediawiki/Api' ),
|
|
ReadMorePage = require( '../pageobjects/readmore.page' );
|
|
|
|
describe( 'ReadMore', function () {
|
|
let bot;
|
|
|
|
before( async () => {
|
|
bot = await Api.bot();
|
|
} );
|
|
|
|
const name = 'Related Articles 1';
|
|
|
|
// eslint-disable-next-line mocha/no-sibling-hooks
|
|
before( async function () {
|
|
// Create page needed for the tests
|
|
const content = '{{#related:related_articles_2}}';
|
|
await bot.edit( name, content );
|
|
} );
|
|
|
|
it.skip( 'ReadMore is not present on Vector', async function () {
|
|
await ReadMorePage.openDesktop( name );
|
|
assert( await !ReadMorePage.isCardVisible(), 'No related pages cards are shown' );
|
|
} );
|
|
|
|
it.skip( 'ReadMore is present in Minerva @daily', async function () {
|
|
await ReadMorePage.openMobile( name );
|
|
assert( await ReadMorePage.seeReadMore() );
|
|
} );
|
|
} );
|