Merge "Selenium: the first test for Special:Notifications"

This commit is contained in:
jenkins-bot 2019-03-25 16:08:36 +00:00 committed by Gerrit Code Review
commit a0e0cffe48
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,11 @@
const Page = require( 'wdio-mediawiki/Page' );
class NotificationsPage extends Page {
get notificationHeading() { return browser.element( '#firstHeading' ); }
open() {
super.openTitle( 'Special:Notifications', { uselang: 'en' } );
}
}
module.exports = new NotificationsPage();

View file

@ -0,0 +1,16 @@
var assert = require( 'assert' ),
NotificationsPage = require( '../pageobjects/notifications.page' ),
UserLoginPage = require( 'wdio-mediawiki/LoginPage' );
describe( 'Notifications', function () {
it( 'checks for Notifications Page', function () {
UserLoginPage.login( browser.options.username, browser.options.password );
NotificationsPage.open();
assert.strictEqual( NotificationsPage.notificationHeading.getText(), 'Notifications' );
} );
} );