Commit graph

20 commits

Author SHA1 Message Date
WMDE-Fisch 6b13325961 [Cypress] Add timeouts to the click retry helper
Just to be sure we do not try to click endlessly here.

Change-Id: I9d7fd5f1380a2ce38a93c61dc1a8e5280f626ec9
2024-03-28 14:25:15 +01:00
mareikeheuer aa21a831aa [Cypress] Unskip tests
Flaky parts have been fixed with the patches chained before. See
the stress test patch Ie32019ca65194e0ca94471d797b59b150d3334c4

Bug: T360026
Bug: T360361
Change-Id: I421a7718fcf77136a65bf8bd20f2c2fcd483fa3c
2024-03-27 16:18:17 +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
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
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
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
Adam Wight 551d80e20e Skip reuseRefs test until we can debug
Bug: T360026
Change-Id: I21c642dac333e9a157c0ead32022de1fadc916bd
2024-03-13 13:52:37 +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
mareikeheuer ce3e7b8eb8 Create end to end test for reference re-use in VE
Created following test cases:
Scenario: I am a user that wants to re-use refs in VisualEditor
-should display existing references in the Cite re-use dialog
- should display re-used reference in article with correct footnote number and notification in context dialog
- should display correct ref content and name attribute for re-used ref with existing name attribute
TODO:
- run several rechecks to observe flakiness issues
- add remaining test cases (copy paste & cut paste)

Bug: T356858
Change-Id: Ib1b64c44b21471404a7c51752fb5899119b4b533
2024-03-12 10:22:04 +01:00
mareikeheuer b411dc50a2 Write e2e test for Cite-VisualEditor integration in Cypress
Implemented the test case as described in the ticket.
Deviated from ticket's approach for creating a new page by manual creation instead of API,
to verify the end-to-end functionality through the interface & ensure the entire proccess works seamlessly.

Bug: T353439
Change-Id: I8f863ae0bd8fdb1fb0f1b103d98ba9f2306f3df2
2024-01-30 14:48:14 +01:00
Adam Wight 4a6b78ac0c Verify that the test page was created
Make sure that we're waiting for the page creation to finish, and
assert that the API request was successful.  This is mostly a
diagnostic improvement to help debug flaky tests.

Bug: T355602
Change-Id: I398cffa724e9b6d733df46676478cc98dccd884d
2024-01-30 09:46:53 +01:00
mareikeheuer 2fac0fca74 Cypress Improvements
General improvements
Ensure proper module loading in Cypress tests to prevent failures by waiting for specific modules to be loaded
Delete the selenium test suite.

Bug: T353436
Change-Id: Ieb71b122d3c6513f1a15d6574967e2bb9c21a393
2024-01-24 12:01:10 +01:00
mareikeheuer 0f801ea550 Port Cite web test suite to Cypress
Steps to implement:

 Copy over and adapt setup files, to install Cypress in the Cite code base.
 Port tests/selenium/specs/backlinks.js and supporting file cite.page.js to run under the Cypress environment, in a second patchset.
 Run the new suite in CI, replacing the previous selenium integration.
 Delete the selenium test suite.

Bug: T353436
Change-Id: Ie76371e18d8612daa7c7be741432c6f3e0b783b5
2024-01-17 11:45:04 +01:00