Last modified: 2014-10-19 17:44:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63304, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61304 - browser tests should assert there are no pink error boxes on the page
browser tests should assert there are no pink error boxes on the page
Status: NEW
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-13 08:09 UTC by spage
Modified: 2014-10-19 17:44 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description spage 2014-02-13 08:09:30 UTC
When I kick back with some popcorn and watch Sauce Labs browser test movies, I sometimes notice error boxes appearing on the screen. Yet the test continues, only to fail later.

The classic example is 

  MEDIAWIKI_PASSWORD=wrong MEDIAWIKI_URL=http://en.wikipedia.beta.wmflabs.org/wiki/ MEDIAWIKI_USER=Selenium_user bundle exec cucumber features/flow_logged_in.feature

the login fails with "Login error Incorrect password..." yet the tests continue.

There are other examples where the page reports an API error and the tests keep rolling.

99% of the time, if anything appears on the page with class=errorbox or class=error, it's serious.  Is there a way tests can implicitly assert these aren't on the page on every step, and if not the case report the contents of the .error/.errorbox ?
Comment 1 Željko Filipin 2014-03-03 14:11:09 UTC
S, do you need help implementing this?
Comment 2 spage 2014-09-30 20:50:52 UTC
(In reply to Željko Filipin from comment #1)
> S, do you need help implementing this?

Always :)

A simple test case for the utility of this is any browser test that logs in via Special:UserLogin, e.g.
  cd extensions/Flow/tests/browser
  export MEDIAWIKI_PASSWORD=WRONGwrong
  bundle exec cucumber features/action_menu_permalink.feature

Current result is test fails with
    Given I am logged in  # mediawiki_selenium-0.3.2/lib/mediawiki_selenium/step_definitions/login_steps.rb:12
      Connection refused - connect(2) for "127.0.0.1" port 9515 (Errno::ECONNREFUSED)

A more useful result is something like
    Given I am logged in  # mediawiki_selenium-0.3.2/lib/mediawiki_selenium/step_definitions/login_steps.rb:12
      visible errorbox on page with contents "<strong>Login error</strong><br>Incorrect password entered. Please try again."
Comment 3 Željko Filipin 2014-10-01 10:27:57 UTC
Chris, Dan and me should be able to help you. Feel free to ping me via e-mail if you would like to pair with me in your morning (my afternoon).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links