Page MenuHomePhabricator

Create a first set of end to end test for reference re-use in VE
Closed, ResolvedPublic

Description

To make sure current improvements to the Cite VisualEditor code don't break the current use-cases it would be helpful to add some end to end test to validate they are still working.

Cases to test:

Scenario: I'm an user that want's to re-use references in the VisualEditor.

 Given I edit an article with existing references in the wikitext.
 And I open the re-use dialog.
 Then can see the existing references in the dialog.

 Given use the re-use dialog to re-use an existing reference from the article.
 And I click on one of the references to re-use.
 The the reference will be added another time to the article.
 And the reference shows the same footnote number.
 And the context dialog on one of the references shows it's being used twice.

 Given I edit an article and I re-used one of the existing references using the re-use dialog.
 When I save the page.
 Then the wikitext should reflect the re-use correctly.
 And the references re-used should have the same name attribute.

 PLACEHOLDER: Re-use from references defined in the `references` tag.

 PLACEHOLDER: Re-use from references with an existing name attribute.

Event Timeline

My patches caused a regression last week, in the integration with Citoid. I realize now that we need to include Citoid workflows in our tests, perhaps in follow-up work.

Change 1006483 had a related patch set uploaded (by Mareike Heuer; author: Mareike Heuer):

[mediawiki/extensions/Cite@master] Create end to end test for reference re-use in VE

https://gerrit.wikimedia.org/r/1006483

WMDE-Fisch renamed this task from Create end to end test for reference re-use in VE to Create a first set of end to end test for reference re-use in VE.Feb 28 2024, 10:46 AM

Note that there are existing selenium-webdriver test in VE-MW (in tests/selenium and build/screenshots.js), and some existing infrastructure (the wdio-mediawiki package). If there are good reasons to use another platform (the patch above uses cypress), then the case for that should be documented and a plan made to make sure all VE browser tests use the same technology, where possible, to reduce maintenance burden.

Note that there are existing selenium-webdriver test in VE-MW (in tests/selenium and build/screenshots.js), and some existing infrastructure (the wdio-mediawiki package). If there are good reasons to use another platform (the patch above uses cypress), then the case for that should be documented and a plan made to make sure all VE browser tests use the same technology, where possible, to reduce maintenance burden.

Thanks for the hint. I agree that we should not mix approaches in one extension. The tests will be part of Cite that currently only has Cypress tests, but there's defenitly some cleanup potential. I'll create a separate task for that.

Change 1006483 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Create end to end test for reference re-use in VE

https://gerrit.wikimedia.org/r/1006483

More failures: https://integration.wikimedia.org/ci/job/wmf-quibble-selenium-php74-docker/87887/console. That's not good. Should we create a new ticket for this or is it ok to consider this one at least partially unfinished?

thiemowmde moved this task from Incoming to Done on the WMDE-References-FocusArea board.

Whoops., sorry, T360026 already exists.