2017-02-14 16:05:08 +00:00
|
|
|
'use strict';
|
|
|
|
|
2020-06-23 19:30:43 +00:00
|
|
|
const assert = require( 'assert' ),
|
2017-12-08 18:40:57 +00:00
|
|
|
Api = require( 'wdio-mediawiki/Api' ),
|
2017-02-14 16:05:08 +00:00
|
|
|
ReadMorePage = require( '../pageobjects/readmore.page' );
|
|
|
|
|
|
|
|
describe( 'ReadMore', function () {
|
2020-05-25 18:17:41 +00:00
|
|
|
let bot;
|
|
|
|
|
|
|
|
before( async () => {
|
|
|
|
bot = await Api.bot();
|
|
|
|
} );
|
2017-02-14 16:05:08 +00:00
|
|
|
|
2020-01-15 06:11:52 +00:00
|
|
|
const name = 'Related Articles 1';
|
2017-02-14 16:05:08 +00:00
|
|
|
|
2020-06-23 19:30:43 +00:00
|
|
|
// eslint-disable-next-line mocha/no-sibling-hooks
|
2022-02-09 15:13:34 +00:00
|
|
|
before( async function () {
|
2017-02-14 16:05:08 +00:00
|
|
|
// Create page needed for the tests
|
2022-02-09 15:13:34 +00:00
|
|
|
const content = '{{#related:related_articles_2}}';
|
|
|
|
await bot.edit( name, content );
|
2017-02-14 16:05:08 +00:00
|
|
|
} );
|
|
|
|
|
2022-02-09 15:13:34 +00:00
|
|
|
it.skip( 'ReadMore is not present on Vector', async function () {
|
|
|
|
await ReadMorePage.openDesktop( name );
|
|
|
|
assert( await !ReadMorePage.isCardVisible(), 'No related pages cards are shown' );
|
2017-02-14 16:05:08 +00:00
|
|
|
} );
|
|
|
|
|
2022-02-09 15:13:34 +00:00
|
|
|
it.skip( 'ReadMore is present in Minerva @daily', async function () {
|
|
|
|
await ReadMorePage.openMobile( name );
|
|
|
|
assert( await ReadMorePage.seeReadMore() );
|
2017-02-14 16:05:08 +00:00
|
|
|
} );
|
|
|
|
} );
|