Commit Graph

109 Commits

Author SHA1 Message Date
jdlrobson 6d243c1df0 QA: Page Issues browser test should wait till JS has finished loading
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
2019-01-16 11:43:02 -08:00
jdlrobson b247beef3c QA: Run page issues browser test in beta
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
2019-01-15 10:08:05 -08:00
jenkins-bot 9e9442ecfc Merge "Constraint page issues CSS selector" 2019-01-09 01:11:04 +00:00
jdlrobson cb2634a78b Constraint page issues CSS selector
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
2019-01-08 20:23:37 +00:00
Stephen Niedzielski 672df850cb Hygiene: revise A/B test terminology
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
2019-01-08 15:08:50 +00:00
jenkins-bot 9258806a0f Merge "pageIssuesOverlay is a factory function that returns an Overlay" 2019-01-04 15:39:48 +00:00
jdlrobson d29eca2bc8 pageIssuesOverlay is a factory function that returns an Overlay
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
2019-01-03 08:31:39 -08:00
jdlrobson c73ff1f7a5 Composition: DownloadIcon
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
2019-01-02 13:16:09 -08:00
Nicholas Ray 5bfd949f9a Remove usage of global event emitter from Minerva
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
2018-12-06 19:30:09 -07:00
jdlrobson c31da9a236 QA: Drop protected page test
* On commit it needs admin rights which it doesn't have
* On browser tests the toast flakes too much.

Bug: T208808
Change-Id: I1fa93c8f451f3f839030fa7a144b1cb285c4239d
2018-11-29 16:51:04 -08:00
jdlrobson f055f8d789 Drop toast tests from beta cluster
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
2018-11-29 16:40:02 -08:00
jdlrobson 0a41aa53ca QA: Browser tests should limit write operations
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
2018-11-29 07:34:41 -08:00
jdlrobson b71bb0cc8c QA: Tagging changes from beta cluster
* 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
2018-11-27 17:53:00 -08:00
jenkins-bot bce934c54d Merge "QA: Remove hacks introduced for T170890" 2018-11-23 19:08:05 +00:00
jdlrobson 6a7d350160 QA: Page issues browser test is ready for new treatment
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
2018-11-20 23:38:04 +00:00
jdlrobson 2922cc6fd1 QA: Drop more toast notification tests from Firefox (logged in search)
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
2018-11-16 20:41:17 +00:00
jdlrobson 0638296fb3 QA: Remove hacks introduced for T170890
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
2018-11-15 14:59:08 -08:00
jdlrobson 5e9739b9ff QA: Drop some tests in Firefox
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
2018-11-15 20:53:17 +00:00
jdlrobson f5acba28f3 QA: Remove redundant test so beta cluster tests pass
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
2018-11-14 22:39:06 +00:00
jdlrobson f2639e7a73 QA: Don't check when_visible twice
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
2018-11-13 16:49:24 -08:00
Bartosz Dziewoński 7b5928d795 Merge remote-tracking branch 'gerrit/page-issues-cleanup'
Bug: T198765
Bug: T208514
Change-Id: I9467101c9b01cbd7682de859e43e04966760eea6
2018-11-08 16:00:39 +01:00
jenkins-bot b08643cbab Merge "Fix undefined NS issue with @coversDefaultClass" 2018-11-01 14:22:48 +00:00
Alangi Derick 679a45677e Explicitly use "MediaWiki\Minerva\SkinUserPageHelper;" on-top of file
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
2018-11-01 14:35:57 +01:00
Alangi Derick e2e5cbc3d7 Fix undefined NS issue with @coversDefaultClass
In skin MinervaNeue, correctly cover SkinUserPageHelper
namespace in SkilUserPageHelperTest.php

Change-Id: I8c8bd9986c2b3989f093bfb585d90647e8da60ef
2018-11-01 14:28:20 +01:00
jdlrobson 72cd31f221 Remove page issues instrumentation
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
2018-10-23 12:19:25 -07:00
jdlrobson cb2ad9374e extract moved to parser
The extractMessage function has a lot to do with parsing - so this
and its tests are moved into the pageIssuesParser.

Change-Id: I62d79fbba166eff2c3ca573ef94ff86a269a7f9a
2018-10-23 12:17:45 -07:00
jdlrobson 878989bd85 Merge PageIssue and IssueSummary type defs
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
2018-10-23 12:10:22 -07:00
Alangi Derick a2fd0b3c1f Add "Discussion" button to Main page on Mobile View
* 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
2018-10-23 19:59:22 +01:00
jdlrobson 13aeb1e8f5 Merge remote-tracking branch 'origin/master' into HEAD
Change-Id: I2b15e07932e4fe8b2a49fa87bb6136a3b50b7786
2018-10-22 16:20:33 -07:00
jenkins-bot 53216161c6 Merge "Fix watch star browser test" 2018-10-19 18:27:53 +00:00
jdlrobson 1c034f1d73 Fix watch star browser test
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
2018-10-19 11:00:19 -07:00
Stephen Niedzielski f07985c6de Hygiene: move page issue group parsing to parser
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
2018-10-16 18:20:38 +00:00
jdlrobson cbad0bd363 Merge skin option modules into a single ResourceLoader module and move enabled logic to client
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
2018-10-12 10:18:21 -07:00
Bartosz Dziewoński cada514ded Remove code related to no-anonymous-editing mode of MobileFrontend
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
2018-10-10 19:03:53 +00:00
Bartosz Dziewoński 13b60f6824 Remove user page CTA edit link browser test (move to MobileFrontend) [try #2]
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
2018-09-25 18:05:10 +00:00
Jdlrobson 39c5dbc94a Revert "Remove user page CTA edit link browser test (move to MobileFrontend)"
This reverts commit 6daf19dfb5.

Mobilefrontend change was reverted meaning this test should be
restored here so we continue to have coverage.

Change-Id: I2e8eeacaf01aa61040405501d69f329fe3a9bbd6
2018-09-25 15:47:36 +00:00
Bartosz Dziewoński 6daf19dfb5 Remove user page CTA edit link browser test (move to MobileFrontend)
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
2018-09-24 22:37:20 +00:00
Jan Drewniak 2163d5f965 Rename QUnit test files from "test_" to "test.js"
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
2018-09-19 08:01:31 -06:00
Stephen Niedzielski ba17b11987 Hygiene: fix line length violators
Change-Id: Ie1619acf5f319dafc2c9dc612335c1208522dab8
2018-09-13 09:33:20 -06:00
jenkins-bot 4c05ae758f Merge "Fix skipped tests" 2018-09-13 14:08:39 +00:00
jdlrobson 6ac46d5d56 Fix skipped tests
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
2018-09-12 14:09:52 -07:00
jenkins-bot 3abd6ef9f0 Merge "build: Update linters" 2018-09-12 17:26:12 +00:00
Ed Sanders 04a2b27d7f build: Update linters
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
2018-09-11 13:42:11 -07:00
jdlrobson f14d9514c6 Fix `formatPageIssuesSeverity`
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
2018-09-07 11:25:16 +02:00
jenkins-bot 002160ae9c Merge "page-issues sectionNumbers consistency on modalClose event" 2018-09-05 20:02:35 +00:00
Jan Drewniak 1a9bcd1e8a page-issues sectionNumbers consistency on modalClose event
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
2018-09-05 21:29:53 +02:00
jenkins-bot 7d87ec3b8f Merge "Replace ID selector with class selector (mw-notification-area)" 2018-09-03 16:18:45 +00:00
Ed Sanders 046e8072e7 Replace ID selector with class selector (mw-notification-area)
The former is deprecated.

Bug: T203259
Change-Id: Ie385f3820cc93931a6ccf2cf00e8457b0e48d3e0
2018-08-31 15:23:02 +00:00
Jan Drewniak 815f3d99ee For page-issues pageLoaded and editClicked events, treat
"multiple issues" templates as one issue.

When logging the `issuesSeverity` and `sectionNumbers` field,
any issues that are part of a "multiple issues" template only send
one value.

Adds an `isMultiple` property to IssueSummary to determine which
issues are part of a multiple-issues template.

Bug: T203050
Change-Id: I7d55dfead72439df4accadcdc8623a080e1321c2
2018-08-29 13:59:20 -07:00
Jan Drewniak 2cbd57c2f3 Consistent sectionNumbers and issuesSeverity for page-issues.
The value of `sectionNumbers` should be the section number of each issue
Not the number of the sections that have issues.

Bug: T203050
Change-Id: I6fd55c35b9e2ce35894259f36d1a50fb5dca5e43
2018-08-29 13:45:55 -07:00