Merge "selenium: Run most tests targeting the beta cluster"
This commit is contained in:
commit
1eea20a5fe
6 changed files with 22 additions and 25 deletions
|
|
@ -9,7 +9,7 @@
|
|||
"qunit": "grunt qunit",
|
||||
"doc": "jsduck",
|
||||
"postdoc": "grunt copy:jsduck",
|
||||
"selenium-daily": "npm run selenium-test -- --suite daily --mochaOpts.grep @daily",
|
||||
"selenium-daily": "npm run selenium-test -- --mochaOpts.grep @daily",
|
||||
"selenium-test": "wdio ./tests/selenium/wdio.conf.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@ const Page = require( 'wdio-mediawiki/Page' );
|
|||
|
||||
class RecentChangesPage extends Page {
|
||||
get changesList() { return $( '.mw-changeslist' ); }
|
||||
get liveUpdates() { return $( '.mw-rcfilters-ui-liveUpdateButtonWidget' ); }
|
||||
get titles() { return this.changesList.$$( '.mw-changeslist-title' ); }
|
||||
|
||||
open() {
|
||||
super.openTitle( 'Special:RecentChanges' );
|
||||
super.openTitle( 'Special:RecentChanges', { hidebots: 0 } );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ describe( 'Page', function () {
|
|||
name = Util.getTestString( 'BeforeEach-name-' );
|
||||
} );
|
||||
|
||||
it( 'should be previewable', async function () {
|
||||
it( 'should be previewable @daily', async function () {
|
||||
await UserLoginPage.loginAdmin();
|
||||
await EditPage.preview( name, content );
|
||||
|
||||
assert.strictEqual( await EditPage.heading.getText(), 'Creating ' + name );
|
||||
|
|
@ -38,8 +39,9 @@ describe( 'Page', function () {
|
|||
await browser.reloadSession();
|
||||
} );
|
||||
|
||||
it( 'should be creatable', async function () {
|
||||
it( 'should be creatable @daily', async function () {
|
||||
// create
|
||||
await UserLoginPage.loginAdmin();
|
||||
await EditPage.edit( name, content );
|
||||
|
||||
// check
|
||||
|
|
@ -47,7 +49,7 @@ describe( 'Page', function () {
|
|||
assert.strictEqual( await EditPage.displayedContent.getText(), content );
|
||||
} );
|
||||
|
||||
it( 'should be re-creatable', async function () {
|
||||
it( 'should be re-creatable @daily', async function () {
|
||||
const initialContent = Util.getTestString( 'initialContent-' );
|
||||
|
||||
// create and delete
|
||||
|
|
@ -55,6 +57,7 @@ describe( 'Page', function () {
|
|||
await bot.delete( name, 'delete prior to recreate' );
|
||||
|
||||
// re-create
|
||||
await UserLoginPage.loginAdmin();
|
||||
await EditPage.edit( name, content );
|
||||
|
||||
// check
|
||||
|
|
@ -84,7 +87,7 @@ describe( 'Page', function () {
|
|||
assert.strictEqual( await HistoryPage.comment.getText(), `created with "${content}"` );
|
||||
} );
|
||||
|
||||
it( 'should be deletable', async function () {
|
||||
it( 'should be deletable @daily', async function () {
|
||||
// create
|
||||
await bot.edit( name, content, 'create for delete' );
|
||||
|
||||
|
|
@ -94,13 +97,10 @@ describe( 'Page', function () {
|
|||
await DeletePage.delete( name, 'delete reason' );
|
||||
|
||||
// check
|
||||
assert.strictEqual(
|
||||
await DeletePage.displayedContent.getText(),
|
||||
'"' + name + '" has been deleted. See deletion log for a record of recent deletions.\n\nReturn to Main Page.'
|
||||
);
|
||||
assert.match( await DeletePage.displayedContent.getText(), new RegExp( `"${name}" has been deleted.` ) );
|
||||
} );
|
||||
|
||||
it( 'should be restorable', async function () {
|
||||
it( 'should be restorable @daily', async function () {
|
||||
// create and delete
|
||||
await bot.edit( name, content, 'create for delete' );
|
||||
await bot.delete( name, 'delete for restore' );
|
||||
|
|
@ -115,7 +115,7 @@ describe( 'Page', function () {
|
|||
assert.strictEqual( await RestorePage.displayedContent.getText(), name + ' has been undeleted\n\nConsult the deletion log for a record of recent deletions and restorations.' );
|
||||
} );
|
||||
|
||||
it( 'should be protectable', async function () {
|
||||
it( 'should be protectable @daily', async function () {
|
||||
|
||||
await bot.edit( name, content, 'create for protect' );
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ describe( 'Page', function () {
|
|||
assert.strictEqual( await EditPage.heading.getText(), 'View source for ' + name );
|
||||
} );
|
||||
|
||||
it( 'should be undoable', async function () {
|
||||
it( 'should be undoable @daily', async function () {
|
||||
|
||||
// create
|
||||
await bot.edit( name, content, 'create to edit and undo' );
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ describe( 'Special:RecentChanges', function () {
|
|||
name = Util.getTestString();
|
||||
} );
|
||||
|
||||
it( 'shows page creation', async function () {
|
||||
it( 'shows page creation @daily', async function () {
|
||||
await bot.edit( name, content );
|
||||
await browser.waitUntil( async () => {
|
||||
const result = await bot.request( {
|
||||
|
|
@ -30,7 +30,11 @@ describe( 'Special:RecentChanges', function () {
|
|||
} );
|
||||
|
||||
await RecentChangesPage.open();
|
||||
|
||||
await RecentChangesPage.liveUpdates.click();
|
||||
await browser.waitUntil(
|
||||
async () => ( await RecentChangesPage.titles[ 0 ].getText() ) === name,
|
||||
{ timeout: 10000 }
|
||||
);
|
||||
assert.strictEqual( await RecentChangesPage.titles[ 0 ].getText(), name );
|
||||
} );
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ describe( 'Special:Watchlist', function () {
|
|||
await LoginPage.loginAdmin();
|
||||
} );
|
||||
|
||||
it( 'should show page with new edit', async function () {
|
||||
it( 'should show page with new edit @daily', async function () {
|
||||
const title = Util.getTestString( 'Title-' );
|
||||
|
||||
// create
|
||||
|
|
|
|||
|
|
@ -15,13 +15,5 @@ exports.config = { ...config,
|
|||
specs: [
|
||||
'tests/selenium/specs/**/*.js',
|
||||
'tests/selenium/wdio-mediawiki/specs/*.js'
|
||||
],
|
||||
|
||||
suites: {
|
||||
daily: [
|
||||
'tests/selenium/wdio-mediawiki/specs/*.js',
|
||||
'tests/selenium/specs/page.js',
|
||||
'tests/selenium/specs/user.js'
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue