mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
Merge "Selenium: the first test for Special:Notifications"
This commit is contained in:
commit
a0e0cffe48
11
tests/selenium/pageobjects/notifications.page.js
Normal file
11
tests/selenium/pageobjects/notifications.page.js
Normal 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();
|
16
tests/selenium/specs/notifications.js
Normal file
16
tests/selenium/specs/notifications.js
Normal 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' );
|
||||
|
||||
} );
|
||||
|
||||
} );
|
Loading…
Reference in a new issue