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.