Remove `special` from `recentchanges.js` and `watchlist.js`. The entire `spec` folder has only four files. The two mentioned and `page.js` and `user.js`. If that was a folder with a lot of files, it would make sense to use `special`. Now it just makes file names long. Additionally, files in `pageobjects` folder are already using simpler names, `recentchanges.page.js` and `watchlist.page.js`, without `special`. Bug: T210726 Change-Id: I156f436e2de345586a25174c630ad60259504115
40 lines
910 B
JavaScript
40 lines
910 B
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' );
|
|
const Api = require( 'wdio-mediawiki/Api' );
|
|
const RecentChangesPage = require( '../pageobjects/recentchanges.page' );
|
|
const Util = require( 'wdio-mediawiki/Util' );
|
|
|
|
describe( 'Special:RecentChanges', function () {
|
|
let content, name, bot;
|
|
|
|
before( async () => {
|
|
bot = await Api.bot();
|
|
} );
|
|
|
|
beforeEach( function () {
|
|
browser.deleteAllCookies();
|
|
content = Util.getTestString();
|
|
name = Util.getTestString();
|
|
} );
|
|
|
|
it( 'shows page creation', function () {
|
|
browser.call( async () => {
|
|
await bot.edit( name, content );
|
|
} );
|
|
|
|
browser.waitUntil( async () => {
|
|
const result = await bot.request( {
|
|
action: 'query',
|
|
list: 'recentchanges',
|
|
rctitle: name
|
|
} );
|
|
return result.query.recentchanges.length > 0;
|
|
} );
|
|
|
|
RecentChangesPage.open();
|
|
|
|
assert.strictEqual( RecentChangesPage.titles[ 0 ].getText(), name );
|
|
} );
|
|
|
|
} );
|