Commit graph

110 commits

Author SHA1 Message Date
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
jenkins-bot c5559da8cb Merge "Detect signature using Title class" 2014-10-23 21:25:37 +00: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
Erik Bernhardson 8da75c3a50 Detect signature using Title class
Currently echo attempts to find a signature by looking for a series of
strings starting with what it thinks are the current aliases of NS_USER
and NS_USER_TALK.  This has shown to be error prone, see the linked bug
for how a change to ru.wikipedia.org/wiki/Mediawiki:Signature broke
mention notifications.

Patch switches things arround to pull wikilinks out of the text and run
them through the Title class.  The results of this parsing are checked
for NS_USER and NS_USER_TALK, giving a much stronger guarantee of finding
translated namespaces.

Bug: 71353
Change-Id: Ib0d0f4e068339d2fd28761087c05f5a1acb3c1fc
2014-09-30 19:06:16 -07:00
bsitu 55ef794d74 Add job to keep user notifications in reasonable volume
Change-Id: I4d4fa4c987a1732e5e29536a7669e28c34d4ab18
2014-09-29 23:10:18 +00: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
Matthias Mullie adfb235de0 Switch the order of Alerts and Messages tabs
Change-Id: I864d45336c23331543ff6aaea8ec6512d4fba0c3
2014-09-10 15:31:09 +00: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
jdlrobson 2cacf82efa Restore QUnit tests to reflect alert as default tab
This reverts the tests and amends them after the
application of commit 5da9eac08a.

Luckily nothing appears to be broken.

Change-Id: I67acfe5dc74ef750d5443dd619dbb114623ee233
2014-09-09 13:23:37 -07:00
bsitu 9c55aa0fc8 Colors are backwards for flyout section link
Also make active section link not clickable

Change-Id: I7f391929382489e8bad5ab56fea9f2ef7b2978b0
2014-09-09 16:31:23 +02:00
Erik Bernhardson 5da9eac08a Default to alerts tab
The only exception is when there are new message notifications but no new
alert notifications.

Bug: 70461
Change-Id: I06daa3f7d526beeb878eb343c169e01acd49e71f
2014-09-08 13:18:51 -07:00
Erik Bernhardson 584394fcde Hygiene: Give ApiStub modes names instead of numbers
Change-Id: Ia01ba14a1b2ab179454f14e5a1595ff468c46fc5
2014-09-05 16:52:42 -07: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
jenkins-bot d807d9f62e Merge "Hygiene: Move notification type detection to method" 2014-08-25 22:06:17 +00:00
bsitu f29f7303d1 Make timestamp in consistent format after loaded from database
Notification timestamp is generated in MW format (YYYYMMDDHHMMSS)
inside the model and saved to the database in db specific format,
We need to convert it back to MW format when loading the data
from the database, it just happens that MW format is the same
as MySQL timestamp format

Change-Id: Ie881b66c8c24d57a8933c0153e9e7db5fe6aa017
2014-08-22 15:53:51 -07:00
Erik Bernhardson ae3b1f2944 Hygiene: Move notification type detection to method
* Moved most of the content from notify to getEventNotifyTypes
* Added phpunit test verifying per-event config overrides defaults
* Remove special-snowflake welcome handling with proper configuration

Change-Id: Ic1aae11d37f23f2b7b8abe3c1edaa414e29be021
2014-08-22 14:05:47 -07:00
bsitu 092127726b Hygiene: Echo/tests/phpunit/ directory structure should mimic Echo/
Change-Id: I4867d09bb815d621f9feaaf7b8a541e5d817e0d2
2014-08-21 22:58:27 +00:00
jdlrobson 5c73416b4c QA: Add missing browser test steps
Change-Id: I3a54902ae1cf2d2b7263243722bb0b7f57bcba95
2014-08-21 00:02:42 -07:00
jenkins-bot 51dda5473c Merge "[2] Add title local cache holder objects" 2014-08-19 17:57:22 +00:00
bsitu 1270da19e8 [2] Add title local cache holder objects
Core titleCache doesn't do what I expect it to do, issuing
Title::newFromId( 1 ) mulitple times would issue multiple
idential queries to the database. It doesn't return what's
already in the cache.

The goal of this patch is to batch load titles via newFromIDs,
and save the number of mysql queries

Change-Id: I8fe767ac2669e67bdf7d17eecccfc0dcb6b5fc7d
2014-08-18 13:52:40 -07:00
Cmcmahon 37812e4bab QA: add test2 tag for Jenkins builds
Change-Id: I3d5195e58ac4f617baa358624543ffdfdc8fb7bd
2014-08-18 10:44:00 -07:00
jenkins-bot a3449bfb67 Merge "Hygiene: Stop using id for footer" 2014-08-18 17:27:00 +00:00
jenkins-bot 7fac1c3ee8 Merge "Use batch queries for users-watching-title" 2014-08-18 08:33:13 +00:00
Cmcmahon 2b472785ef QA: add @login tag for Jenkins build
Change-Id: I0f2aa8f2f42c2fbb986a14e7ab50d6ccbe814b48
2014-08-15 13:13:15 -07:00
jenkins-bot 124cbbd036 Merge "Auto mark notification as read if it doesn't have target page" 2014-08-15 18:35:27 +00:00
Erik Bernhardson 1667e25854 Use batch queries for users-watching-title
The new locateUsersWatchingTitle implementation could end up returning
thousands of users, currently on enwiki there are 25 titles with more
than 10k subscribed users and aprox 550 titles with more than 1k subscribed
users.

This switches the user collection to an iterator based implementation so that
we no longer need to have the entire users list at any one time.

Change-Id: I3d3fa9328f348bb48682d3658622952ce82d3925
2014-08-15 10:44:55 -07:00
jdlrobson 965a8b8a2f Hygiene: Stop using id for footer
No need. Class works perfectly fine here.

Change-Id: I8188e759ad3eed971d5847b23d49b333d80b509f
2014-08-15 17:43:56 +00:00
bsitu 61fea56641 Create TargetPage data if specified by EchoEvent
Change-Id: I71039eb03b4b7e617ce03d515a6d51c4f3666ab8
2014-08-15 00:16:41 +00:00
bsitu 7be9d68219 Auto mark notification as read if it doesn't have target page
The special page will now not auto mark a notification as read if
it has a target url. Currently no notifications have target urls
but this will be changed in a later patch...

Change-Id: I9bd71d59391189d5d761ab5f1c84af0bc3554be0
2014-08-15 00:11:57 +00:00
bsitu cac4050990 Mark notification as read upon visiting a page
Change-Id: I84493fbf742acd90645d484d42f049796a5e48ee
2014-08-14 14:10:55 -07:00
jenkins-bot f001382328 Merge "Add TargetPage model and mapper to notifications" 2014-08-14 20:18:44 +00:00
jenkins-bot 6c19cf53c2 Merge "Merge remote-tracking branch 'gerrit/two_tabs'" 2014-08-14 18:52:56 +00:00
Erik Bernhardson 4deca8b9d8 Merge remote-tracking branch 'gerrit/two_tabs'
Change-Id: Ie2c7abd1df09c501e86c6ef4c22fd8670163de4c
2014-08-14 11:51:43 -07:00
jenkins-bot d3d39ef55c Merge "Add support to mark all as read for "sections"" 2014-08-14 18:51:03 +00: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