mediawiki-extensions-Relate.../tests/selenium/specs/readmore.js
jdlrobson 993c4e227e Use wdio-mediawiki in selenium tests
Change-Id: If48e0a885acdf4bca73ec2a9d613fe2f0403dd61
2018-06-20 10:23:11 -05:00

29 lines
732 B
JavaScript

'use strict';
var assert = require( 'assert' ),
Api = require( 'wdio-mediawiki/Api' ),
ReadMorePage = require( '../pageobjects/readmore.page' );
describe( 'ReadMore', function () {
let name = 'Related Articles 1';
before( function () {
// Create page needed for the tests
browser.call( function () {
let content = '{{#related:related_articles_2}}';
return Api.edit( name, content );
} );
} );
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() );
} );
} );