Commit graph

64 commits

Author SHA1 Message Date
jdlrobson 5263b09397 Standardize use of buttons and icons in Minerva
* Adds button hover/focus states to all Minerva button icons
* Removes the deprecated mw-ui-icon-before selector

Depends-On: I4eb28eae4c4e23d58f1f85bc41c0caf77197d8a1
Bug: T288678
Change-Id: I490534f9f704a733191b459c8ee071848c436001
2021-09-17 15:36:54 +00:00
jdlrobson 5e0dd88af0 [Selenium] Skip failing test
Causing error "Node is either not visible or not an HTMLElement"

Change-Id: Id29fe854e04df637dca4d55458b31260b76f2b53
2021-09-16 14:57:03 +00:00
sahil 67e47ac0bd selenium: Update README.md file
Bug: T282237
Change-Id: Ia26bba12ede5e1055122387e36007887669267f8
2021-08-16 12:23:20 +05:30
Edward Tadros 69a100cb45 selenium: Fix failing Jenkins job selenium-daily-beta-Minerva
"Page should be creatable" test is fixed by increasing timeout.
"Wikitext Editor Makes actual saves Broken redirects" is skipped.
The skipped test will be replaced with a new test.

Bug: T269051
Change-Id: I72c43b361bd8e63e500656f164412d37856805c1
2021-07-01 07:50:46 -07:00
jenkins-bot 18329d800a Merge "selenium: Update wdio-mediawiki" 2021-06-09 02:57:25 +00:00
jenkins-bot 8900f58e2f Merge "Replace categories button with HTML rendering" 2021-06-07 08:58:44 +00:00
Željko Filipin ed40ca23c9 selenium: Update wdio-mediawiki
wdio-mediawiki v1.1.1:
- Includes wdio-defaults.conf.js file that vastly simplifies wdio.conf.js.
- Replaces @wdio/spec-reporter with @wdio/dot-reporter.
- Introduces video recording.

Bug: T283597
Change-Id: I5408b35060734709a6d21520c6abd738fb44d5a1
2021-05-27 17:49:19 +02:00
Jdlrobson 8651df02bb Replace categories button with HTML rendering
Bug: T246049
Change-Id: Id8c7493a525844b43c1628a1f4f09ae716ece2ba
2021-05-14 20:34:59 +00:00
Željko Filipin 20bb2bf09c selenium: Run tests from desktop site
Bug: T282058
Change-Id: I342a1ba510ea5da85da904c1bec4f26adfc60d33
2021-05-07 17:44:33 +00:00
Željko Filipin def50f52c1 selenium: Fix 'Page should be creatable' test
The test was failing on The Beta Cluster because of two reasons:
- Local development environment and CI need to switch to mobile view,
The Beta Cluster doesn't.
- Local development environment and CI allow anonymous edits,
The Beta Cluster doesn't.

Bug: T281733
Change-Id: Iedcd94dc5cf1ace14baadfe9d9bd5bed9788f775
2021-05-05 21:12:16 +00:00
jenkins-bot d1527e7aab Merge "selenium: Page should be creatable" 2021-04-29 23:18:09 +00:00
Željko Filipin 8ac75d254a selenium: Add JUnit reporter
JUnit reporter is required to create the XML file that Jenkins uses to
create Test Result Trend chart for selenium-daily-beta-MinervaNeue
job.

Bug: T214686
Change-Id: Ibf4b08f2f4b60ad02a3a3b5a5ba8e0d899a86859
2021-04-29 18:06:15 +02:00
Željko Filipin 238010dbea selenium: Page should be creatable
Bug: T269051
Change-Id: I958d1f5035f7d28c70ff19c3db6f3707defa880f
2021-04-26 15:30:31 +02:00
jenkins-bot db0b1e9585 Merge "selenium: Update WebdriverIO configuration file" 2021-04-23 14:53:51 +00:00
Željko Filipin 7488d97256 selenium: Update WebdriverIO configuration file
Target by default MediaWiki-Docker instead of
obsolete MediaWiki-Vagrant.

Take screenshots of all tests, not just failed ones. It was recently
updated in core. See 2320f00.

Remove `Screenshot location...` messages. It was also recently
changed in core. See d0762b5.

Bug: T280975
Change-Id: I194aabfb1282c348fd4df3223e0a911cb38ec6e3
2021-04-23 13:57:25 +00:00
Željko Filipin 421f349bf2 selenium: fix directory (tests/selenium/log) doesn't exist
If the directory is not created manually, screenshots are not taken and
the error message is displayed. The simplest solution is to add an empty
`.gitignore` file in the directory.

Bug: T280975
Change-Id: Ibe867dfb351aa7191a81cdf2fd15c4eb420b571b
2021-04-23 13:54:06 +02:00
Edward Tadros fbd373b5d7 Selenium: Skip test Wikitext Editor (Makes actual saves)
Bug: T269051
Change-Id: I5680d98d9d3be8238c427f1baf0b1ac78658cbb7
2021-01-14 22:20:24 -08:00
jdlrobson d4828b200e Skip Minerva selenium test for creating talk topic
For sometime now this test has been intermittently failing for patches
across multiple repositories.

Temporarily skipping it now while debugging continues.

Bug: T262617
Change-Id: I90f23c57db22f878b6674296b83827c2ee4242e6
2020-09-24 12:38:37 +00:00
jdlrobson 065b6e52b2 QA: Restore nested reference test
References clicks should now apply to the `sup` element not `a`
as the `a` element can contain spans.

Depends-On: I0d5bb398e99465ade357743dd3ff34ae551243c5
Bug: T258096
Change-Id: I5d8cae5f465a86282796b3fdc6bc658f6c836432
2020-07-28 21:53:19 +00:00
Edward Tadros 6f1fb87414 Selenium: Skip nested reference test.
BUG: T258096
Change-Id: Ie16eb622384a48ad2b060a720ea3e8e6abfb1fa2
2020-07-28 13:55:36 -07:00
Edward Tadros 49c8c0f0e1 Selenium: Update WebdriverIO to version 6
Bug: T255447
Change-Id: I51daa462187983462d7f6529e5f76f47b21e5ef2
2020-07-13 07:38:36 -07:00
Edward Tadros c8ce9608c0 Selenium: Update WebdriverIO to version 5
Bug: T255447
Change-Id: I4cdde3070a6dc4e742ea37a78a17dfd556103dd6
2020-06-30 08:27:05 -07:00
jenkins-bot 83da1b00e5 Merge "build: Update eslint-config-wikimedia to 0.16.0" 2020-06-04 19:38:17 +00:00
Ed Sanders a32999e641 build: Update eslint-config-wikimedia to 0.16.0
Change-Id: Icabf6e065ed5685207731262db72faf848a0a04d
2020-06-04 08:39:32 -07:00
Edward Tadros 02bd59ca73 Selenium: Increase mochaOpts timeout for debugging
Change-Id: I64606304ddd5e7fb116cd4a1a9958b8703617b27
2020-06-04 14:59:04 +00:00
Edward Tadros b12fe5d5cc Fixed search_loggedin.js Selenium browser test
Fixed the search_loggedin.js test by updating watched watchstar methods.

Bug: T174018
Change-Id: I521279d97bc0b264062296cf318f4f56cebee2aa
2020-04-17 08:02:11 -07:00
Željko Filipin fafc41afd4 Selenium: update README.md file
Simplify, update and fix a few typos in README.md.

Bug: T210726
Change-Id: Iab666e1de50f3a0a00faef65e4ea42adb2b1d1ee
2020-04-16 17:52:00 +02:00
Željko Filipin 9d0ffdd867 Selenium: record videos of all tests
Works only on Linux. It works in our CI, since it uses Linux.
For instructions on how to test it on a Linux machine see:
https://www.mediawiki.org/wiki/Selenium/Node.js/Inside_MediaWiki-Vagrant

Bug: T245250
Change-Id: Ic4d909304b498c56f155bcade40a99f95ed72bcb
2020-03-11 21:03:56 +00:00
jdlrobson 46f28730e1 Do not add the navigation-enabled class to body tag for drawers
This class is used for the main menu exclusively. Applying it
will reveal 2 transparent shields on top of each other when is
not desired

Bug: T214049
Change-Id: I8ddcc7082c3c602a78084157c2d613366a8016c7
2020-01-14 01:20:40 +00:00
jdlrobson ff687da5c2 Categories browser test only runs if the feature is enabled
Remove some Ruby code which was causing lots of confusion.

Bug: T237290
Change-Id: I2c0ae965e4ee094c1b4edc3817c1bf66dc3fa694
2020-01-13 22:09:07 +00:00
jdlrobson 428047087a QA: Move reference browser test to Node.js suite
Ruby is not supported. The test often flakes.

Change-Id: I883cf283ea5307cdc0daebf41f20928d1adb309a
2019-12-18 00:40:27 +00:00
Nicholas Ray ec93d34370 Resemble AMC mode for all users on user pages & user talk pages
This commit:

* Removes the blue secondary action links found on User pages

* Modifies ToolbarBuilder to add the contributions
icon into the toolbar when on a user page/user talk page.

* Turns on HISTORY_IN_PAGE_ACTIONS, TOOLBAR_SUBMENU,
TALK_AT_TOP skin options for all users on user pages / user talk pages.

* Languages icon is moved to overflow menu

* Remove $userPageHelper param from UserNamespaceOverflowBuilder as
it isn't using it and it is confusing to pass it in

Bug: T232653
Bug: T235681
Depends-On: I2138472e68d8cab1c50cbb42807bd5b79e7e2749
Change-Id: I940e5cf7638ff38686eeca3d41554b8a22d35615
2019-12-13 14:10:43 -08:00
Piotr Miazga e703f00655 Add History icon and Article/Talk tabs to default loggedin experience
Additional change:
Drop the feature file - no value in having to keep talk.js and talk.feature
in sync

Bug: T232594
Bug: T232652
Change-Id: Id8d05b1358f81845d70142ceebf193d8b192ee0a
2019-12-13 21:04:36 +00:00
Nicholas Ray 2d579183c9 Render talk page as a tab instead of an overlay
Following up on Jon's POC, this will get rid of the talk board component in
favor of linking to the server rendered talk page.

Additional Changes:

* Cleaned up talk selenium tests. Removed talk_steps.rb which doesn't appear
to be used anymore.

* Changed talk add button classes to a single class

* Moved "Add discussion" button to postheadinghtml per design mock

* Added  "...talk-explained", "...talk-explained-empty" messages to
postheadinghtml per design mock

* Due to undesirable jumps in window scroll caused by the section anchor
& Toggler.js code when opening the TalkSectionOverlay (read fixme in
code), a Promise is always returned from OverlayManager route to reset
the scroll position to the top when the section overlay is opened.

* Moved
"mobile-frontend-talk-fullpage",
"mobile-frontend-talk-reply-success",
"mobile-frontend-talk-topic-feedback",
"mobile-frontend-talk-explained"
"mobile-frontend-talk-explained-empty"
messages to minerva as minerva is
the one who initiates those messages now.

* Limited $talk selector to only `.talk` elements since amc talk tab
does not need to be targeted

* After saving a reply from TalkSectionOverlay, the DOM that is not
part of the overlay becomes out of sync since a new reply was created.
To get around this, an `onSaveComplete` callback was passed (similar to
the TalkSectionAddOverlay) to execute a full page refresh. Although this
is clunky, it is the easiest way to resync.

Bug: T230695
Depends-On: I80201394fd7015db6700446142b0b4b20829f12e
Change-Id: I243f1193bce0da9fa710fc3b5379f90b2d079680
2019-11-05 09:51:43 -07:00
jenkins-bot 0c3f7bc52d Merge "Use core watchstar code" 2019-10-15 22:56:25 +00:00
jdlrobson bf8d325388 Use core watchstar code
Apply the mediawiki core watchstar to the
Minerva skin. Note, watchstars in search and other locations will
continue to be provided by the MobileFrontend library (see
follow up patch I7b748dc87089389400b0035c62a3b9a00c2e43f9)

Bug: T234970
Change-Id: I11bbe976412b50dba76a55f37887e4c9235d0be1
2019-10-15 15:33:25 -07:00
Edward Tadros b9af3c8844 Temporarily fixed waitForPropogation.
Replaced waitForPropagation code with a browser.pause because the
time delta computation was not working propertly. This will be changed
with a more dynamic sync operation in the future.

Bug: T224947
Change-Id: I30bd7969e4c2c691622fd63c6f88aadadb8065e9
2019-10-11 16:12:53 -07:00
jdlrobson ab61dbb173 Echo is removed from Minerva
Managing the transition from old implementation to new:
* A version number is exported from skins.minerva.scripts to
tell dormant code added to Echo in I09c27a084100b223662f84de6cbe01bebe1fe774
to begin running.
* A skinStyle is added for the new `ext.echo.mobile` module.
`mobile.notifications.overlay` will soon cease to exist but is kept registered for
backwards compatibility reasons
- Drop ev.preventDefault call from onSkinClick - it is no longer necessary and will ensure
notifications overlay closes when shield is clicked while it is open.

Integration:
* A server side hook SkinMinervaReplaceNotificationsBadge allows Echo to replace
the current Minerva notification badge
* A to-be-created client side hook is subscribed to to deal with the navigations drawer
like functionality using the mainMenu code
* id and class names are added to the container for the NotificationBadge for compatibility with
ext.echo.init in Minerva's desktop mode (it will work like Vector)

See I09c27a084100b223662f84de6cbe01bebe1fe774 for understanding the bigger
picture.

Depends-On:  I09c27a084100b223662f84de6cbe01bebe1fe774
Bug: T221007
Change-Id: I4c11f1b241d629e1b294ebaec17472fbf944f8c7
2019-10-08 23:21:12 +00:00
Ed Sanders d54798ec6b build: Update eslint-config-wikimedia
Change-Id: Id14552b5663340ffc1e2ae02599a1df99685e464
2019-10-04 15:28:49 +00:00
Ammar 6a0192bf37 Remove "uploads" link from userpages
*This commit also removes it from tests and references

Bug: T233985
Change-Id: I0d7eb72a2663f1d1138afe09124a154ad0502498
2019-10-02 00:11:13 +01:00
Jan Drewniak 51049c0ceb Refactor "last-modified" bar to use flexbox layout.
Brings the last-modified toolbar (links to history page at the bottom
of articles) in line with recent icon changes. Removes the icon
class from the toolbar itself and by employing a flexbox layout,
reducing the amount of CSS required for this toolbar.

Bug: T233172
Change-Id: I27658477aaeed3290aced844caa64fc5e1c34fbd
2019-09-27 00:03:14 +00:00
jdlrobson e888b487f4 Merge skins.minerva.talk and skins.minerva.watchstar into skins.minerva.script
Logic is moved from server to client. Config is added via getSkinConfigVariables (e.g.
passed to mw.config ) and a JavaScript if statement.

The IIFE in watchstar and talk files is replaced with a module.exports function to avoid
refactoring at this point and added risk. The file contents remain the same.

skins.minerva.options is left as is, given the code is more experimental and used in
the beta mode - should not be sent to all clients.

Additional change:
* Remove skins.minerva.toggling (that module has been empty for a week now and functionality
moved to mobile.init module)

Depends-On: Ie71adbe18e8dbeb661ddb9d7d3d1d0897891d515
Bug: T233048
Change-Id: Ife777e76d9d77894fb5d09e7c8f0238b00596a7a
2019-09-24 14:19:18 -06:00
jdlrobson 6e71367168 Update Minerva watchstar browser test
Change-Id: I31bff635c3f122c89690a364201ba08c8755e409
2019-09-20 22:36:40 +00:00
Ed Sanders 8e579c373b build: Update linters
Change-Id: Ie0983466ad0eed0a30d62f28b10efebd0f2eacba
2019-09-17 14:21:30 +01:00
Jan Drewniak 35e489de25 Fix truncated text showing through icons & last-modified bar
To accommodate for cached HTML a new class last-modified-bar__text
replaces last-modifier-tagline to help us distinguish between old
out dated HTML and the new HTML.

Bug: T232792
Bug: T232800
Change-Id: I53fa45058dbc81c91089840073e03113ff1a4b9c
2019-09-13 18:35:31 +00:00
jdlrobson c0f08790ea Remove the mw-ui-icon hacks and overrides
Note: this agitates T230232 again - when merging this please
make sure a merge for I929090848f3e04647a97f4979ec78682623fa070
is pending.

In various places we try to override the default mw-ui-icon behaviours
The hacks need to be removed as part of addressing the core problem.

Changes:
* Wherever we use mw-ui-icon-before in PHP - wrap the label with a span
so that label font-size is altered where needed - not the icon
* Where a small icon is needed us isSmall parameter for the Icon component
* Apply font-size to labels of mw-ui-icon-before elements
* The browser tests need a slight update to access the span element inside
a menu item - in the case of the logout button the label is always hidden,
so we need to check the visibility of the parent element (secondary_action)

Bug: T229440
Depends-On:  I3f803ec4c9068b30aa93b803391aa4d65d8310ff
Change-Id: I07e4ae233979636b739f1117dd7703571e0a9366
2019-09-10 10:53:20 -07:00
Stephen Niedzielski bfdfc1165c [UI] [menu] slide the main menu over the page
Slide the main menu over the page instead of sliding the page over the
menu. Also, use viewport units for the main and notification menus.

Note, this lays foundation work for T225213.

Bug: T206354
Change-Id: I14b67d1e97b84086ea13e28df8148824a1f493e3
2019-08-12 18:22:45 +00:00
jdlrobson 0311e8ed1c Disable diff test due to issue with RunJobs
Bug: T229031
Change-Id: I9bf37b796ba9ddafdc3be559e74d2b511c3e78b1
2019-07-25 18:38:05 +00:00
jdlrobson 72df451bd3 Embrace packageFiles
Help with readability by using module.exports and require rather than the MobileFrontend
provided mw.mobileFrontend module manager (and avoid adopting webpack at this time)

Replace usages of mw.mobileFrontend.require with local require and module.exports
(compatible with RL or Node implementation)

Changes:
* Notifications modules are merged into skins.minerva.scripts and initialised
via a client side check.
* new file overlayManager for exporting an overlayManager singleton
rather than being hidden inside resources/skins.minerva.scripts/init.js
* All M.define/M.requires swapped out for require where possible
The `define` method is now forbidden in the repo.

Bug: T212944
Change-Id: I44790dd3fc6fe42bb502d79c39c4081c223bf2b1
2019-07-16 18:04:10 +00:00
jdlrobson a9533fc463 Browser: Drop failing tests
Two tests are failing. These are false positives that
obscure real failures. Both are removed for the following reason.

1) Editor test is covered by the redirect tests - failing due to
concurrent edits (possibly because multiple browser tests act on the same
page at the same time). However, editing is already covered by the other
2 cases.

2) Remove unwatch test - this is failing as there is a problem in the
setup - the page starts unwatched when it should be watched. The test
for checking that an article can be watched should suffice here.

Bug: T224947
Change-Id: I3049e1b190c3cb2ddc198a45681f59782f770d6a
2019-07-01 18:02:54 -07:00