Commit graph

72 commits

Author SHA1 Message Date
Antoine Musso 61fdd5e528 Browser test: update mw.org tag to use canonical URL
The browser test job uses 'www.mediawiki.org' to hit the API which is
then passed to cucumber for tag filter.

Update the scenario tag to match the canonical URL.

Bug: T128079
Change-Id: I68217b3e9867b768ccbba24bbffaa431c1c3035f
2016-03-10 10:18:13 +01:00
Željko Filipin 20e7873250 Fix browsertests-MultimediaViewer-mediawiki.org-linux-firefox-sauce Jenkins job
The job was failing with `301 Moved Permanently`. The problem was that
`mediawiki_url` was not `https` and was missing `www`.

Bug: T128079
Change-Id: I4f142c4ed17826b1e4051846395940e139e47689
2016-03-07 15:14:52 +00:00
Željko Filipin aa0a725a0e Do not run browser tests that fail with Internet Explorer 8 daily
Bug: T128072
Change-Id: If3cc10004c9d3a9f93307dffb41e82f33853b5fd
2016-02-25 14:44:41 +01:00
Željko Filipin 13adb73273 Set a user-agent in browser tests
We used to rely on the env variable BROWSER_USERAGENT for tests
requiring a customer user agent. 2c3ac55a6 got rid of it in favor of
loading the :browser_useragent from environments.yml where it has not
been set. That in turns caused tests to fail with:

    "missing configuration for browser_useragent"

Set browser_useragent to 'test-user-agent' in the environments.yml

Also drop unused test2 env and add mediawiki-org

Bug: T128064
Change-Id: I720d590505dd5e30c6e9435de456563b8d36f9ea
2016-02-25 13:25:03 +01:00
Željko Filipin 66b0020525 Fix "undefined method test_name" error message in Selenium tests
`test_name` method was removed in mediawiki_selenium 1.6.0.

Bug: T125072
Change-Id: Iac7725b601e099a3567d4e3f4a8743babdadfee5
2016-02-24 15:53:22 +01:00
jdlrobson 5736f8e0a9 Add integration tests to each commit
Additional changes:
* Add a step to check JS has loaded
* Update selector to work on non-vagrant instances

Bug: T113620
Change-Id: Ib7579a43adc37b6e4add8b0ab75f99b6ab994bb6
2016-01-27 10:12:19 -08:00
Željko Filipin c8237daa5b Fixed Style/StringLiterals RuboCop offense
See:
https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
Bug: T117984

Change-Id: I5388aa3f7c47b9667a03d905f6562dfe6939a70e
2015-12-09 17:21:54 +01:00
Željko Filipin 810506a063 Fixed Style/VariableName RuboCop offense
See:
https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-v
ars
Bug: T117984

Change-Id: I51b5ee142bc845b799b53e356a604aefb13d7f7d
2015-12-09 17:17:24 +01:00
Željko Filipin fba53b776c Fixed Style/TrailingBlankLines RuboCop offense
Change-Id: I7cbfd6d148982039c720fc4fb72e410372a0cbde
See: https://github.com/bbatsov/ruby-style-guide#newline-eof
Bug: T117984
2015-12-09 17:09:10 +01:00
Željko Filipin 346275f751 Fixed Style/Semicolon RuboCop offense
Change-Id: Ib01751f81e921beb3c7e157f9e8037859eb1b3f6
See: https://github.com/bbatsov/ruby-style-guide#no-semicolon
Bug: T117984
2015-12-09 17:08:01 +01:00
Željko Filipin 3bbd3fa72a Fixed Style/RegexpLiteral RuboCop offense
Change-Id: Ic42bb88931e8184bf43edd419d2a82cf36a95038
See: https://github.com/bbatsov/ruby-style-guide#percent-r
Bug: T117984
2015-12-09 17:06:51 +01:00
Željko Filipin 1b8964e86f Fixed Style/LeadingCommentSpace RuboCop offense
Change-Id: Id20fb9d5b9c0ca6a6c2c34812f4130d2c8fb0c93
See: https://github.com/bbatsov/ruby-style-guide#hash-space
Bug: T117984
2015-12-09 16:58:36 +01:00
Željko Filipin 9cf6ba3887 Fixed Lint/UnusedBlockArgument RuboCop offense
See https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars

Bug: T117984
Change-Id: Ie4e7204931f70e87303485176a40c68af3d1c31f
2015-12-09 16:54:58 +01:00
Željko Filipin 2c3ac55a67 Upgrade browser tests to the latest version of mediawiki_selenium Ruby gem
Bug: T99659
Change-Id: I57c9c73284ed856ee1d9a8f490cd511d07953f77
2015-11-25 17:25:58 +01:00
Gilles Dubuc f70cefa771 Increase values for frequent beta browser tests timeouts
Bug: T94157
Change-Id: Ifad79b74fe2d99fb9fac9ed196e7597d2aff43aa
2015-04-06 14:19:53 +02:00
Gilles Dubuc 96d4e6a4f2 Differentiate placeholder and final image
Should fix intermittent issues happening with the browser tests,
which can't currently tell the difference between the placeholder
and the final image.

Bug: T90589
Change-Id: Ibfdff4721ce5f37831863110ad1a2f9650b24d5e
2015-03-18 09:41:48 +01:00
jenkins-bot 6aa3dddf80 Merge "Workaround for Safari web driver" 2015-02-27 03:06:43 +00:00
Gilles Dubuc 40c7284911 Make media viewer use the same prefix as mobile
Keep responding to the legacy prefix, since many links on the web
are referencing it.

Bug: T87769
Change-Id: I0936ada35141ddd85e0aa232b833d315e3246ce3
2015-02-25 21:22:05 +01:00
Gilles Dubuc 7b897e9c07 Workaround for Safari web driver
It doesn't support mouse move, so let's do a plain click in that case

Bug: T89087
Change-Id: Idb89b72896d29772aff893c7cde92728450cc678
2015-02-23 18:59:05 +00:00
Gilles Dubuc 94ac32835d Click in the top-left corner of the image when trying to close the download dialog
This should fix the failures happening in IE.

Bug: T89087
Change-Id: Ia0128a9c85891e8f2d89098c898d5927f01fbedd
2015-02-13 12:21:56 +01:00
Gilles Dubuc 8c37b7abb4 Wait for the download menu to appear before closing it
In practice doing this quickly still works, but the browser test in IE
catches the menu at exactly the wrong time (when it appears briefly
before disappearing).

Bug: T89087
Change-Id: I4076943bf33a566ec882f69d17f6a3a9f1a28002
2015-02-11 20:28:13 +01:00
Gilles Dubuc e3b222ffa2 Attempt to improve reliability of cucumber tests
Bug: T87831
Change-Id: I4c1049037f788630c84d4780309d683682fe756f
2015-01-28 16:46:27 -08:00
Cmcmahon c3a7bb5782 QA: back button workaround for Safari
Bug T85802

Change-Id: I4a3b360ffddbab5c22ca1eb3b03c45159425de70
2015-01-05 09:43:23 -07:00
Cmcmahon 711e2837fc QA: update navigation test for rspec
This should be pretty straightforward

* use RSpec3 expect() syntax
* prefer string to regex as argument to match() when appropriate
* use Selenium $browser.back instead of inline javascript

Change-Id: I2e214752224397859a00f11bf9acc5bdc7685464
2014-12-17 15:02:38 -07:00
Cmcmahon 32cd6c7892 QA: WIP update tests for RSpec3 syntax etc.
Add back a sleep to make the test pass

* make a Then statement with no assertion into a When
* remove Then statements assertions from Given steps
* prefer single quotes per rubocop
* use strings instead of regexes where appropriate for match operator
* use appropriate wait_until syntax
* remove redundant steps that call a single other step
* sort invisible selection criteria from steps to Feature input
* add when_present polling because test is now much faster

Change-Id: I24435362836945833942e87d7caee49c9b34368d
2014-12-15 16:42:34 -07:00
Cmcmahon 021391f0e8 QA: wait for element to appear
prevent false failures like
https://integration.wikimedia.org/ci/view/BrowserTests/view/-All/job/browsertests-MultimediaViewer-en.wikipedia.beta.wmflabs.org-linux-firefox-sauce/lastCompletedBuild/testReport/(root)/Download%20menu/The_medium_download_option_has_the_correct_information/

Change-Id: I122a82a5ec802c0c0eec90b55757153a2ab58ef7
2014-11-20 13:03:37 -07:00
Trevor Parscal a8838e4bae Update OOjs UI Class Names (549ff9ab7d)
Changes were generated by running this script:
https://gist.github.com/trevorparscal/92ccdc4c49ab033d9ba8

File content changes:
Scripts (*.js)
- TextInputMenuWidget → TextInputMenuSelectWidget
- MenuWidget → MenuSelectWidget
- MenuItemWidget → MenuOptionWidget
- MenuSectionItemWidget → MenuSectionOptionWidget
- OutlineWidget → OutlineSelectWidget
- OutlineItemWidget → OutlineOptionWidget
Styles (*.less)
- textInputMenuWidget → textInputMenuSelectWidget
- menuWidget → menuSelectWidget
- menuItemWidget → menuOptionWidget
- menuSectionItemWidget → menuSectionOptionWidget
- outlineWidget → outlineSelectWidget
- outlineItemWidget → outlineOptionWidget

Change-Id: I19ad3990837c0c565773fbb4c3d9d4d18e5f616e
2014-11-20 01:04:32 +00:00
Gergő Tisza 7a791cc4e5 Fix RuboCop warnings about multiline block syntax
Change-Id: I96f3e90c35cbd081367b2b532851b310f9e410e9
2014-11-12 14:17:12 +00:00
Gergő Tisza 3a18515163 Replace filename with caption/description
* when the caption is available, use it as the image title
* otherwise, fall back to description if available
* otherwise, fall back to filename
* if both caption and description are available, show caption as
  title and show description below the fold; otherwise don't show anything
  below the fold.

Change-Id: I9738ca46620d7cf3b30f6e46790a37966d4b9eaf
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/589
2014-11-11 15:33:15 +00:00
Gergő Tisza f792a42f93 Change above-the-fold layout - step 2
* move license and terms link from title area to attribution area
* remove some ineffective styling for elements which have already been removed
  in earlier changes

Change-Id: I5bd41e337a4c8133bfa27e4c4d03162b2d6e35bb
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/833
2014-10-28 21:18:53 +00:00
jenkins-bot 569423d187 Merge "Prepare repository for running RuboCop after every push to Gerrit" 2014-10-21 16:32:35 +00:00
Željko Filipin eb7b5f9de2 Prepare repository for running RuboCop after every push to Gerrit
For now ignoring all problems.

Bug: 69245
Change-Id: Icebcad75b1d63efd7016b96a7ccdbe650f0c3894
2014-10-21 15:45:50 +02:00
Mark Holmquist feb8e43571 Add tests for viewing options panel
Change-Id: Ic7a856ac4d94f4a65224f4c6373938da7b05f0fd
2014-10-19 00:35:36 +02:00
jenkins-bot 82831601b8 Merge "E2E tests for download menu" 2014-10-16 08:56:23 +00:00
Gilles Dubuc c4fd6c3740 E2E tests for download menu
Change-Id: I3435366133a9b5fd6079c3a5bad270ee19da8daf
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/445
2014-10-15 23:07:21 +02:00
Reedy 8647d9b261 Fix file permissions
Bug: 71942
Change-Id: Icd64762906e1409354dcf9c40012b071ecd53f88
2014-10-14 18:17:07 +01:00
Cmcmahon f7e2c140e5 QA: update Ruby gems
Change-Id: I6fd2778ecc8cd25e694a2139563930d238ffd6e1
2014-10-01 08:44:36 -07:00
Gilles Dubuc abd38f8ae0 Fix repo/details check of E2E test
Change-Id: I116080a4047799cc883faa2b3d91141bedeaff01
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/923
2014-09-30 13:40:34 +02:00
Dan Duvall c5a245309d QA: Refactored performance tests
Fixed up feature indentation and clauses and moved global methods into
the page-object classes.

Added @custom-browser tag to avoid starting multiple browser sessions
and updated mediawiki_selenium dependency for fix to custom browser
instantiation with SauceLabs.

Change-Id: I9741afb8d13ee8729f72210eb7617d9446311a8e
2014-09-23 14:19:16 -07:00
Cmcmahon 15705664dd QA: add tags to run in IE builds
Also add tags to run all tests in beta and test2. Let's see
what happens and remove them later if necessary.

NOTE: one test had no tags and ostensibly should run only on mw.o
We may have to remove them later, but let's see what happens for
now

Change-Id: I9c4adc7803afc975d9643a35631801bbac459eb7
2014-09-12 09:46:44 -07:00
jenkins-bot 32429a7723 Merge "Revert "Change image load check strategy"" 2014-09-12 05:38:44 +00:00
Gergő Tisza ea0689a7e9 Revert "Change image load check strategy"
Experimental revert of commit 
d6c142fd2b to see if it caused
the weirdness in the versus charts:
http://multimedia-metrics.wmflabs.org/dashboards/mmv#media_viewer_vs_file_page-graphs-tab

That commit affecting file page load times is extremely unlikely. 
A change in the test environment which exactly coincided with it is 
equally unlikely. This is an easy way  to tell which is the case.

Change-Id: I3581abd36d25494ca294db892480e25f6f4c5a73
2014-09-11 12:48:38 +00:00
Gilles Dubuc 2ef45b3058 Remove categories
Change-Id: I309b01592e874579d50bf5fc0810c238d47748f5
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/835
2014-09-09 13:23:50 +00:00
Gilles Dubuc caa624d711 Remove file usage
Change-Id: I538f7734e1c06a179ee98a5cd843ccee4d91349f
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/835
2014-09-05 08:14:52 +02:00
Gilles Dubuc d6c142fd2b Change image load check strategy
Using the "complete" property worked for the file page, but not
for media viewer because change the src of an img doesn't reset
the prop.

This introduces a custom event that cucumber can listen to in order
to know when the full resolution image had been loaded in media
viewer.

Change-Id: I40875166e70badbb35106c4a3536c706a7c815b4
2014-08-28 07:33:58 +02:00
Cmcmahon 781fc6d409 QA: update to fix deprecated API token call
Change-Id: I8842899e2467efdb9ba4b3035b2e6dc0df340a96
2014-08-27 09:21:30 -07:00
Gilles Dubuc eef5fe7897 Add Safari to browser tags
The test passes on Cloudbees, we can now add the tag to make
it official

Change-Id: Id0ada2fbdb7e3fea1429d0cbec52b24e5815c4ac
2014-06-25 21:43:29 +00:00
Gergő Tisza 2616546468 Change "learn more" to "more details about this file"
Several people complained that "Learn more on Wikimedia Commons"
is not clear: it can be interpreted as a link to the Commons
main page, the text does not suggest that the link will be related
to this specific file. The new wording tries to address this.

Change-Id: Ia605cc30c4ca57598f7cebdde60061800a10b6e7
2014-06-18 19:10:11 +00:00
Gilles Dubuc eedc57c1c9 Wait some more for the close button to appear
During the warmup steps Media Viewer might take some time
to open, which might be why the close button won't appear in
less than 5 seconds

Change-Id: I3b17d46c3343f2b1ff33aaaf55faa4adb71cb218
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/618
2014-05-16 11:36:12 +02:00
Gilles Dubuc c6411d3c6a Add 1 pixel of tolerance to the basic test.
This is the first failure that the E2E test is running into when being
run on IE9

Change-Id: I60fe8764196ecc60e2c365576349cf902a069ddb
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/577
2014-05-15 20:41:08 +00:00