Commit graph

4702 commits

Author SHA1 Message Date
jenkins-bot 01ea52c6ec Merge "[Cypress] Retry toolbar clicks to open submenu" 2024-03-27 16:43:16 +00:00
jenkins-bot ca419981ab Merge "[Cypress] Wait for VE to load" 2024-03-27 16:38:48 +00:00
WMDE-Fisch 66996fe45d [Cypress] Retry toolbar clicks to open submenu
Introducing a little helper function that retries clicks until
some element becomes visible.

Bug: T360026
Change-Id: I45b7802c8009b9b552b41c1fcaf861f2a7afb495
2024-03-27 16:17:19 +00:00
WMDE-Fisch 4e935abb2e [Cypress] Wait for VE to load
I missed this spot in I321b4114ca03ebd02a79d8bd3863ea0e68494dc2

This should stabalize the remaining tests failing in the stress
test.

Bug: T360026
Depends-On:  Idbf87178e9ee961e84a6e212dbadb0f36a1c8197
Change-Id: Ic41fbd9da24c3bba7eec3d1429731b2cc6665404
2024-03-27 13:45:54 +00:00
jenkins-bot 7906b2147a Merge "Remove confusing, unnecessary .length check on a string" 2024-03-27 08:15:09 +00:00
thiemowmde 61a49f4337 Remove confusing, unnecessary .length check on a string
I find this particularly confusing because it makes it look like this is
an array. As a reminder, while empty arrays are false in PHP they are
not in JavaScript. An extra `if ( array && array.length )` is really
critical. But this is a string. Empty strings are false in JavaScript.
No problem.

This was originally written in 2013 via Ib244ff6 as a pure .length
check. The duplication was added a year later via Id401d97 for an
unknown reason.

Bug: T356871
Change-Id: Ied335f170a9a0a7bbc8c8fd12f95b6902f401bbf
2024-03-27 07:16:54 +00:00
Translation updater bot 6ca87923bb Localisation updates from https://translatewiki.net.
Change-Id: I0c667f3a28bf61f9304ffe4f3c7844f17cf6af8e
2024-03-26 08:19:09 +01:00
Translation updater bot 167f762271 Localisation updates from https://translatewiki.net.
Change-Id: I7e3c7332ec97d496a2ee08adbc32a811f441dadb
2024-03-25 08:35:30 +01:00
jenkins-bot 78363709a3 Merge "Make use of LESS mixins in ext.cite.styles.less" 2024-03-22 22:29:29 +00:00
jenkins-bot ed14a9e48f Merge ".mailmap: Add bot contributors so they're easily ignored" 2024-03-22 16:44:25 +00:00
jenkins-bot 83e778bbfe Merge "Add .mailmap file based on actual code contributions" 2024-03-22 16:11:32 +00:00
James D. Forrester 4cd75e57b3 .mailmap: Add bot contributors so they're easily ignored
Copied from MediaWiki core's file.

Change-Id: Ia5653de0591b6fa67ac306805b854f747ff6cee9
2024-03-22 16:03:23 +00:00
thiemowmde 0e9546a382 Add .mailmap file based on actual code contributions
This does two things:
* Some authors have used different email addresses over the years.
  But it's the same person. Merging them makes e.g. git shortlog
  much more useful.
* This also makes sure the author name before the email address is
  always the same, and not listed multiple times because of e.g.
  different capitalization.

Change-Id: Icdfd397a46369ffc40ac982a4382b19ad207957a
2024-03-22 15:38:17 +00:00
jenkins-bot b0b356f4e8 Merge "Add initial QUnit tests relevant for reference re-use in VE" 2024-03-22 10:49:33 +00:00
jenkins-bot c7eb279260 Merge "Use design tokens in Cite extension" 2024-03-22 08:31:29 +00:00
thiemowmde 9e7b365531 Make use of LESS mixins in ext.cite.styles.less
Bug: T360720
Change-Id: Ibef7df801f1dc5d550e6663200fa38ddf8c21054
2024-03-22 09:08:28 +01:00
Translation updater bot 7535cf0b3d Localisation updates from https://translatewiki.net.
Change-Id: I7b2bb4d2cf0dd4180484dc9fdd1361ddc1a576ac
2024-03-22 08:43:46 +01:00
Jon Robson 75b4682dbf Use design tokens in Cite extension
Upstream this value from Minerva where it is being
overriden.

Bug: T360720
Change-Id: I03536d033c7cc0f2420550f22fd4b094e0d179ba
2024-03-21 15:11:23 -07:00
thiemowmde d6a58cfa8d Add initial QUnit tests relevant for reference re-use in VE
Note these are more meant as regression test to better cover what's
done in other patches. Everybody should feel free to delete a test
when it gets in the way. I marked a few especially fragile places
with respective comments.

Bug: T358652
Change-Id: I7844907fe3ef4f3439717381b4ecdac9e2d0a825
2024-03-21 09:37:26 +01:00
Translation updater bot 9bc74e7694 Localisation updates from https://translatewiki.net.
Change-Id: I2d2a414f5fa41f47d6418302e8712bf2e1f30aba
2024-03-21 08:54:27 +01:00
Translation updater bot e6f17fd477 Localisation updates from https://translatewiki.net.
Change-Id: Icb746719a0a9d1b12c9ab23577a6fb4068c0957a
2024-03-20 08:23:14 +01:00
Adam Wight a8d0387de7 Skip tests causing trouble in the wild
Please don't reenable until we have some confidence that these aren't
flapping.

Bug: T360026
Bug: T360361
Change-Id: I54f80e31b4fca4c1c4632af1d43e22a88ae5f218
2024-03-19 14:49:33 +01:00
WMDE-Fisch 463e25b742 [Cypress] Streamline some selectors and click paths
Change-Id: I9c897f3c94a44f50de5c7a31822645a52cb3d70d
2024-03-19 11:33:23 +00:00
WMDE-Fisch 5f3246ee38 [Cypress] Move read-only cite tests to one set
We don't need to setup a fresh page on every test when we're not
manipulating the page during the tests. This will make test run
faster overall.

Change-Id: I4f41f0bf7b01f5a8498fda4827b90c9976cbd528
2024-03-19 11:33:19 +00:00
WMDE-Fisch 00147fb1fe [Cypress] Split before steps to fix retries
When the tests run into an issue and are re-run only beforeEach
will be executed. Also cookies are not kept for the re-run.

This patch makes sure that steps needed to have a clean re-run are
split to the beforeEach

Change-Id: I47cba7f6ec240fefa09a4484bca0a621b99f2bcb
2024-03-19 12:24:20 +01:00
WMDE-Fisch 10fac9d1b5 [Cypress] Create some more helpers for generic setup code
Bug: T358851
Change-Id: I39ddcaf8e3684c4057639e014c18e1b1473e7b12
2024-03-19 10:24:23 +01:00
jenkins-bot f4c3f64e24 Merge "Try more specific CSS selectors for clicks in browser tests" 2024-03-19 09:17:18 +00:00
Translation updater bot 8dff3e20c5 Localisation updates from https://translatewiki.net.
Change-Id: I512a36ea005567c4acd4b5d158720922307a8351
2024-03-19 08:24:41 +01:00
jenkins-bot ca501ec1cf Merge "[Cypress] Increase default timeout" 2024-03-18 10:47:49 +00:00
jenkins-bot 5d03b8e356 Merge "[Cypress] Check toolbar state to wait for VE" 2024-03-18 10:46:08 +00:00
jenkins-bot dbff601ebf Merge "Remove obsolete @method annotations" 2024-03-18 10:00:17 +00:00
Translation updater bot 8871c1b83f Localisation updates from https://translatewiki.net.
Change-Id: I516d32a274feb3a715998c5f9acad6249ab3b593
2024-03-18 07:45:22 +00:00
libraryupgrader 0da4ca4b79 build: Updating mediawiki/mediawiki-codesniffer to 43.0.0
Change-Id: I98296a1ed937c8a617bc47c68c913cd7baca6245
2024-03-17 15:52:37 +00:00
WMDE-Fisch 4fafba2ee3 [Cypress] Check toolbar state to wait for VE
We need to wait for the UI to be finished loading before we can
interact with it. Here I implemented how it's done in the VE
selenium tests. They seemed to have similar issues with flaky
tests before they introduced what I use here now.

See I321b4114ca03ebd02a79d8bd3863ea0e68494dc2

Bug: T360026
Change-Id: I91bc104ef7af4c74765c2c354eeadeacef162309
2024-03-15 20:56:08 +01:00
WMDE-Fisch c86509d1be [Cypress] Increase default timeout
Might help in some edge cases where elements need just a bit longer
to load and be available.

Bug: T360026
Change-Id: I60176435963c708d13ce7fd3e0691cb6e7a35fb1
2024-03-15 19:21:14 +00:00
jenkins-bot 974401489d Merge "Move reference previews to Cite extension" 2024-03-15 19:15:16 +00:00
thiemowmde 90e00acc18 Try more specific CSS selectors for clicks in browser tests
The main change here is the "enabled". Don't try to click the button
as long as it is disabled. This is critical because VisualEditor
takes a while to boot. The toolbar is already visible, but disabled.

Warning, untested! It makes sense in my head but I'm not sure if it
works.

Bug: T360026
Change-Id: Ib46d420a56effd4b4a0e48e2121106a830e5f51c
2024-03-14 10:26:28 +01:00
jenkins-bot 52df9bd54f Merge "Skip reuseRefs test until we can debug" 2024-03-14 09:13:36 +00:00
jenkins-bot 2f1b3477f7 Merge "Remove broken CSS for ve.ui.MWReferenceGroupInputWidget" 2024-03-14 09:07:48 +00:00
Translation updater bot 5b7e331563 Localisation updates from https://translatewiki.net.
Change-Id: Ia5d8a16095d0a5893728799260bec416226e6e59
2024-03-14 09:02:36 +01:00
jenkins-bot cb725645ea Merge "Fix broken deletion of non-existing <ref refGroup="…">" 2024-03-13 16:37:43 +00:00
jenkins-bot c47627b9df Merge "Add basic PHPUnit tests for Parsoid implementation" 2024-03-13 14:59:43 +00:00
Adam Wight 551d80e20e Skip reuseRefs test until we can debug
Bug: T360026
Change-Id: I21c642dac333e9a157c0ead32022de1fadc916bd
2024-03-13 13:52:37 +01:00
Translation updater bot 985337c108 Localisation updates from https://translatewiki.net.
Change-Id: Ie6bbca7c132abe9e507be38eae026a6c41ea376a
2024-03-13 08:25:16 +01:00
Jon Robson dcb513eb0e Move reference previews to Cite extension
The ext.cite.referencePreviews module will transparently replace the
ext.popups.referencePreviews module after this patch.  Configuration
stays in Popups for now, we can migrate it in later work.

CSS classes may be renamed in the future but this will be handled
separately since it could be a breaking change for on-wiki
customizations.

A lot of fancy footwork happens in this patch to emulate a soft
dependency on Popups.  This mechanism doesn't exist explicitly in
either ResourceLoader or QUnit, so lots of workarounds are used, to
conditionally load the module and to dynamically skip dependent tests.

renderer.test.js is fully skipped for now, but can be wired up in
later work.

Bug: T355194
Change-Id: I0dc47abb59a40d4e41e7dda0eb7b415a2e1ae508
2024-03-12 17:43:51 +01:00
thiemowmde fa77ef25bd Remove broken CSS for ve.ui.MWReferenceGroupInputWidget
This CSS exists since I2ab47e7 from August 2014. The original idea
was to dim the default "General references" when you edit a <ref> or
<references> list in VisualEditor.

Steps to reproduce:
* Start VisualEditor.
* Edit a <ref> or <references> list.
* Edit the group.
* You will see the dimmed text "General references". This is not the
  CSS in this patch, but the default styling for OOUI placeholders.
* Open the dropdown. The list will show a "General references" item.
  It's not dimmed. This is where the CSS was meant to be.

The CSS class name in the OOUI mixin was actually changed from
"oo-ui-flaggableElement-…" to "oo-ui-flaggedElement-…" via I1abecd8,
just a few days later.

In addition the selector wouldn't work anyway for other reasons.
The dropdown is not inside the `.ve-ui-mwReferenceGroupInputWidget`
container any more but placed outside by the OOUI window manager.
And the selector's specifity is to low, at least since Ic57b3ff.

I argue it's not worth fixing it. Nobody missed it for 10 years.
Light gray text would be illegible anyway on the light gray/light
blue backgrounds used in the dropdown menu. Let's consider it dead
code and just remove it.

The class name doesn't appear anywhere else (any more):
https://codesearch.wmcloud.org/search/?q=flaggableElement

Change-Id: Ia802303737ba35cd4b14fae924b7227472f905fd
2024-03-12 16:36:22 +01:00
thiemowmde ae786bc2ef Fix broken deletion of non-existing <ref refGroup="…">
This can be quite confusing:
* A node does have attributes. One of the attributes is called
  "refGroup", another one "mw".
* mw contains a JSON structure with just a few elements, most
  notably a "body" and an "attrs" element. These reflect what was
  originally written in the wikitext.
* mw.attrs reflects the original properties a.k.a. attributes from
  the <ref …> or <references …> tag.

Deleting mw.refGroup doesn't do anything because the attribute is
called <ref group="…"> in the wikitext, not <ref refGroup="…">.

You can actually see this bug in action on all wikis: Go to a page
that uses references in non-standard groups, e.g.
https://en.wikipedia.org/wiki/Historic_Cherokee_settlements
Start VisualEditor. Find e.g. the [notes 1] reference. Edit it
and change the group from "notes" to "General references". Click
"Publish…" and "Review" your changes. The visual diff works because
it apparently uses other information. The wikitext diff is empty.
This is also what's saved: nothing. The edit is lost.

Bug: T359943
Change-Id: I798605d2fd60a6b8f317ec85a4e4d08fd245e084
2024-03-12 14:44:00 +00:00
jenkins-bot 66d73af276 Merge "Clean up top-level docs" 2024-03-12 12:51:55 +00:00
jenkins-bot 24cd760b5a Merge "Create end to end test for reference re-use in VE" 2024-03-12 11:27:12 +00:00
Adam Wight ba137fba88 Clean up top-level docs
* Include the README in generated JS docs.
* Tweak stray top-level files to explain their role.  Note that the
wmf template forces these files to appear on the docs home page...

Bug: T358641
Change-Id: If421414340903991f50a06a76551bd7cd2904c5e
2024-03-12 12:23:18 +01:00