418fbb11cb715d74a89466e9d56ee54ebf9a5e9c
[lhc/web/wiklou.git] / tests / selenium / specs / specialrecentchanges.js
1 const assert = require( 'assert' ),
2 Api = require( 'wdio-mediawiki/Api' ),
3 RecentChangesPage = require( '../pageobjects/recentchanges.page' );
4
5 describe( 'Special:RecentChanges', function () {
6 let content,
7 name;
8
9 function getTestString() {
10 return Math.random().toString() + '-öäü-♠♣♥♦';
11 }
12
13 beforeEach( function () {
14 browser.deleteCookie();
15 content = getTestString();
16 name = getTestString();
17 } );
18
19 it( 'shows page creation', function () {
20 browser.call( function () {
21 return Api.edit( name, content );
22 } );
23
24 RecentChangesPage.open();
25
26 assert.strictEqual( name, RecentChangesPage.titles[ 0 ] );
27 } );
28
29 } );