Revert "selenium: add new message banner test to user spec"
authorJdlrobson <jrobson@wikimedia.org>
Mon, 29 Jan 2018 19:47:07 +0000 (19:47 +0000)
committerJdlrobson <jrobson@wikimedia.org>
Mon, 29 Jan 2018 20:41:21 +0000 (20:41 +0000)
This reverts commit 6ca3e221d1b907f55462394f910f283bb3627cc9.
This is breaking CI for the Minerva skin and Echo as Echo changes how
this interaction works. When the browser test tries to locate the
div.usermessage it has moved so fails.

This test needs to be rewritten to take this into account.

On a side note, given usermessage is generated by all skins (and not
in core) there is a big argument to be made that this shouldn't be in
core but in the individual skins. MinervaNeue the mobile skin notably
does not use this class so this test would always fail on a mediawiki
instance which only uses the Minerva skin.

Bug: T185928
Change-Id: I43b6cf328aaf4a4fded0bb9746716c4cc9d8f364

tests/selenium/pageobjects/usermessage.page.js [deleted file]
tests/selenium/specs/user.js

diff --git a/tests/selenium/pageobjects/usermessage.page.js b/tests/selenium/pageobjects/usermessage.page.js
deleted file mode 100644 (file)
index 7faf347..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-const Page = require( './page' );
-
-class UserMessagePage extends Page {
-       get usermessage() { return browser.element( 'div.usermessage' ); }
-}
-module.exports = new UserMessagePage();
index 102acd6..3f3872d 100644 (file)
@@ -2,9 +2,7 @@
 const assert = require( 'assert' ),
        CreateAccountPage = require( '../pageobjects/createaccount.page' ),
        PreferencesPage = require( '../pageobjects/preferences.page' ),
-       UserLoginPage = require( '../pageobjects/userlogin.page' ),
-       UserMessagePage = require( '../pageobjects/usermessage.page' ),
-       EditPage = require( '../pageobjects/edit.page' );
+       UserLoginPage = require( '../pageobjects/userlogin.page' );
 
 describe( 'User', function () {
 
@@ -68,24 +66,4 @@ describe( 'User', function () {
 
        } );
 
-       it( 'should be able to view new message banner', function () {
-
-               // create user
-               browser.call( function () {
-                       return CreateAccountPage.apiCreateAccount( username, password );
-               } );
-
-               // create talk page with content
-               browser.call( function () {
-                       return EditPage.apiEdit( 'User_talk:' + username, Math.random().toString() );
-               } );
-
-               // log in
-               UserLoginPage.login( username, password );
-
-               // check
-               assert.equal( UserMessagePage.usermessage.getText(), 'You have a new message (last change).' );
-
-       } );
-
 } );