[selenium] Make tests skin agnostic
The current tests in core rely on selectors provided by Vector, but with some small modifications the tests can work equally well with and without Vector. Bug: T248484 Change-Id: I5bc0c80b796252b1a920f6549ef4a462a9b13b87
This commit is contained in:
parent
82f7d81c66
commit
0257160852
4 changed files with 7 additions and 4 deletions
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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' ); }
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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' } );
|
||||
|
|
|
|||
Loading…
Reference in a new issue