Since MediaWiki change 6f9d4829b2fefc98a1969bb8f7ab3d04ef0268fe
mw.SafeStorage sometimes calls removeItem() before calling setItem(),
so we need to mock it as well.
Bug: T340069
Change-Id: Ife6c4cc032689bb75e572d7936ce33afa76cf396
- mediawiki.router is available inside mmv.bootstrap so move
the handlers into the bootstrap file
- Remove direct loading of images from mmv.js instead modify
event handlers to modify the location which will trigger the loading of
the image
- Copy what we previously did in MobileFrontend (Bartosz's idea)
to allow page refreshing and escaping overlay on page load.
- Remove some no longer relevant tests
Bug: T236591
Change-Id: Ie5d33fca5174db58380a63f5cf97f44e5df10d42
The
progressBar: {
hide: this.sandbox.stub()
}
fixes the following exception in the JavaScript console:
jQuery.Deferred exception: progressBar.hide is not a function MMVP.setupProgressBar
The
router: {
checkRoute: function () {}
}
fixes the following exception in the JavaScript console:
jQuery.Deferred exception: viewer.router is undefined
Change-Id: Ia7658937ebdbb77a5889d6462f7706bb2fd4e08f
The response of prop=imageinfo is now an array instead of an object.
Therefor it is not needed to interate over the elements anymore.
The array contains exact one element if one title is used in the query.
The function getNormalizedTitle not needed anymore because the
requested title is always the first element of the array.
Change-Id: I7a226d3950615a2152c3f55127b218cac2d21fcc
The MediaViewer and MultimediaViewer* instruments were disabled circa
October 2021 in Ie7dd8739efc.
This patch removes those instruments and any supporting code and data.
Notably, this patch does not remove the mw.mmv.logging.ViewLogger
instrument, which is responsible for logging image views.
Bug: T310890
Change-Id: I97d41be93849b2ae9d1adba6660546ea716657fd
* Declare variables inline, as per the current code conventions.
* Use `assert.true()` or `assert.false()` in a few places.
* Clarify some test names and simplify some surrounding code.
Change-Id: Id0bca942e34564b9c011e89c0b2298cbb4f8a582
My browser is configured with en-GB as its locale. This meant that
when qqx was passed down, it fell back to my browser's default locale
and thus made the tests fail, as the expected data was set against
lang=en.
Ironically, MMV actually prefers the en-GB date format, and outside
tests even replaces 'en' with 'en-GB' when formatting dates in the
user interface. It was only in the tests that it asserted the 'en'
format that would otherwise never be used by MMV.
Ironically, the reason my locale is affecting the test is because
we switched from hardcoded lang=en to hardcoded lang=qqx which is
meant to disable any influence from localisation. However, when
passed to browser-native Intl API, qqx is not valid and thus
caused us to not have a hardcoded 'en' but a completely variable
UI language based on the developer's browser settings.
Bug: T250045
Change-Id: I94ad25cc7060ac5e9db41c6b6767aa9fd687a0db
Currently for files from foreign repositories, the "More details"
button always points to the foreign description page, regardless of
whether a local description page exists. That is a bit unintuitive,
as the local description page often contains additional info (like
categories) that may be useful for the user.
This patch changes the behavior of the button to link to a local
description page if available.
Change-Id: I7db609a4dda42f28ef913ad6d4256fb5adabeb89
This framework has been legacy / unsupported for four years now. It's
time to admit defeat. Someone keen can re-use these tests from git in
an effort to write into JavaScript in the future
Test running removed from CI in 690d5a909.
Bug: T180226
Change-Id: Id952fe14f608d0b185ed1170b990192b0de575d3
The job has been failing for months for macOS. Tests are not providing
any value.
Ruby Selenium framework has been deprecated since 2017. We are removing
support for it from CI.
Bug: T214389
Bug: T220035
Change-Id: I4fef826a7ac1e7b2d260b1bf8f5d42e3f214b07d
Results in small UI changes, but allows us to delete a lot
of code duplication.
Depends-On: I9049f5a1c0d88680fc4a174e390dd08e27c0eee2
Change-Id: Iebe7bdc8a026b929a35e823d8107d90e7bb62b82
What MultiMediaViewer does is re-using the small thumbnail <img> that
is already present on the page, cloning it, blowing the size up, and
using it as a "placeholder thumbnail". The moment the bigger image
finished loading, it replaces the placeholder.
The issue here is that the cloning includes class names like the
<img class="thumbimage"> on every [[File:…|thumb]] image. This shows a
gray border. The cloned DOM node in MultiMediaViewer shows this gray
border around the placeholder for a short time. This can be distracting.
Change-Id: Ie83427fab478b6568731b9a0b1f7dbbcc6d5b0fb
These modules are deprecated and will be removed, see parent task for
details and deprecation information.
Bug: T223284
Change-Id: I2532e20659a59cdd036a7d8ad5a040ae136848f5