Commit graph

52 commits

Author SHA1 Message Date
Željko Filipin 189d606fe0 Fix Cucumber tags for Selenium tests
no_javascript.feature was not running for Chrome, but it works fine.
Fixed.

We are no longer running any Echo tests in Internet Explorer. Fixed.

All scenarios run just fine when targeting mediawiki-vagrant machine
with echo role, so I have added @vagrant tag to both feature files.

Bug: T94152
Change-Id: I2c206048c615583bacc9d6c5f5c2e6ffeaea3462
2016-02-22 13:51:17 +00:00
jenkins-bot 1c187bbf76 Merge "Add @integration tag to browser tests" 2016-01-19 02:18:07 +00:00
Kunal Mehta 4139806924 Add @integration tag to browser tests
Bug: T109679
Change-Id: I54653c0ab90e634b49516d9840c862dd91702be7
2016-01-19 02:11:19 +00:00
Željko Filipin a7a391c4d2 Update mediawiki_selenium Ruby gem to the latest version
Bug: T114241
Change-Id: I7056dd7113791ece87cecb968e60ee88969f6d1a
2015-12-16 16:39:54 +01:00
Moriel Schottlender 4bbaf77c2a Change the naming of 'notification option' to 'notification item' widgets
This is in preparation of adding more item models and widget types,
and in preparation of switching the notification widget away from being
a select widget.

Change-Id: I518fb3d80f4f67d677c21ca5593638269acfa544
2015-11-19 16:52:04 -08:00
Stephane Bisson 10c4ed6f49 Browser Tests: fix
* extract notifications to components/notifications.rb
* wait for the flyout to be loaded before counting
  the unread notifications
* remove popup.feature because it is redudant with
  notifications.feature and too low-level
  for acceptance testing

Change-Id: If0b0286e8e98e379ae1d6d91db8084adda93b3f6
2015-11-12 15:17:07 -08:00
Stephane Bisson ba2d072255 Browser tests: using mw_selenium 1.5 because 1.6 is broken
mw_selenium errors out with undefined method `last_session_ids='
when run in jenkins.

Bug: T114368
Change-Id: Ie4d1b15be3b12694d9adba8747f1457f43ead57c
2015-10-23 11:53:34 -04:00
Moriel Schottlender 8b2c6355cc Add browser test for notifications in Echo
This browser test checks that mentions go to alerts and talk page
messages go to messages popup. This also upgrades the MW-Selenium
version in Echo tests to 1.6.1.

Depends on MW-Selenium version 1.6.1 (See T114061)

Bug: T113081
Change-Id: I40a17500cdfb838420c04dc0b9268ba56515cc2c
2015-10-04 22:23:51 -07:00
Željko Filipin 8afe4c1c15 Fixed Metrics/LineLength RuboCop offense
Bug: T114095
Change-Id: I598e4782e97c7b571f92a802c816db6567169d1d
2015-09-29 14:59:05 +02:00
Moriel Schottlender 3ea86361a4 Rewrite browser tests for Echo
The new oouified echo popup makes the tests invalid; this commit
rewrites those tests.

Also by doing this commit we are upgrading to Selenium 1.4.

Change-Id: I26215558768d55be449276c55b4b745c3a458ecb
2015-09-25 15:50:59 -07:00
Moriel Schottlender 1ac72cc01a Split alerts and messages in Echo
Split the notifications into 'alert' and 'message' badget with two
different flyouts. Also clean up styling and module behavior.

** Depends on ooui change Id4bbe14ba0bf6c for footers in popups.
** Depends on ooui change Ie93e4d6ed5637c for fixing a bug in
   inverted icons.

** MobileFrontend must also be updated to support the new modules
   in this patch  I168f485d6e54cb4067

In this change:
* Split notifcations into alert and messages and display those in
  two different badges.
* Create two separate flyout/popups for each category with their
  notifications.
* Create a view-model to control notification state and emit events
  for both the popup and the badge to intercept and react to.
* Clean up module load and distribution:
  * Create an ext.echo.ui module for javascript-ui support and ooui
    widgets.
  * Create an ext.echo.nojs module that unifies all base classes that
    are needed for both nojs and js support, that the js version
    builds upon.
  * Create a separate ext.echo.logger module as a singleton that can
    be called to perform all logging.
* Clean up style uses
  * Move the special page LESS file into nojs module so all styles
    load properly even in nojs mode.
  * Transfer some of the styling from JS to LESS for consistency.
  * Make the 'read more' button load already with the styles it
    needs to look like a button, since its behavior is similar in
    nojs and js vesions, but before its classes were applied only
    by the js, making it inconsistent and also making its appearance
    'jump' from a link to a button.
* Delete and clean up all old and unused files.
* Moved 'Help.png' icon from modules/overlay to modules/icons for
  later use.

Bug: T108190
Change-Id: I55f440ed9f64c46817f620328a6bb522d44c9ca9
2015-09-02 15:36:37 -07:00
Matthew Flaschen a6412a6d27 Fix typo in scenario name
Change-Id: I90cf03197c715dc7c786479056f95137245ef939
2015-06-11 23:02:12 -04:00
Cmcmahon 4631bc8d94 QA: insert one-second sleep for Chrome workaround
As of about 4 March, Chrome has begun failing to wait for javascript
event listeners on pages. The only workaround we've found is to
pause for a bit before clicking any element that brings up a WMF
"overlay"

This is the failure see at
https://integration.wikimedia.org/ci/view/BrowserTests/view/-All/job/browsertests-Echo-en.wikipedia.beta.wmflabs.org-linux-chrome-sauce/399/testReport/

Change-Id: I984f394a55423f17feae85236e18d16dd00239bc
2015-03-09 18:43:24 -04:00
Cmcmahon 68c8a7a65a QA: rubocop fixes broke the tests in the builds
regenerated rubocop config so those checks also stay green

Change-Id: Ib8a88c88c02d1638e758d62eb86f2ac59feefe5d
2015-02-23 09:44:41 -07:00
jenkins-bot f0cd4d5076 Merge "QA: update for rubocop offenses" 2015-02-20 17:02:37 +00:00
Cmcmahon 7d607dbfb6 QA: update for rubocop offenses
Do not name methods starting with "get"

Change-Id: If4adf0c775b031d6a462e00aed8b588077169413
2015-02-20 10:00:01 -07:00
jenkins-bot 5f93e4defe Merge "QA: more rubocop updates" 2015-02-20 16:57:10 +00:00
Cmcmahon 60a0e05c7c QA: more rubocop updates
No change to function at all

Change-Id: I150aed4379c75f716633cc4904cb9d8f388c9d45
2015-02-20 09:54:06 -07:00
jenkins-bot 1ae16a6358 Merge "QA: update for rubocop offenses" 2015-02-20 16:52:11 +00:00
Cmcmahon fcd695a076 QA: update for rubocop offenses
No change to function, just cleaning up

Change-Id: I1b0b4fe8e4f785cbeebc2d1415a45f831dc75f5c
2015-02-20 09:49:38 -07:00
Cmcmahon 46f2d7c46d QA: robustify Notification no-javascript test
Identify the first heading better

Change-Id: Idb029c43b20915022f4d566a7795c3e0ec55cea2
2015-02-09 13:48:02 -07:00
Cmcmahon bf9773e6ed QA update for single quote preference
Change-Id: I35d22c47abd78a588f622b9b7cd07444c345db5a
2014-11-10 14:21:28 -07:00
Cmcmahon 6468f8e575 QA update quotes for string interpolation
Change-Id: Ic74333eea147183f407ffbe2b5319bb4683b5833
2014-11-10 14:14:52 -07:00
Cmcmahon 1ac73fa54b QA: rubocop updates
Change-Id: I580ec597dbb0d1dcd0830233995f94bc27d10278
2014-11-10 10:50:10 -07:00
Cmcmahon 0bfd18dbc7 QA: rubocop config updated to baseline again
Change-Id: Ic399ef9bb681cfed25b0b775b0c430e338f11bd3
2014-11-07 14:19:31 -07:00
Željko Filipin 57241c6867 Prepare repository for running RuboCop after every push to Gerrit
For now ignoring all problems.

Bug: 69245
Change-Id: I0e411fba725ecd9aea0ef9d40a145efb62bbf0fa
2014-10-21 12:59:54 +02:00
jenkins-bot 94736491cb Merge "QA: replace hard-coded 7 seconds sleep with poll method" 2014-09-25 22:52:17 +00:00
jenkins-bot d3a093ae68 Merge "QA update feature descriptions for messages test" 2014-09-25 21:41:04 +00:00
Cmcmahon 530688aa39 QA: replace hard-coded 7 seconds sleep with poll method
The step formerly know as "I come back from grabbing a cup of coffee"
is replaced by a step that reloads the page a number of times, where
that number may be set by the user.  If the notification has arrived,
the polling stops and the test continues.

In practice with a local browser pointed to beta labs, the
notification is arriving in plenty of time for the first page load
and I do not see the page reloading at all.

Change-Id: I95dd77d4f5525645e46244e40bfcd86e9124f3b1
2014-09-24 15:07:10 -07:00
Cmcmahon 8f2681c01b QA update feature descriptions for messages test
Cucumber Scenario and Feature description are just plain text.
Instead of using comments, it is far better to describe in each
test step what should happen in each test step.

I believe I have described these test steps correctly. Please
advise if they need to be tweaked.

(The test itself seems to be fine, but feel free to review that
also)

Finally, since messages.feature uses the "I have no new notifications"
step, I updated those assertions for modern RSpec syntax

Change-Id: Ie884a85c1fc3f7045773a271a8d76fad6b0b3826
2014-09-24 11:50:18 -07:00
Cmcmahon 4961e32b53 QA: add modern assertions to flyout tests
"Then" steps should always contains RSpec assertions. In the
past this meant using some version of the word "should", but
the modern convention in RSpec is to use "expect()" as I
did here.

Change-Id: I1c438a310803e29c0985328a76d2ec08578e0cb0
2014-09-23 14:14:47 -07:00
Cmcmahon b3df4d0814 QA: Refactoring and making the nojs test dtrt
* add @custom_browser tag so we don't create an extra browser instance
* remove @chrome tag because this only works in Firefox
* alphabetize within G/W/T buckets in commons_steps.rb
* alphabetize flyout_steps.rb
* bring env.rb up to date with the modern situation
* make assertions about the URL and heading on the final destination page
* update Ruby gems, especially mediawiki-selenium with a @custom_browser improvement
** use modern RSpec assert syntax
*** we're going to have to update all the repos for this soon

Change-Id: I6cb20126a662bd2a20e2b4bbebe91e8f3b04c7df
2014-09-23 13:35:50 -07:00
Cmcmahon 50790b2965 QA: refactor for consistent Ruby practice
* use symbols not strings for element labels
* use double quotes except where single quotes required

Change-Id: I4eef50206c526611da535e529035c076d5bce266
2014-09-17 16:27:24 -07:00
S Page a1864d71c8 QA: Update selenium-webdriver so Firefox 32 works
I did `bundle update`.
Without this, browser tests on Firefox 32 fail with
`unable to obtain stable firefox connection in 60 seconds
(127.0.0.1:7055) (Selenium::WebDriver::Error::WebDriverError)`

Change I26190cca06ee gave Flow the same update, this Gemfile.lock is
identical except Echo has a "chunky_png" gem.

Change-Id: I0b62134d38f3262b734af83cc58b644040857645
2014-09-16 17:49:38 -07:00
Cmcmahon 7eacda1306 QA: get messages test to pass properly
This is lieu of

https://gerrit.wikimedia.org/r/#/c/159685/

If we merge this patch, we should abandon 159685

Change-Id: I84e0a1df6076a68ee7e97feb929195da9937c412
2014-09-15 11:07:45 -07:00
S Page b634890634 QA: Fix missing "Given I am logged in as a new user"
Echo browser tests pass, but are skipping
  Scenario: New user gets a sign up notification
because a step definition is missing.

I simply adapted
  ^I am logged in as a new user with no notifications$
and the scenario passes in chrome.

Change-Id: I9f2bd10d05b689eaacbf2890913786eb157d6af9
2014-09-10 15:26:53 +00:00
Cmcmahon 76665c552a QA: make Feature names easy to read
Don't duplicate "Notification types" Feature between tests. I
guess this was a copy/paste issue.

Change-Id: I032130024113bb326f0cfbbe09cd7455bdaf7ab5
2014-09-02 10:26:59 -07:00
jdlrobson d8702e46b4 QA: Add browser test for user rights change
Change-Id: I9cb453d1107d0fe961abb32d358a4c00bb9f40c8
2014-08-28 13:57:03 -07:00
Cmcmahon c982b0a4fa QA: update to fix deprecated API token call
Change-Id: I8046af1add07e26e40fc000a9feeab65b75e4b68
2014-08-27 08:57:45 -07:00
jdlrobson 5c73416b4c QA: Add missing browser test steps
Change-Id: I3a54902ae1cf2d2b7263243722bb0b7f57bcba95
2014-08-21 00:02:42 -07:00
Cmcmahon 37812e4bab QA: add test2 tag for Jenkins builds
Change-Id: I3d5195e58ac4f617baa358624543ffdfdc8fb7bd
2014-08-18 10:44:00 -07:00
Cmcmahon 2b472785ef QA: add @login tag for Jenkins build
Change-Id: I0f2aa8f2f42c2fbb986a14e7ab50d6ccbe814b48
2014-08-15 13:13:15 -07:00
Erik Bernhardson 4deca8b9d8 Merge remote-tracking branch 'gerrit/two_tabs'
Change-Id: Ie2c7abd1df09c501e86c6ef4c22fd8670163de4c
2014-08-14 11:51:43 -07:00
jenkins-bot 1510733291 Merge "Revert "Revert "Merge remote-tracking branch 'gerrit/master' into two_tabs""" 2014-08-14 18:47:40 +00:00
Bsitu 483e7e80d5 Revert "Revert "Merge remote-tracking branch 'gerrit/master' into two_tabs""
This reverts commit b9574748a4.

Change-Id: I8a8334db446dd6a2d5363a1f6ab12369b813b026
2014-08-14 18:46:26 +00:00
jenkins-bot ec9fda274a Merge "Revert "Merge remote-tracking branch 'gerrit/master' into two_tabs"" 2014-08-14 18:32:38 +00:00
EBernhardson b9574748a4 Revert "Merge remote-tracking branch 'gerrit/master' into two_tabs"
This was supposed to merge master into the two_tabs branch, but it was accidently done against master instead

This reverts commit 06ee936e92.

Change-Id: I98da735b7d5c103399a2478286d1420243df6ba4
2014-08-14 18:27:19 +00:00
Cmcmahon ebc7192684 QA: committing Gemfile.lock
need to update mediawiki-api gem

Change-Id: Ifd682db5c73a6eda2f085364808bf6c1be21b98a
2014-08-14 08:52:30 -07:00
jdlrobson 92ee69b92d E2f: mark all as read behaviour
Also adds browser tests for the behaviour of the mark all as read button
to ensure it only clears message notifications.

Dependency:  Ifb7b1b7b7feb4a5af65c79bb16b91a5a9c70166c
Change-Id: I46e1de229e32d705e67cebde678ecea3f3633906
2014-08-13 17:08:16 -07:00
jdlrobson def2e070f7 QA: Browser tests for Echo notifications
* Someone links to my page
* Someone mentions me
* Someone writes on my talk page (if it's not a Flow board)
* When I register

Change-Id: I12d1c6867d996c19fbd836658e87acd418e03527
2014-08-13 13:16:37 -07:00