mediawiki-extensions-Popups/tests
Piotr Miazga 2527f931a2 Properly handle catch() when calling gateway fetch.
Previous implementation did not pass the `result` variable
to the catch() statement. Because of that every execution that
ended with exception inside fetch() statement was threated as
not a network exception and tried to present the null preview.

Changes:
 - properly handle data returned by rejected fetch promise
 - chaged the big if (result && result....) into something easier
 to read
 - pass Error object instead of 'http' string
 - Restbase can return exception, it doesn't have to handle the 404
 errors by itself, it's already taken care in the catch() logic
 - fixed unit tests to reflect new logic in restbase gateway

Bug: T199482
Change-Id: Ibb30fc58248623d9ad4c5388a5b2ff9b387e01de
2018-07-13 00:02:59 +02:00
..
node-qunit Properly handle catch() when calling gateway fetch. 2018-07-13 00:02:59 +02:00
phpunit Always set the PagePreviews visibility state 2018-06-11 21:46:03 +02:00
selenium Hygiene: add assertion messages 2018-05-08 15:55:23 -05:00