Commit graph

507 commits

Author SHA1 Message Date
Matthias Mullie 31c93b79fa Fix buttons fadeOut when coming back from fullscreen
Bug: T164410
Change-Id: I4275c15733b10cff68a20b19e5fb195a88fafebf
2017-06-07 17:09:01 +02:00
Matthias Mullie 3e5ad4c83a Replace all direct localStorage interaction by mw.storage
Meanwhile I also updated a few places where a non-string was
passed to/expected from localStorage - this could’ve led to
inconsistencies because localStorage stringifies everything.

And I also removed CP.canSetMediaViewerEnabledOnClick, which
was no longer used anywhere except for a test case.

Bug: T137777
Change-Id: I21ad4ba15ca751bb03e5e2c523d09a45c0444ccf
2017-06-02 11:52:34 +02:00
Ed Sanders 2264e5fdec build: Update eslint to 0.4.0 and make a pass
Change-Id: I444cfd511121a0547901ed87c9aedd410e7920bd
2017-05-17 11:30:45 +01:00
Ed Sanders 9514e3107a Code lint: Throw errors, no strings
Change-Id: I4bb4de96a5e61b67b7a4c8f16a22f67f53cb034f
2017-05-17 11:28:53 +01:00
Matthias Mullie 19fdcc86f3 Fix mmv.model.TaskQueue qunit tests
Bug: T164473
Change-Id: Iaefae1d00a0469f11ddb3fcecb4f831346ac0eec
2017-05-17 11:53:34 +02:00
Matthias Mullie 4c3302d957 Fix mmv.lightboxInterface qunit tests
Bug: T164473
Change-Id: I5d2ddba1e1a5cb69de276d790841536fde77d108
2017-05-16 14:55:17 +00:00
Matthias Mullie 65c00b388c Fix mmv.logging.DurationLogger qunit tests
Bug: T164473
Change-Id: I9787948e26d27e8fcee934e05e2c200eeec5d82f
2017-05-16 14:55:05 +00:00
Matthias Mullie 5bc3a2d90e Fix mmv.logging.PerformanceLogger qunit tests
Bug: T164473
Change-Id: I6ae5c0170bf12fb076ddc505299ceeb7b9c292e8
2017-05-16 16:54:43 +02:00
Matthias Mullie 651476ccfb Fix mmv.logging.ActionLogger qunit tests
Bug: T164473
Change-Id: I41f207519e27f63338298f68411fc2eb3eb7f13a
2017-05-16 16:53:39 +02:00
Matthias Mullie 934ed2d2dd Fix mmv.logging.ViewLogger qunit tests
Bug: T164473
Change-Id: I11849743773e0382354009ccec1c8cb39c466aef
2017-05-16 14:52:49 +00:00
Matthias Mullie 47d67a6e66 Fix mmv.model.TaskQueue qunit tests
Bug: T164473
Change-Id: I849a81c02886c8f80f7bedef40f7a4504d3632f7
2017-05-16 14:52:38 +00:00
Matthias Mullie d96a587a38 Fix mmw.ui.metadataPanel qunit tests
Bug: T164473
Change-Id: Iefad324be86c59ac9bf44363bcbbb98a70769499
2017-05-16 14:52:25 +00:00
Matthias Mullie 93f1c9f79e Fix mmv qunit tests
This heavily relied on deferreds getting resolved synchroneously,
which (for .then) is no longer the case with jQuery 3.
There's also a difference in how chained .then's get resolved,
and $.when no longer propagates notify().

The changes in here are basically:
* fix use of $.when, manually passing along notify()
* use .then in some places, instead of .done, .fail, .progress
* fix progress bar hiding in setupProgressBar, which assumed sync
* fixed tests, mostly by using fake timers to give async stuff a
  chance to execute

Bug: T164473
Change-Id: Ib51ddd8bc6254a477861588fb16f57565353afe1
2017-05-16 16:51:52 +02:00
Matthias Mullie d204ecc99a Fix mmv.bootstrap qunit tests
This heavily relied on deferreds getting resolved synchroneously,
which (for .then) is no longer the case with jQuery 3.
There's also a difference in how chained .then's get resolved.

These tests did not wait for the deferreds to get resolved async,
so that had to change. Worse even: some functionality was tested
by assuming a handler would not be called (= the test in that
handler would not be called), which didn't make the test run,
because we never even waited for it to be called.

The changes in here are basically:
* make mmv.bootstrap.js correctly use .then instead of .done & fail
* let mmw.bootstrap.test.js tests wait for unresolved async promises
* check call counts instead of running tests inside of callbacks
* limit use of fake timer to the 1 test that needs it (it interferes
  with async, which otherwise don't get resolved)

Bug: T164473
Change-Id: I3ca4f786890ad1646f71fe336afdb61e5c3b01c7
2017-05-16 16:48:20 +02:00
Prateek Saxena 45110a7090 Use <button> instead of <div>
* Buttons are semantically better.
* Neither <div> nor <button> elements can have the 'alt' attribute
  so switching to 'title' instead.

Reverts parts of I6ea62124018b1a0ec5110bb500f690cb2368f102.

Bug: T58471
Change-Id: I991b40d3387f8d6dd7cdad8ccc5cc9660b9f139a
2017-03-22 12:06:15 +05:30
Ed Sanders d7ea64137c build: Replace jshint/jscs with eslint
Change-Id: I423add157245353031e36b7e44fee7ace7c753c7
2017-01-10 10:24:39 -08:00
Fomafix 660503b7a7 Change mw.Map( false ) to mw.Map()
The parameter [global=false] is the default.

Change-Id: I61df2b95308c2fa21d5ed28c2ef1d8ddefdf69e8
2016-11-19 11:10:58 +01:00
Gergő Tisza 789ccdeae6 Fix broken tests
The signature of mw.Map was changed in I7ff0b230.

Bug: T150575
Bug: T146432
Change-Id: I464162549ef9b1decafc42f483c35a2c8e930a3b
2016-11-19 03:00:31 +00:00
Andrew H 0c3b0a5056 Shorten clickable link text in HTML credit lines
Previously, the clickable text in the generated HTML credit lines
was the entire link to the article. This is shortened to a localized
version of "Link".

Bug: T119686
Change-Id: I708f65a85bfa26c264cdd06a265096027266240c
2016-09-26 17:07:09 -07:00
jenkins-bot eba412d432 Merge "Update beta test URL to use HTTPS" 2016-08-18 00:25:59 +00:00
jenkins-bot 0716876c6d Merge "Make embed text short URL into a link in HTML mode" 2016-08-11 19:19:19 +00:00
Gergő Tisza e223deb583 Update beta test URL to use HTTPS
Maybe related to T142423. Maybe not, but no harm in it in any case.

Change-Id: I121fedbcc2c7546e1be138f4d966003d975834bb
2016-08-08 12:01:37 -07:00
Timo Tijhof 65bd9ff4a0 Update unit tests to use non-bits favicon urls
Bug: T107430
Change-Id: Ie2001d12202353e6e9e76ddd7ab697ec801f6005
2016-08-03 14:51:56 -07:00
Gergő Tisza 8b8dfe4633 Make embed text short URL into a link in HTML mode
Bug: T138142
Change-Id: Ide6d9b164cdcbafacf08631536cadb04a45ce3dd
2016-08-01 15:17:25 -07:00
jenkins-bot b5f0de95b7 Merge "build: Introduce jshint & jscs and make a pass" 2016-07-19 21:02:24 +00:00
Ed Sanders b46529d1b2 build: Introduce jshint & jscs and make a pass
These replace the hard-coded jshint task in CI.

Change-Id: Id14eec1ecba4ceae735ffd10f9114233a580302f
2016-07-19 13:48:06 -07:00
jenkins-bot d8984a6ab8 Merge "Limit image search to content firing event" 2016-07-19 14:44:39 +00:00
Ed Sanders db6c74a232 Limit image search to content firing event
Bug: T140574
Change-Id: I3c504c09b2b382e094ab2be1fa388efa7ec827b1
2016-07-19 11:33:53 +01:00
Ed Sanders c029295c41 Use simple English in test descriptions (legit->valid)
Change-Id: I01142b85abd4fb2bb16213d753c4b513327bb9bb
2016-07-18 11:39:29 +01:00
Gergő Tisza dba273ac31 Add HtmlUtils.makeLinkText utility function
Change-Id: I2697c2d865dc8dd23883a59ca0c38229c2e7b6e9
2016-06-19 17:22:52 +02:00
Željko Filipin 54aa54c15c Disable Cucumber feature that is broken in daily Jenkins jobs
Performance feature failed 8 times in a row for Chrome.

Bug: T94150
Change-Id: If459929a717a1e6d0da59a333a80ffc41592d282
2016-05-16 18:23:51 +02:00
jenkins-bot a0e97aab78 Merge "Make Media Viewer pluggable for the 3D extension" 2016-05-09 20:14:35 +00:00
Željko Filipin 2eedcb4240 Do not run unstable tests daily
Bug: T128190
Change-Id: Ifc8b03b96b68c81183067cab2bedc56b599dfdf4
2016-05-05 12:50:45 +02:00
Željko Filipin afe0397991 Migration of browsertests* Jenkins jobs to selenium* jobs
selenium* jobs are a new way of running Ruby based Selenium tests. The
jobs are triggered daily.

Bug: T128190
Change-Id: If0e6b61c9e3d52005d1851ca49ef65babd002919
2016-04-25 19:15:12 +02:00
Gilles Dubuc 53a3d9a379 Make Media Viewer pluggable for the 3D extension
Some of the code encountered accessed mw.config directly,
I cleaned that up by migrating to mmv.Config, which is an
abstraction added to avoid peeking at mw.config directly.

Bug: T132064
Change-Id: I2a95ba703e6c7f46296f8e435bceec769dceebf9
2016-04-15 16:43:45 +02:00
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
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
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