Commit graph

343 commits

Author SHA1 Message Date
Jon Robson 55419f9bcc [Tests] Strengthen the reference drawer test
Assert the drawer is visible before clicking it.

Bug: T266704
Change-Id: Iec1d2a2c0a4b34509f4b73ed87ccc63eeecad671
2022-04-18 23:05:29 +00:00
lens0021 ea8c30b65c phpunit: Implement the new BundleSizeTest::getSkinName()
Bug: T305779
Depends-On: Id77c6124c9b1fd20633cda47bbca89f9b6724a63
Change-Id: Ia82018a31ff6ce2fe80946fd8f8d05a1dddf9523
2022-04-12 00:50:24 +00:00
Jon Robson 996b3fc36b Remove browser tests in Ruby
These are never run. We are not running them manually, so we should
remove them from the codebase.

Change-Id: If54b45dfc72f32c2631a4338096b568aae5d404a
2022-04-05 15:49:35 +00:00
Jon Robson c4f7c60f9f [Tests] Move beforeEach calls into tests
beforeEach failures do not have videos associated. We'd like to see
what's going wrong with these tests.

Change-Id: I1b723bcd7d00f15907647d5c7a4aa1f57578468c
2022-03-17 14:14:10 -07:00
jenkins-bot 366d37efb1 Merge "Revert "[Tests] Check for VisualEditor in editor overlay integration test"" 2022-03-16 22:01:31 +00:00
Jdlrobson 63e744d147 Revert "[Tests] Check for VisualEditor in editor overlay integration test"
This reverts commit 422e3a3b09.

Reason for revert: The Ruby tests don't run. This change should be in
the Node tests.

Change-Id: If59753569b1eb24ffaf2486242ea49e794d388b5
2022-03-16 21:44:55 +00:00
jenkins-bot ddc5252b52 Merge "[Tests] Check for VisualEditor in editor overlay integration test" 2022-03-16 17:22:47 +00:00
Jon Robson 422e3a3b09 [Tests] Check for VisualEditor in editor overlay integration test
The mobile editor can load in two modes - visual editor or wikitext
editor. On the beta cluster depending on user preferences, the
VisualEditor may be loaded.

Since this test is just a smoke test that checks it renders, it's
okay to look for both.

Bug: T301575
Change-Id: I8192fc6e71e064278f62fc41e80652860f319e37
2022-03-15 22:41:51 +00:00
Umherirrender 4831549b14 Replace Title::newFromText by Title::makeTitle
* Prefer Title::makeTitle in unit tests where the title is known,
  this avoids title parsing and can improve the test performance.
* Use Title::makeTitle for the user page like done in User::getUserPage

Change-Id: I3901a6ed208a5ff90b216d01d3c4962cdcb48db1
2022-03-10 22:42:56 +01:00
jenkins-bot 1a2960a3c0 Merge "Tests: expected value goes first in PHPUnit assertions" 2022-03-10 20:55:17 +00:00
DannyS712 3da8d0c734 Tests: expected value goes first in PHPUnit assertions
Change-Id: I5dee074f69a48a6aca218855859a518ca1c051e1
2022-03-04 19:11:34 +00:00
Reedy b6685f9c4a Namespace SkinMinerva
Change-Id: I8f6bddac9f8cd060c551651e711ee987b8bbfbe3
2022-03-04 17:50:20 +00:00
Bartosz Dziewoński ff00b6d9c5 Disable failing talk page tests temporarily
Bug: T302993
Change-Id: I1cbe8367394fdee1c0a88d5dbe2bd00da0b74062
2022-03-03 19:50:09 +01:00
Željko Filipin 436bf80bd8 selenium: Delete tests disabled for more than 1 year
'Redirects' was disabled by Edward Tadros in fbd373b (2021-01-15).

'A newly created topic appears in the list of topics' was disabled by
Jon Robson in d4828b2 (2020-09-24).

Bug: T280652
Change-Id: I63fb62c0c2871ff2713643285cd6e5d878684f83
2022-02-16 15:58:00 +01:00
Umherirrender 791cb1081a selenium: Ensure .waitForDisplayed() before .click()
Avoid time outs
Error in "Opening and closing the reference drawer.Opening a nested
reference"
Error: waitUntil condition timed out after 5000ms
    at Browser.<anonymous>
(/workspace/src/skins/MinervaNeue/node_modules/@wdio/utils/build/shim.js:270:24)
    at iShouldSeeDrawerWithText
(/workspace/src/skins/MinervaNeue/tests/selenium/features/step_definitions/reference_steps.js:25:10)
    at Context.<anonymous>
(/workspace/src/skins/MinervaNeue/tests/selenium/specs/references.js:44:3)
FAILED in chrome - /tests/selenium/specs/references.js

Change-Id: Ia5d493fba4995c1122721b76ae98d6ba60399238
2022-02-03 21:18:02 +01:00
Jon Robson 0b3d21d58d Main page definition come from MediaWiki:Sidebar
Bug: T291568
Depends-On: Ia54d01eb5d8d9c33d067f61c73203f9fec4569a6
Change-Id: Ia9998780dc0a5f51af52d928499b51d5566cf29d
2022-02-02 00:44:56 +00:00
Antoine Musso 0fbb2a34f2 selenium: run tests concurrently
Wikimedia CI now serves MediaWiki over Apache (T285649) which mean we
can do concurrent requests!

Bug: T226869
Change-Id: Ifb155b7a14f5dd7b037578c83c9590f7901feacf
2022-01-05 16:44:12 +00:00
jenkins-bot 3bb487b733 Merge "Minerva uses core page title handling" 2021-12-22 18:06:54 +00:00
bwang bcdfd66fa6 Use watchstar() instead of deprecated jQuery event to update watchstar classes
Depends-on: I88af8585e8fc75f77ebef867d267199aeb2c6592
Change-Id: I859c9d763e77bb06b5109d419fb581258f3bd665
2021-12-21 16:43:57 +00:00
jdlrobson f9a8703a64 Minerva uses core page title handling
Bug: T265892
Change-Id: I2ffdedd64414ffb3c6e441391a75fd6e744847a4
2021-12-20 19:39:42 +00:00
Thiemo Kreuz bb31754073 Use PHPUnit shortcuts where possible
This makes the tests a little easier to read, I would argue.
any() is the default anyway. It doesn't add new information to the
test.

Change-Id: If4655ddea494f1054538a760802b583e17c0108e
2021-12-17 11:29:48 +01:00
Kosta Harlan d8c505c73a Move bundlesize test to MediaWikiIntegration test
Depends-On: Ieb7591f3c0ac843677a2a61b4ad47f920fc2ca2d
Bug: T255149
Change-Id: I311793952e995715010dc70069e1056165a1cd90
2021-12-10 08:43:51 +01:00
bwang ef4aa95ae2 Remove primary/secondary menu items, instead add a separate log out menu item
Bug: T293041
Change-Id: I9f73fdba1856dd9e0ea7120df0fb18061337961a
2021-11-18 19:51:33 +00:00
Umherirrender 993332734a build: Updating mediawiki/mediawiki-codesniffer to 38.0.0
Change-Id: I35e6bd738c78db48d98e1a870de4a28654d3d3f4
2021-11-13 18:58:14 +01:00
Ed Sanders 2ec4b950e2 build: Update eslint-config-wikimedia to 0.21.0
Change-Id: I0185de7ec62c54ee733de94622e0c41a65e86731
2021-11-09 14:48:40 +00:00
Ed Sanders ef742a0d6a build: Update wdio devDependencies
Change-Id: I2d51563517f88ffa50ddf76d1716d13024f21381
2021-11-09 14:41:17 +00:00
jdlrobson 5a7a9c9c31 Drop wgMinervaPageActions
Remove code per spike outcome (T226490#7438685)

- This configuration option is never used in Wikimedia production
- isTalkAllowed content body is merged into isAllowed. Resulting code
is more readable.
- isAllowed('talk') still returns false on main page for anonymous users
which is the current behavior. Even on sv.m.wikipedia.org where talk pages
are shown to anonymous users, we do not show the talk page on the main page.
Add a comment pointing to the associated phabricator ticket

Bug: T226490
Change-Id: I9f34817c5ad654a6a66fe6156850a3e3fee881a7
2021-10-21 17:25:37 +00:00
Alexander Vorwerk 702ec511dc MediaWikiTestCase -> MediaWikiIntegrationTestCase
MediaWikiTestCase has been renamed to MediaWikiIntegrationTestCase in 1.34.

Bug: T293043
Change-Id: I5b83516ccdf0ac025421844c9516e856060aefba
2021-10-12 00:53:10 +02:00
jdlrobson 511cabfadf DownloadAsPdf follow ups
Follow up to
9833b2d853

- Rename timeout to printSetTimeoutReference
- Remove redundant function
- update documentation to mention side effects

Change-Id: I4c1b356da3ba53e805d126642f0b2da915b988e5
2021-09-28 10:49:58 -07:00
jdlrobson 9833b2d853 Fix the download link to use addPortletLink
Bug: T291739
Change-Id: Ice79e1d5745116c0bf4b292371f4b43edbcc054c
2021-09-27 21:54:17 +00:00
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
Alexander Vorwerk 348e19ed5c Avoid using ContentHandler::getForTitle()
ContentHandler::getForTitle() is deprecated since 1.35

Change-Id: I52c40084d96e88b2edab46c15a10b83b7decf192
2021-06-01 19:17:58 +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
libraryupgrader e9a4bec57c build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: I325e6aabd1cd89cf5893ea8e85202765ed46a57e
2021-05-04 12:26:23 +00:00
jenkins-bot d1527e7aab Merge "selenium: Page should be creatable" 2021-04-29 23:18:09 +00:00
Cindy Cicalese ff8ab4ea5c Replace Title::isWatchable() with WatchlistManager::isWatchable()
Bug: T281497
Change-Id: I0f7a82191eae8edd4c0c1d16d89c81e601ae5c80
2021-04-29 18:31:55 +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
ZabeMath 4cdd0af8bf Allow Users with permissions to do expanded actions in Minerva on mobile
Allow Users with the needed permissions to delete, protect or move pages in Minerva on mobile version.

Bug: T231291
Change-Id: I1e438b7d3683d288a8a6c5a9f5dcea6b3b3d9f71
2021-04-26 18:51:32 +00: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