Page MenuHomePhabricator

Create a basic end to end test for adding a reference in VisualEditor using templates
Closed, ResolvedPublic

Description

Cite allows adding specific kinds of references in a structured way using templates. Let's add some simple tests to make sure that the usage of templates with VisualEditor does not break.

Cases to test:

Scenario: I'm an user that want's to add references in the VisualEditor that has a setup with a base template for websites.

 Given I edit an article.
 And I open the menu to add a reference.
 And I add a reference using a template.
 And I fill out the template dialog for that template.
 Then there should be a reference using the template added to the surface.

 Given I edit an article with a reference using a template.
 And I click that reference to edit it.
 Then the template dialog opens with the values of the template.

Implementation details:

  • We need to setup at least one template that should be available in the Citation menu. So MediaWiki:Cite-tool-definition.json needs to be created with e.g.
{
	"name": "Website",
	"icon": "ref-cite-web",
	"template": "Cite web"
}
  • We won't use template data because we only want to test the fact, that the insertion of the template works.
  • For that reason we will just add/expect unnamed parameters in the template dialog
  • We also won't/don't need to test that templates transclude the content to the ref

Notes:
We should also change the docker dev configuration, so that the template setting mentioned above is part of the Cite module. - So it can move from the Citoid module to the Cite module.

Event Timeline

WMDE-Fisch renamed this task from Create a basic end to end test for adding a reference in VisualEditor using Citoid to Create a basic end to end test for adding a reference in VisualEditor using templates.Mar 6 2024, 10:22 AM
WMDE-Fisch removed a project: Citoid.
WMDE-Fisch updated the task description. (Show Details)

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

[mediawiki/extensions/Cite@master] Cypress: Create a basic end to end test for adding a reference in VisualEditor using templates

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

Change #1016336 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] [DNM] Add …-toolbar-open class after toolbarSetupDeferred resolved

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

Change #1016336 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] [DNM] Add …-toolbar-open class after toolbarSetupDeferred resolved

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

Change #1012341 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Cypress test for adding a reference in VisualEditor using templates

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

WMDE-Fisch claimed this task.