mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-02 19:36:48 +00:00
efd759402f
Caused failure in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Echo/+/524520#message-7f1addb6b8b09919581014fe18c6dddef32fb078 Bug: T227009 Change-Id: Iae088bc7c966f927a15d06a4de5966a76913dbe4
28 lines
941 B
JavaScript
28 lines
941 B
JavaScript
var 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 () {
|
||
|
||
var username = Util.getTestString( 'NewUser-' );
|
||
var 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();
|
||
let regexp = /.* mentioned you on User:.*./;
|
||
assert( regexp.test( EchoPage.alertMessage.getText() ) );
|
||
} );
|
||
|
||
} );
|