mediawiki-extensions-Relate.../tests/selenium/specs/readmore.js
Željko Filipin a40cfcb134 Replace Ruby Related pages browser tests with node js version
Additional changes:
* Remove all Ruby artifacts
* Update eslint to allow es6 in tests

Bug: T164024
Change-Id: If6c8d32df042b831d52440963606a47c8ce7b552
2017-07-26 11:41:07 +00:00

29 lines
778 B
JavaScript

'use strict';
var assert = require( 'assert' ),
EditPage = require( '../../../../../tests/selenium/pageobjects/edit.page' ),
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 EditPage.apiEdit( 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() );
} );
} );