* Add inline exceptions for global selectors
* Exception for $.animate in scrolling code
* Fix $ prefixing in search.js
* Fix repeated selectors in search.js & toc.js
* Disable no-parse-html-literal in tests
Change-Id: Id58fe11d1e09714501a378e4ca7ed9588f02f32d
* The check for whether the page issues code has been loaded should
be run just before clicking the banner. It's in the wrong place.
* Now page issues is live across all wikis, no need for "in beta"
check
* Seledctor can be simplified now no need to worry about beta
Change-Id: Ie24a9d9fc1966ca5db2cd0a6a37c1aa6d719924a
Update the API usage for lazily loaded images. This is still clumsy and
may be further revised in future patches.
Bug: T211724
Depends-On: Ic73f78825eaab561e8ed694aa6cc102ccb471f95
Change-Id: Ia708cda688e6bdb12074d85d98f7e98fdf7b0ca8
Clicking the page issue banner (which is ready from first paint to
be clicked) will not yield the overlay. The user must wait for the JS
to load. Likely the reason for Minerva browser test failures against
beta cluster.
Change-Id: I06c488ca64dd44ad24368a1d6b47bb2646ad4552
The test is failing in stable. Since page issues is going to production
next week this patch can be reverted as soon as that has happened
Change-Id: Idd8de17883006e3cc5f5615781a54a4072a78087
The 2 selector approach is flawed as the .ambox element matches a
hidden element in the old treatment which is not clickable.
I suspect this change will fix the failing browser test on the beta
cluster. Integration tests will continue to test the new selector
in the mean time.
Change-Id: I44a873b2e89069c4a47a428c528592159520568c
Improve the comments and APIs provided by AB.js:
- Control becomes unsampled.
- A becomes control.
- B becomes treatment.
This code does not appear to be in use presently, so it's a great time
to change it.
Change-Id: I31d619f889ee45102a4aed774a6ec41f0d95ba7d
This experiments with making PageIssuesOverlay an Overlay with
various options.
The appending of children is a little messy and points at a need
to standardise this some way
(see https://phabricator.wikimedia.org/T209647)
TODO:
* Remove the iconString property on PageIssueSummary which is no longer
needed
Bug: T209647
Change-Id: Iadd798a820dca6bbb31edc9a8570b6db7aac237a
The DownloadIcon is reduced to a factory function that
returns an instance of Icon
Depends-On: I4d703eef68d51bbe0b03579c5cca0845e17b8c9d
Depends-On: I4a4129b2cac7c7c49559beef0b8780f3211edf9c
Bug: T205592
Change-Id: Ib87390d17bef6f50842f52cd84c9ce2b162aaff0
This patch removes the remaining usages of M.on/M.off/M.emit
(functionality derived from moduleLoader.js in MobileFrontend) in
Minerva and continues the work of
Id990b0e1a53221d5c1cb3e3012aed0e27d801fc2 (patch for MobileFrontend).
This patch and the patch for MobileFrontend should be merged together as
they both depend on eachother.
Depends-On: Id990b0e1a53221d5c1cb3e3012aed0e27d801fc2
Bug: T156186
Change-Id: I005d2fcdbf91c2f1ac98178dfa388aa8174e7530
* On commit it needs admin rights which it doesn't have
* On browser tests the toast flakes too much.
Bug: T208808
Change-Id: I1fa93c8f451f3f839030fa7a144b1cb285c4239d
Given the fade in/out animation of the toasts and the instability of
the beta cluster and the round trips to Sauce labs, we're seeing lots
of false positives on our browser test reports
Running these per commit should ensure we see minimal regressions and
get some protection. We'll continue to test other scenarios which do not involve
the toast on beta cluster.
Provided we can rely on green browser tests, we will trust the browser
tests more and they will be more useful than they currently are.
Bug: T208808
Change-Id: Idc601ad462de36f2d6d52fe951194b429e6f824f
We use lots of write operations in Minerva browser tests. On the beta
cluster many of these are redundant, as the page already has the content
required or the page already exists
Limit where we do our creation... the less write operations we make the
more stable we can expect these browser tests to be.
Change-Id: If88b878e14bf4a0424fcf23213653cfc2cf8d87b
* features/search_loggedin.feature
They run on integration and are not super-business-critical.
Given their flakiness and Cirrus's likelihood of being down,
don't run it on beta cluster
* tests/browser/features/language.feature
Tag is superfulous, all scenarios repeat it.
* tests/browser/features/toggling.feature
ocassionally fails on firefox. Limit to Chrome and integration
tests
* tests/browser/features/search.feature
Limit the tests that run against beta cluster to search for
partial text and clicking a search result, since these are
two things we want to check integration well with other extensions.
The rest being testing on the more stable @integration tests
should be more than enough.
Change-Id: Ia2e8d3726212fee30725fdb9167ea38aa41eacbf
The page issues browser test is now compatible with both the old
and new treatments.
For consistency, in integration tests it will be run always in
treatment B since that will be the new way to do this going forward.
The beta cluster will test issue treatment A while it continues to be
the default. So with this we enjoy the best of both worlds.
When we enable page issues, the beta cluster will inherit the config
from production and we can remove the treatment testing for treatment B.
A follow up patch, might add testing for a page issue on talk pages,
which will retain treatment A for completeness if this is deemed useful.
Bug: T206647
Change-Id: I586523e452a6809e310f65a2ed55c6771d1965b6
Toast tests are often failing in Firefox build.
They are also tested and pass more consistently in Chrome
Stable browser tests means real bugs get caught more often
so let's disable this browser test against Firefox for the time
being.
Bug: T208808
Change-Id: I05d77eb53657bb3ea0daaad7906a50db6aab66db
These no longer seem to be achieving their original
intention and may even be causing the
flakiness we experience now.
Additional changes:
* Disable some more tests in Firefox job
Bug: T208808
Change-Id: I735ec0ff293cfd7aa60519c080a300bd40dc0abc
The toast tests are flaking quite a bit in Firefox but pass in Chrome.
Having them run in both Firefox and Chrome seems less important than
being able to have better confidence in non-flaking tests so I'm removing.
Bug: T208808
Change-Id: I306518a7f3eb375715f6b9d6d599bf4f711ab6aa
Currently beta cluster tests are failing because of a single test.
The test for whether a "tagline" appears on special pages is outdated. We now
show taglines on all special pages (defaulting to empty)
Let's thus remove it.
Additional changes:
* Rephrase "wikidata description" as "tagline" - we use the tagline to display
things other than wikidata descriptions e.g. the tagline on Special:MobileOptions
Change-Id: Icb66563cb3a5e7043ca41f59c826bd4247d89d52
Instead check the element is in the DOM before testing its
visibility.
This might help T208808 but it's a stab in the dark.
Change-Id: If7ccf5f2f03073c247de7fa497b3a6e31b570918
To make things neat, use "MediaWiki\Minerva\SkinUserPageHelper;" at the top
of the file and then mock class directly (shorter and easily readable).
Change-Id: Ie2ee64e75c38fff77d41af20bdea01015ed39a87
Note, since the page issues code is not feature flagged,
the new treatment will only be accessible via query
string until T206179 is taken care of.
Bug: T206178
Change-Id: I5ab2f3396e642f7b973263e2bb3963e0e82721b3
The extractMessage function has a lot to do with parsing - so this
and its tests are moved into the pageIssuesParser.
Change-Id: I62d79fbba166eff2c3ca573ef94ff86a269a7f9a
We have two type defs - IssueSummary and PageIssue.
I'd like to consolidate these two types by making
IssueSummary a combination of the two
Change-Id: Ic831b463fa66b0cacdd0b9b79aff741e55c0ec24
* Enable discussion button on main page in mobile view so users
can view discussion topics related to the main page on mobile.
* Update test to make sure only 'talk' and 'switch-language' actions are
enabled on the main page and 'edit' and 'watch' are disabled on the main
page.
* Minor typo fix for doc type. Use "array" instead of "Array" and CSS
alignment fix issue with Discussion button when displayed together with
Language selector button.
* [Suggested by: @Jdlrobson] Use a generic "a" CSS selector to style the ".talk"
and ".language-selector" classes on the main page. This also avoids fixing the
CSS for future buttons if added (future proofing the code), so if any other
button is added in the future, the same css rule will be applied to it at once.
Very wise idea from @Jdlrobson, thanks!
Bug: T206406
Change-Id: Iedce84595adc357f3a707f8b94d23b2ffea3476c
In I06ef42cb1461fde7ca0aa903f174c3b1f39ab154 a button became an
a tag and somehow that got through the Jenkins censors.
With this change Jenkins on Minerva will be happy again
Bug: T207480
Change-Id: I3faedb10e46c3e3e237f5b90d71ffe20606fce6d
Separate the page issue grouping concern so that changes to parsing
don't concern everything else and vice-versa.
Bug: T203449, T202349
Change-Id: I7bddb0c53310805ece71b8f7821b1d6ce05cfae9
It's presumed that skin options will eventually become the default or be removed from the skin.
While they are not the default, it would be helpful to package them in one single module - as ResourceLoader
modules are costly bloating the dependency graph in the MediaWiki startup module.
In T167713 we talked about grouping our entry points by page rather than feature, which this seems consistent
with. A page with special options enabled is different from a page without.
Change-Id: Id948f913d4743532ba3442d2059a03c122419ff2
All of this would only be used with the configuration setting
`$wgMFEditorOptions['anonymousEditing'] = false;`.
Removed features:
* Call-to-action popup in skins.minerva.editor (note that anonymous
editors still get a CTA from MobileFrontend's EditorOverlay code)
* Pointer towards the edit button shown after registering via the CTA
(entire skins.minerva.newusers module)
Bug: T205382
Change-Id: I66c7035f7a23581811dda87c911dea41d4a8e5da
This is a MobileFrontend feature, implemented
in ExtMobileFrontend::getUserPageContent().
Having the test for it in the Minerva repo made
it harder to make changes to it. Adding it there
in I6e763cd6b6763c60d2ad47bf384f739dfb1a07c0.
Depends-On: I6e763cd6b6763c60d2ad47bf384f739dfb1a07c0
Change-Id: Id1692b50f3f0d282c8aea4c45b63845f418e0970
This reverts commit 6daf19dfb5.
Mobilefrontend change was reverted meaning this test should be
restored here so we continue to have coverage.
Change-Id: I2e8eeacaf01aa61040405501d69f329fe3a9bbd6
This is a MobileFrontend feature, implemented
in ExtMobileFrontend::getUserPageContent().
Having the test for it in the Minerva repo made
it harder to make changes to it. Adding it there
in I7cac24cf64422212196439bf49598ed749d5fafa.
Depends-On I7cac24cf64422212196439bf49598ed749d5fafa
Change-Id: I93e0f195b3cad1ae83ee2ae3b5b4c5f08944882e
Updates QUnit test files from starting with "test_" to ending with
"test.js" in accordance with the Readers Wed coding conventions.
https://www.mediawiki.org/wiki/Reading/Web/Coding_conventions
Bug: T197884
Change-Id: I98877e3fc432b6edd0c53d834ef23b3ef8fb7d6a
If18ad1ff9363fff65d3e347c01ce4bc0669b2a0e introduced some skipped
tests. This restores them.
* NotificationsBadge test was failing due to some failures to stub
* clicking on the product of createBanner failing due to no action occurring
in the test body.
Change-Id: I4c1f407912767737f7cd1e9884a2e7db0baabf75
This exposes two broken tests:
* #setCount (Eastern Arabic numerals)
* clicking on the product of createBanner() should trigger a custom event
that were previously passing due to buggy assertions.
Change-Id: If18ad1ff9363fff65d3e347c01ce4bc0669b2a0e
The page-issues reducer function that retrieves the severityLevels
for issues was incorrectly comparing two values in the multiple-issues
scenario.
Instead of comparing the severity of the current issue with the previous
value in the accumulator, it was comparing the current issue with the
previous issue in the original array, thus ignoring the
previous `maxSeverity` value in the accumulator.
Tests added and function refactored with more explicit variable names.
Bug: T203725
Change-Id: Ia4c15cbf0c2457d68a7381e8ed04c1a6b3ae65d1
For the page-issues modalClose event, the number of values for `sectionNumbers`
and `issuesSeverity` should be the same, since `sectionNumbers` should describe
the the section of each visible issue in the modal, not the section of the
modal itself.
Bug: T203050
Change-Id: Ic58c5940a6059e71aa3aeed26232afbe8faf1618