Merge "[selenium] Make tests skin agnostic"

This commit is contained in:
jenkins-bot 2020-03-27 19:49:17 +00:00 committed by Gerrit Code Review
commit 827fed0ca2
4 changed files with 7 additions and 4 deletions

View file

@ -5,7 +5,7 @@ class CreateAccountPage extends Page {
get password() { return $( '#wpPassword2' ); }
get confirmPassword() { return $( '#wpRetype' ); }
get create() { return $( '#wpCreateaccount' ); }
get heading() { return $( '#firstHeading' ); }
get heading() { return $( '.firstHeading' ); }
open() {
super.openTitle( 'Special:CreateAccount' );

View file

@ -4,7 +4,7 @@ class EditPage extends Page {
get content() { return $( '#wpTextbox1' ); }
get conflictingContent() { return $( '#wpTextbox2' ); }
get displayedContent() { return $( '#mw-content-text .mw-parser-output' ); }
get heading() { return $( '#firstHeading' ); }
get heading() { return $( '.firstHeading' ); }
get save() { return $( '#wpSave' ); }
get previewButton() { return $( '#wpPreview' ); }

View file

@ -36,7 +36,10 @@ describe( 'User', function () {
UserLoginPage.login( username, password );
// check
assert.strictEqual( UserLoginPage.userPage.getText(), username );
const actualUsername = browser.execute( () => {
return mw.config.get( 'wgUserName' );
} );
assert.strictEqual( actualUsername, username );
} );
// Disabled due to flakiness (T199446)

View file

@ -1,7 +1,7 @@
const Page = require( './Page' );
class BlankPage extends Page {
get heading() { return $( '#firstHeading' ); }
get heading() { return $( '.firstHeading' ); }
open() {
super.openTitle( 'Special:BlankPage', { uselang: 'en' } );