Commit graph

405 commits

Author SHA1 Message Date
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
Gergő Tisza 175c080019 Fix failing test in master
String.replace interprets a plain string as an exact text to match
against, but String.match interprets it as a regexp. Javascript is
fun.

Change-Id: I93ac31079f1f87dffdf0d5e02df2fa38ae79a6cc
2014-12-08 21:33:27 +00:00
Gilles Dubuc 30029b8b78 Track the most recent upload time for performance events
Change-Id: I673f9487deea15dc148452a3a4d6b91563a2c417
Bug: T76035
2014-12-03 16:15:20 +01:00
Gergő Tisza d280920121 Fix inconsistencies in attribution text
* use the same text for plain and HTML format
* use the same text whether or not a deed URL is set

Bug: T76030
Change-Id: Iea53766b2e2031206d707838551bd82dba29e8c4
2014-12-01 21:14:16 +00:00
Gergő Tisza 485944ba9d Show "and X more authors" when a file has multiple info templates
Bug: T74082
Change-Id: If53e3e364d07ef35a93b3b24430441d390aaf66e
2014-11-27 07:24:26 +00:00
jenkins-bot 9c6d50e55a Merge "Text changes for better handling of PD and nonfree licenses" 2014-11-26 14:52:39 +00:00
Gergő Tisza 05d803e17a Text changes for better handling of PD and nonfree licenses
Bug: T70687
Change-Id: I84e0094559e5b438fcb33b8511dc0184435c1a37
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/1004
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/631
2014-11-26 02:21:50 +00:00
Timo Tijhof cf48687731 Migrate jQuery andSelf() to addBack()
Deprecated in jQuery 1.8
http://api.jquery.com/andSelf/

Change-Id: I4988c24c4f14c2962f12065acccc7dd51899a2e4
Task: T67399
2014-11-25 02:57:29 +00:00
Gilles Dubuc 00d345f8b4 Rename Performance to PerformanceLogger
Change-Id: Iacfde35851cf8f617c4672d3ea466d4f0e2e448f
2014-11-21 11:07:40 +01:00
Gilles Dubuc 0e01796a3c Track how long users are viewing images for
This is complete, but it would be better if the HEAD request
was actually aborted by Varnish when the viewDuration parameter is
present, or if the hit pointed to a script that does that.

Change-Id: I66cafd97427756411e967de1901324af2215e3ae
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/1001
2014-11-21 00:39:29 +01:00
Gilles Dubuc c98a243639 Track image "unviews"
Change-Id: I4441b6df511f99b73bfafea0d804171435e129d2
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/998
2014-11-21 00:37:11 +01:00
jenkins-bot 7638a878f9 Merge "Add marker parameter to image requests coming from MediaViewer" 2014-11-20 21:24:19 +00: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