diff --git a/tests/selenium/pageobjects/notifications.page.js b/tests/selenium/pageobjects/notifications.page.js new file mode 100644 index 000000000..46756790e --- /dev/null +++ b/tests/selenium/pageobjects/notifications.page.js @@ -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(); diff --git a/tests/selenium/specs/notifications.js b/tests/selenium/specs/notifications.js new file mode 100644 index 000000000..202aef148 --- /dev/null +++ b/tests/selenium/specs/notifications.js @@ -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' ); + + } ); + +} );