2017-02-14 16:05:08 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var 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-01-15 06:11:52 +00:00
|
|
|
const name = 'Related Articles 1';
|
2017-02-14 16:05:08 +00:00
|
|
|
|
|
|
|
before( function () {
|
|
|
|
// Create page needed for the tests
|
|
|
|
browser.call( function () {
|
2020-01-15 06:11:52 +00:00
|
|
|
const content = '{{#related:related_articles_2}}';
|
2017-12-08 18:40:57 +00:00
|
|
|
return Api.edit( name, content );
|
2017-02-14 16:05:08 +00:00
|
|
|
} );
|
|
|
|
} );
|
|
|
|
|
|
|
|
it( 'ReadMore is not present on Vector', function () {
|
|
|
|
ReadMorePage.openDesktop( name );
|
|
|
|
assert( !ReadMorePage.isCardVisible(), 'No related pages cards are shown' );
|
|
|
|
} );
|
|
|
|
|
|
|
|
it( 'ReadMore is present in Minerva', function () {
|
|
|
|
ReadMorePage.openMobile( name );
|
|
|
|
assert( ReadMorePage.seeReadMore() );
|
|
|
|
} );
|
|
|
|
} );
|