Commit graph

417 commits

Author SHA1 Message Date
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
Andrew H 1b2866df0d Shorten MediaViewer credit lines
Drop the title and site name. Use a shortened URL
created using the pageID for the curid query parameter.

Add pageID property to mmv.model.Image, using value already
fetched from an existing API request.

Bug: T119686
Depends-On: I0f00b986e6095bdb9b8d6af6fbc5b01995227e02
Change-Id: I9189f00bfbf7639974d66cf1921773855a77a865
2016-01-10 23:44:23 +00:00
Julius Alphonso a9758d21e0 Remove uploader's name from MediaViewer
Only last uploader's name is shows, this turns out to be
more confusing than useful.

Bug: T59308
Change-Id: I7d06b72c581fe8738bffc64b5e36be9983b01ccf
2015-12-29 10:56:08 +05:30
Ž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
Tisza Gergő 6dddb2f7db Do not set up the overlay on irrelevant hash changes
On not-MMV -> not-MMV hash changes the bootstrap class has set
up and immediately torn down the overlay. Besides slowing things
down, this broke TOC navigation on Chrome in an ugly way.

Add a special case to skip the overlay loading when the new hash
does not contain #/media. This is a quick-and-dirty fix; the whole
loading and hash handling could use a rewrite.

Bug: T119854
Change-Id: I5494903dfe778e533773ff142fdf756475c2df32
2015-12-06 08:00:22 +00: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 be1ba4622f Turn mmv-next/mmv-prev into OO events
More of those events sent to the document can be converted, but it's a start...

Bug: T77253
Change-Id: I6100ce303346ab9fa94332e91f5d730dc83f4e65
2015-09-29 13:11:22 +02:00
Gilles Dubuc 90e956e080 Remove CSS readiness workaround
RL's support for this should be bug-free now

Bug: T63852
Change-Id: Iaa6355648dcc1eb1780a7b1ee7e461d4213e3017
2015-09-04 13:04:58 +02:00
Gilles Dubuc a05eedb941 Set test assertions to new date format
Bug: T107417
Change-Id: I1f36ff5d6ae0e1edb5f066ec44c355bdc5f59bb0
2015-07-30 14:13:27 +02:00
Geoffrey Mon a7f11a7c45 Moar restriction icons!
Icons for all important non-copyright restriction types.
Also, some tweaks made in CSS e.g. add 1 px margin to top of mw-mmv-labels
Finally, new test to check if default restriction is placed last.

Example files:
copydesign: https://commons.wikimedia.org/wiki/File:Peugeot_404_dsc01875.jpg
trademark: https://commons.wikimedia.org/wiki/File:Logo_NIKE.svg
trademark+insignia: https://commons.wikimedia.org/wiki/File:Flag_of_UNESCO.svg
personality: https://commons.wikimedia.org/wiki/File:Vice_President_Megawati_Sukarnoputri_-_Indonesia.jpg
communist+insignia: https://commons.wikimedia.org/wiki/File:Flag_of_Georgian_SSR.svg
nazi: https://commons.wikimedia.org/wiki/File:PropagandaNaziJapaneseMonster.gif
costume: https://commons.wikimedia.org/wiki/File:Shrek_%26_Fiona.jpg
fan-art: https://commons.wikimedia.org/wiki/File:Magic_wand.gif
(I think that's enough)

Bug: T102693
Change-Id: I907396c59752511448145a4ac5d29096166f841f
2015-07-16 01:06:39 +00:00
Gilles Dubuc 95dcc971b0 Reduce number of RL modules in MultimediaViewer
Having many modules makes the startup module in the head
unnecessarily longer. Things should only be in their own
module if they're going to be loaded on demand on their
own or are a shared dependency of separate modules that
are.

This change brings down the amount of modules declared by
Media Viewer from 53 to 8. The ones that remain are
mostly things loaded on demand.

Bug: T103706
Change-Id: I5b0d29209599285b93217e96def818e641646c73
2015-07-10 00:07:14 +02:00
jenkins-bot 9dab34cc69 Merge "Fix two failing QUnit tests" 2015-06-21 23:00:38 +00:00
Gilles Dubuc ecc5b58cfa Remove the 640 bucket
It decreases the likelihood of Varnish hits and is only 11% smaller on
average in file weight than the 800 bucket.

Bug: T102870
Change-Id: I8611791a192fa7b0e638ccfc886733b75bf30aed
2015-06-18 10:18:00 +02:00
Thiemo Mättig 34a24b016a Fix two failing QUnit tests
These two tests fail on my local machine. I am making the two
assertions independent from
a) the order of HTML attributes (the test should not care about
   the order, only if the attributes are there or not)
b) the message (both messages are possible and valid, the question
   which message should appear is not part of that specific test).

Change-Id: I69b4793d365d3afebb869c787316e4242cb15b25
2015-05-20 12:48:59 +02: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 a45f7b48f0 Make progress bar qunit tests more robust
Bug: T93540
Change-Id: Id46d3ffd4e9f89a834162b595e36a26e1186c0a5
2015-03-24 12:24:10 +01: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
Gergő Tisza c3c549f1b4 Make logging less noisy in debug mode
Suppress logger console output if the logger is disabled.

Change-Id: I5f45bb7fc68f33880f8a4d1737f0055335fe5071
2015-02-19 23:50:04 +00:00
jenkins-bot 4abcc2e13c Merge "Click in the top-left corner of the image when trying to close the download dialog" 2015-02-13 22:44:58 +00:00
Gilles Dubuc 1409475187 Adapt to OOUI change in dropdown widget
Bug: T89444
Change-Id: Ie65ad811296b5bce6c43f6c37a00f8d899418f8a
2015-02-13 15:20:59 -06: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
jenkins-bot a588751d6f Merge "Collect thumbnail width in the performance log" 2015-01-23 23:04:20 +00:00
Gilles Dubuc 8309d7ea88 Collect thumbnail width in the performance log
Bug: T86609
Change-Id: Ia0934cf76c323b9bcb2ee7b0ee8ee6ca2aefc600
2015-01-23 14:57:36 -08:00
Divya adbf42280e Match size of preview and real image
Bug: T87295
Change-Id: I04746dcb80e571a624366b86fd5c5f4cbc31185b
2015-01-23 15:22:39 -05:00
Fomafix ae99be730e Apply coding conventions for JavaScript
Change-Id: I57a8f188eb1152438a8e94235a6f6801e2617c28
2015-01-23 12:48:27 +00:00
gladoscc 84a8df8808 Show (tm) symbol if applicable
ImageData will now parse for restrictions (this part has not been
implemented in CommonsMetadata yet), and an orange trademark label
will be displayed next to the license label if there is a 'trademarked'
restriction.

Bug: T77717
Change-Id: Ib03f9708d1e4ff0b5befddc2688b274e2c7ce1f7
2015-01-15 18:21:30 +11:00
jenkins-bot 87591ab67f Merge "QA: back button workaround for Safari" 2015-01-05 16:56:43 +00:00
Cmcmahon c3a7bb5782 QA: back button workaround for Safari
Bug T85802

Change-Id: I4a3b360ffddbab5c22ca1eb3b03c45159425de70
2015-01-05 09:43:23 -07:00
Geoffrey Mon cf67495467 Allow bold and italic text
Added mmv.HtmlUtils.htmlToTextWithTags()
  which is similar to htmlToTextWithLinks()
  but allows <b> and <i>
Added test for mmv.HtmlUtils.htmlToTextWithTags()
Most text fields now use htmlToTextWithTags()
  except Permission field which is not supposed to
  have HTML

Bug: T69887
Change-Id: I16833f218e2f64586aa13925356fa2b8b7ec3100
2014-12-31 01:01:50 +00:00
jenkins-bot ac7bfa9274 Merge "Show alt-text in export dialog and for lightbox image" 2014-12-30 21:00:09 +00:00
Geoffrey Mon 8ba4ff03c8 Show alt-text in export dialog and for lightbox image
Pass alt parameter from mmv.bootstrap.js to mmv.js and
set it as a parameter on the displayed lightbox image.
Include the alt text in the embed text.

Bug: T66519
Bug: T75923
Change-Id: I29503eb582ac2bc8cf89f737a3bcb787b660d918
2014-12-30 15:47:25 -05:00
jenkins-bot 9119af8534 Merge "More accurate looking for image caption" 2014-12-30 08:56:22 +00:00
m4tx eb7d6ef537 More accurate looking for image caption
MediaViewer now handles Template:Multiple_image. Instead of looking
for caption in whole thumbnail container, it tries to find the
closest one to the image.

Bug: T85354
Change-Id: I18d982a4bf245c4925213d83a3410274d499845e
2014-12-30 09:50:18 +01:00
jenkins-bot dc8c2bc545 Merge "Change "view terms" to "hide terms" once clicked" 2014-12-29 22:37:53 +00:00
m4tx dac77cafc4 Change "view terms" to "hide terms" once clicked
metadataPanel overrides the grow() and shrink() methods in Permission
class instance, so the text is changed also when user clicks the
"view more" link inside the box.

Bug: T71233
Change-Id: I66fe57980c6f469d86e3d52b67d01e06a3a14270
2014-12-29 23:23:07 +01:00
Sn1per e4b8e860c8 Show custom Attribution line instead of Author/Credit when available
- Adds attribution variable to Image model
  - In mmv.ui.metadataPanel and mmv.EmbedFileFormatter, display
      attribution line instead of author and credit when it is set
  - Update junit tests for mmv.model.Image and mmv.EmbedFileFormatter

Bug: T67445
Change-Id: Idfe542a1542d28cf8d27c1720ab0bd54324b2f37
2014-12-29 15:56:05 -05: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
jenkins-bot 9c38b75f30 Merge "QA: WIP update tests for RSpec3 syntax etc." 2014-12-17 18:24:20 +00: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