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
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
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
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
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
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
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
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
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
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