mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2025-01-09 05:14:39 +00:00
ffe3363d09
Change-Id: I2ce14429f9440e69e36fa349847f58fb32862f2a
30 lines
964 B
JavaScript
30 lines
964 B
JavaScript
'use strict';
|
||
|
||
const assert = require( 'assert' ),
|
||
EchoPage = require( '../pageobjects/echo.page' ),
|
||
UserLoginPage = require( 'wdio-mediawiki/LoginPage' ),
|
||
Util = require( 'wdio-mediawiki/Util' ),
|
||
Api = require( 'wdio-mediawiki/Api' );
|
||
|
||
describe( 'Mention test for Echo', function () {
|
||
it.skip( 'checks if admin gets alert when mentioned', function () {
|
||
|
||
const username = Util.getTestString( 'NewUser-' );
|
||
const password = Util.getTestString();
|
||
browser.call( function () {
|
||
return Api.createAccount( username, password
|
||
).then( function () {
|
||
return Api.edit( `User:${username}`, `Hello [[User:${browser.options.username}]] ~~~~`, username, password );
|
||
} );
|
||
} );
|
||
UserLoginPage.login( browser.options.username, browser.options.password );
|
||
|
||
EchoPage.alerts.click();
|
||
|
||
EchoPage.alertMessage.waitForVisible();
|
||
const regexp = /.* mentioned you on User:.*./;
|
||
assert( regexp.test( EchoPage.alertMessage.getText() ) );
|
||
} );
|
||
|
||
} );
|