Commit graph

1592 commits

Author SHA1 Message Date
Translation updater bot 58bdc34e94 Localisation updates from https://translatewiki.net.
Change-Id: Id2a0677929893652d4aac7c00ba055d3494733ed
2018-01-21 22:17:20 +01:00
Translation updater bot 5d19ee245a Localisation updates from https://translatewiki.net.
Change-Id: Ia42eedcd65c2421e5dafbbd6d93a842749707206
2018-01-20 14:43:05 +01:00
Stephen Niedzielski af942bd1dc Hygiene: add package-lock file
Add NPM package-lock file, a new feature of NPMv5.

http://blog.npmjs.org/post/161081169345/v500

Change-Id: I10507ff4e1f09b224b0b52909392bfb9f5005cde
2018-01-19 19:05:24 +00:00
joakin 807100bcca Limit line length to 80 characters
Enforce it with eslint.

Ignore:
* Comment lines with eslint disable directives
* QUnit test lines as they contain long subjects (QUnit.* (only, test,
  module, skip, etc)
* Strings, since long strings are used extensively in tests
  * Ignore template literals for similar reasons
* Regex literals as they may be too long, but can't be easily
  split in several lines
* Long urls

See bug for more general proposal for eslint-wikimedia-config.

Bug: T185295
Change-Id: I3aacaf46e61a4d96547c513073e179ef997deb09
2018-01-19 14:20:39 +01:00
Translation updater bot d4f3afd201 Localisation updates from https://translatewiki.net.
Change-Id: Ifcb8b82ff9d0f5f4862abbd1da72f59f33686c78
2018-01-18 22:49:48 +01:00
jenkins-bot 64e81b0fee Merge "Restore test subject" 2018-01-18 17:48:48 +00:00
joakin c6efe18f6a Restore test subject
Test subject was changed and stopped matching the implementation. In
this particular change the test (a bit convoluted but) tests that wait
is called appropriately, which is why the subject read "should delay
dispatching ..."

Change-Id: I3c8d9d8769f3d1c2869a267af105b9489df86cf5
2018-01-18 18:33:58 +01:00
joakin 7169210406 Remove unnecessary .promise() call
In the mediawiki gateway fetch uses mw.Api which when calling ajax
returns a promise (not a deferred).

Thus .promise() here is unnecessary and happens to work because of
jQuery promises but it is not a standard method on JS promises so it
shouldn't be used on promises, only on deferreds.

Change-Id: Iec609b90bffad8b99b3908897dfb72d7c4ed5481
2018-01-18 18:07:43 +01:00
WMDE-Fisch 4adf63b024 When running Selenium tests, use wd/hub
Now it works on Mac, Windows and Linux.

Change-Id: I6ac70e02bc634bb559426baa29dd22f710e554a1
2018-01-18 15:01:01 +01:00
Stephen Niedzielski 9114981380 Update: show placeholder preview for more failures
Functional changes

- Show the default / error preview for all extract request failures
  except those due to network circumstances (such as CORS) or no
  connectivity (offline). Previously, the error preview was displayed
  only for missing pages.

- FETCH_COMPLETE was previously only dispatched after FETCH_END. Now
  it's also dispatched after FETCH_FAILED. The additional "fetch
  complete" is not expected to impact logging. The states of success
  are: START, END, COMPLETE. The new failure states are consistent with
  success: START, FAILED, COMPLETE.

Testing

Errors may be stimulated in a number of ways including:

- Timeout: add a timeout field to RESTBaseGateway /
  MediaWikiGateway.fetch().

  http://api.jquery.com/jquery.ajax/

- Bad request: change MediaWikiGateway.fetch's action field to
  `Math.random() > 0.5 ? 'query' : 'fail'` and RESTBaseGateway.fetch's
  url field to
  `RESTBASE_ENDPOINT + ( Math.random() > 0.5 ? encodeURIComponent( title ) : '%%%' )`.

- Desired Gateway can be configured in Gateway#createGateway().

- Note: T184534 describes a circumstance where cached previews may not
  appear when offline. Disable browser caching to avoid confusion.

Bug: T183151
Bug: T184534
Change-Id: I7332284da0e0fb1ecd234a6f1e146ebd9ad8d81f
2018-01-16 18:44:00 -06:00
Stephen Niedzielski d9d85ab971 Hygiene: add more fetch failure test cases
Add fetch failure tests for integration and preview state.

Bug: T183151
Change-Id: I1a541d96f3a83b99c26a5180ad5ee8626cda97d2
2018-01-16 18:37:03 -06:00
Stephen Niedzielski 6ba57786fb Update: missing preview copy
Update the placeholder extract and button text shown when a page preview
is unavailable from:

  "popups-preview-no-preview": "Looks like there isn't a preview for this page"
  "popups-preview-footer-read": "Read"

To:

  "popups-preview-no-preview": "There was an issue displaying this preview"
  "popups-preview-footer-read": "Go to this page"

Bug: T183151
Change-Id: I0600dbc2e4d51a13675041d3c0741a793f4eae37
2018-01-16 18:36:54 -06:00
Stephen Niedzielski 8ca0cf2088 Fix: preview page URL for 404 RESTBase responses
Functional changes:

- Require page URL when constructing a PreviewModel null object. These
  models have valid titles and are used to display a preview when an
  extract is unobtainable. When presented with an empty URL, their
  linkage incorrectly pointed to the browser's current URL. Additional
  tests were added to verify the fix.

- Check missing title in addition to falsy response in RESTBase gateway
  and update the test assertion to check title. It isn't clear if this
  can happen in the wild.

- Forbid state mutation in the conclusion of
  MediaWikiGateway.getPageSummary() with a call to Deferred.promise().
  This is consistent with the rest of repo including RESTBaseGateway.

  http://api.jquery.com/deferred.promise/

Nonfunctional changes:

- Collapse two RESTBase gateway 404 tests into one as the scenarios and
  expectations were very similar.

- Add failure HTTP status to 'MediaWiki API gateway handles API failure'
  test stub HTTP response for consistency with other cases.

- Add nullity expectations to JSDocs touched and fix a couple typos
  throughout.

- Make the gateway tests a little more consistent by collapsing Deferred
  variable usage where appropriate.

This change is necessary to the completion of T183151 which uses the
PreviewModel null objects for additional error cases.

Bug: T183151
Change-Id: Ib77627fb9c80d8e806208bbafcfc615b130e3278
2018-01-16 18:36:48 -06:00
Translation updater bot ba3ee4e737 Localisation updates from https://translatewiki.net.
Change-Id: Ia11a7bb86da0c2efc3a624045d08d2ddf0f0052f
2018-01-13 22:15:25 +01:00
jenkins-bot 4ba0335640 Merge "extension.json: Remove space before colon" 2018-01-10 14:41:45 +00:00
Fomafix 63f7dd2a1d extension.json: Remove space before colon
Change-Id: Iec606d9769b00e9653fa36e00a3798f80cd9c7f7
2018-01-10 14:38:30 +01:00
Translation updater bot ea23d457f8 Localisation updates from https://translatewiki.net.
Change-Id: I4b3a186144f858807e44602a75809ae7d1d8b598
2018-01-09 22:29:50 +01:00
Translation updater bot 1af082ce7e Localisation updates from https://translatewiki.net.
Change-Id: I725050165fc9d0eb6f79b53eadbb80b446577861
2018-01-08 22:36:12 +01:00
Translation updater bot 683da8bf10 Localisation updates from https://translatewiki.net.
Change-Id: If67921fd13b5bda8eafdfcd229040289e29f9a1e
2018-01-07 22:47:29 +01:00
jdlrobson ff49e7627b Better error handling for unexpected responses
Bug: T182639
Change-Id: Iea04fe41b4be8e15927e93f16cbb4bb44328374f
2018-01-02 10:42:12 -08:00
Translation updater bot cd2b0baaf8 Localisation updates from https://translatewiki.net.
Change-Id: I6e9e69050d141f1f0ffe2cb831a1c1be88eee472
2018-01-02 10:08:17 +01:00
libraryupgrader 9cccf15c43 build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
The following sniffs are failing and were disabled:
* Squiz.Scope.MethodScope.Missing

Change-Id: I163626b66b33cb185bbcedb8f00d85890628f9dc
2017-12-30 02:19:18 +00:00
jenkins-bot 76bfe72d97 Merge "Clean up ESLint configuration" 2017-12-28 09:52:02 +00:00
Translation updater bot 330513f569 Localisation updates from https://translatewiki.net.
Change-Id: Ic8bf900933fbf6244cbbfdec96ee91d5931c17f1
2017-12-28 09:59:58 +01:00
Umherirrender 3515b32cfe Use absolute class name in @covers
Namespaced classes need to be absolutely named.

Fixed one @covers of testEventHandling
Change-Id: I92ae621ac35992c3dd6070528e255fafdaa1af76
2017-12-27 20:53:07 +01:00
Translation updater bot 97043e46b9 Localisation updates from https://translatewiki.net.
Change-Id: I6b53e0835a2500b1fd216eb261f06ac5ad1b254a
2017-12-23 22:27:08 +01:00
Željko Filipin b174a6f298 Clean up ESLint configuration
parserOptions is redundant sice env is already set to es6.

Bug: T177262
Change-Id: If478a0aaeb7fef184be965645fbd2cb276b630c8
2017-12-22 16:12:54 +01:00
Translation updater bot 819ef7da76 Localisation updates from https://translatewiki.net.
Change-Id: I9eed9d811de908d38dc32b5f2d3f4ef3023dfe79
2017-12-21 23:15:24 +01:00
Željko Filipin c175cffe9b Fix location of LocalSettings.php
It used to be in tests/browser, now it's in tests/selenium.

Bug: T177262
Change-Id: I102c77834f4c63da06fcc6140a28de9dba231ae6
2017-12-19 13:35:46 +01:00
Translation updater bot 1333f3be9c Localisation updates from https://translatewiki.net.
Change-Id: I2e3ba0da60873bcffc676eba8fd8523418582efe
2017-12-18 23:06:58 +01:00
Translation updater bot 12b2fffaf2 Localisation updates from https://translatewiki.net.
Change-Id: Icb50e3790daa805ae8df7676864123a4a5705047
2017-12-17 22:26:11 +01:00
Sam Smith 7258be717c instrumentation: Bump schema revision
Following on from I6643168a, the client-side JSONSchema validation does
handle the integer type [0] so we can enforce that timestamps are integers
on the client as well as on the server.

[0] https://github.com/wikimedia/mediawiki-extensions-EventLogging/blob/3d0837e5/modules/ext.eventLogging.core.js#L102-L103

Bug: T182000
Change-Id: I79af7975388d50a570e209b212c0c90322e4a23a
2017-12-14 17:27:42 +00:00
Translation updater bot 4420a97533 Localisation updates from https://translatewiki.net.
Change-Id: I8ed4141412a50fb7d75938d7db0d6abfa2aaefcd
2017-12-13 23:34:28 +01:00
libraryupgrader affc1924e3 build: Updating mediawiki/minus-x to 0.2.1
Change-Id: I867b61066087d4b2161f1ca7d43efcc05440d4b2
2017-12-11 01:41:06 +00:00
Translation updater bot 67ddbd9552 Localisation updates from https://translatewiki.net.
Change-Id: I62a8b2dfe20aaf30c6b925f0ad6e4092ba556fbc
2017-12-07 23:07:51 +01:00
Albert221 8feedf8368 Fix $.fn.hover is deprecated
Bug: T180861
Change-Id: I6a2cfbd26535c3e778a811e2f8ed5939123d6571
2017-12-06 00:52:19 +01:00
jenkins-bot e0687ca3f3 Merge "Schema: convert timestamp into integer" 2017-12-05 18:22:48 +00:00
Translation updater bot 9250cbc241 Localisation updates from https://translatewiki.net.
Change-Id: I5312f27847b8ca6ffdc46749bf7edd998266a89a
2017-12-05 09:41:27 +01:00
Baha 38a7978edb Schema: convert timestamp into integer
Mixed types such as integers and floats are causing issues with Hive.

Bug: T182000
Change-Id: I6643168a67207a59d56d7d39b2408587a5bb3524
2017-12-04 15:47:31 -05:00
Translation updater bot 1e31d95c56 Localisation updates from https://translatewiki.net.
Change-Id: Ieda772beb2bd07043a0d092e7b733bc984765e6a
2017-11-30 23:52:52 +01:00
Volker E c93074931a BetaFeatures logo: Merge logo and title path
In the process of updating BetaFeatures logo it got
identified that the logo is better marked up as one
`<path>` element.
Follows up Id5acd5e918dfa895210a622612f4a1cda5bef985

Bug: T180427
Change-Id: I2e566650a321a3a0f371ca9d71fc4328ee5e651a
2017-11-28 10:30:37 -08:00
Volker E 5f1bb03ea8 Unify BetaFeatures SVG screenshot markup
Unifying BetaFeatures SVG screenshot markup by:
- adding/changing `id`s for better readability,
- sorting attributes,
- using full pixel values where applicable and
- generalizing attributes on `g` where applicable.

Follows up I91e0495e922a1fcf094af14e424a410fad313ba0.

Bug: T180427
Change-Id: Id5acd5e918dfa895210a622612f4a1cda5bef985
2017-11-27 23:54:06 -08:00
Translation updater bot f6b2908bcd Localisation updates from https://translatewiki.net.
Change-Id: I25d0792bc275639b8714128651695ca4072ff59e
2017-11-24 23:18:36 +01:00
Prateek Saxena 027716dfd2 Update colors of betafeatures icons
* Light gray - Base80

Old: https://phabricator.wikimedia.org/F10912613
New: https://phabricator.wikimedia.org/F10912612

Bug: T180427
Change-Id: I91e0495e922a1fcf094af14e424a410fad313ba0
2017-11-21 12:03:02 +05:30
Translation updater bot 34a6fc86f0 Localisation updates from https://translatewiki.net.
Change-Id: I5506ae8d9ed09d97bc01df51662d5d3c78cfacac
2017-11-19 22:32:56 +01:00
Baha 58cdac8882 Schema:Popups - use revision 17430287
Event timestamp (as reported by `window.performance.now()`) is also sent
along with every action.

Bug: T180036
Change-Id: Ie3a648298005d51b8b4fbaa6a53e78caf50fa2d3
2017-11-17 12:49:22 -05:00
Translation updater bot e1be05d73f Localisation updates from https://translatewiki.net.
Change-Id: I63997e0626a5d67c42d4a9b9d885c93b072de649
2017-11-14 22:36:41 +01:00
Translation updater bot c3b63c74e5 Localisation updates from https://translatewiki.net.
Change-Id: I9bb67bd26311a0656e9e3e3981b425bf515369be
2017-11-10 22:47:58 +01:00
Umherirrender 49f0ec9d19 build: Always exclude vendor
Change-Id: I6b69379a57e0695d6183e34bca41653033a9da37
2017-11-10 17:42:04 +00:00
joakin 122332c66b Test: Update the test runner dependency
To 2.2 which just updates minor versions of dependencies (jsdom, sinon,
qunit).

See https://github.com/joakin/mw-node-qunit/blob/master/CHANGELOG.md#220

Change-Id: I26e6b060b0124d9f91aaa7ccc1d8be1981e5de1e
2017-11-10 17:10:59 +01:00