mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-14 19:28:31 +00:00
0d8e740635
* eslint-config-wikimedia: 0.27.0 → 0.28.0 The following rules are failing and were disabled: * modules: * no-jquery/no-extend * grunt-stylelint: 0.19.0 → 0.20.0 * stylelint-config-wikimedia: 0.16.1 → 0.17.1 Change-Id: I45a64d80ef5aa50b4a1abd871605f52682ab9b5b
63 lines
1.6 KiB
JavaScript
63 lines
1.6 KiB
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( 'Echo', () => {
|
|
let bot;
|
|
|
|
before( async () => {
|
|
bot = await Api.bot();
|
|
} );
|
|
|
|
it( 'alerts and notices are visible after logging in @daily', async () => {
|
|
|
|
await UserLoginPage.login( browser.config.mwUser, browser.config.mwPwd );
|
|
|
|
assert( EchoPage.alerts.isExisting() );
|
|
assert( EchoPage.notices.isExisting() );
|
|
|
|
} );
|
|
|
|
it( 'flyout for alert appears when clicked @daily', async () => {
|
|
|
|
await UserLoginPage.login( browser.config.mwUser, browser.config.mwPwd );
|
|
await EchoPage.alerts.click();
|
|
EchoPage.alertsFlyout.waitForDisplayed();
|
|
|
|
assert( EchoPage.alertsFlyout.isExisting() );
|
|
|
|
} );
|
|
|
|
it( 'flyout for notices appears when clicked @daily', async () => {
|
|
|
|
await UserLoginPage.login( browser.config.mwUser, browser.config.mwPwd );
|
|
await EchoPage.notices.click();
|
|
EchoPage.noticesFlyout.waitForDisplayed();
|
|
|
|
assert( EchoPage.noticesFlyout.isExisting() );
|
|
|
|
} );
|
|
|
|
it.skip( 'checks for welcome message after signup', async () => {
|
|
|
|
const username = Util.getTestString( 'NewUser-' );
|
|
const password = Util.getTestString();
|
|
|
|
await Api.createAccount( bot, username, password );
|
|
|
|
await UserLoginPage.login( username, password );
|
|
|
|
await EchoPage.notices.click();
|
|
|
|
await EchoPage.alertMessage.waitForDisplayed();
|
|
const regexp = /Welcome to .*, .*! We're glad you're here./;
|
|
assert( regexp.test( await EchoPage.alertMessage.getText() ) );
|
|
|
|
} );
|
|
|
|
} );
|