mediawiki-extensions-Visual.../modules/ve-mw/tests/dm
Máté Szabó ff4f382322 Use autogenerated parameter info for templates without TemplateData
When a template does not have user-provided TemplateData documentation,
the TemplateData API falls back to extracting possible parameters from the raw wikitext
to generate an API response with a list of potential parameters. However, it also
sets the "notemplatedata" field in the response, causing the VisualEditor to think
the response contains no useful information and ignore it. This appears to have been
an unintended side-effect of I97a1bfc9f9ead082a673a91b9d2053630a90309c.

This patch ensures that the VisualEditor will correctly consider such responses from
TemplateData by modifying ve.dm.MWTransclusionModel to check if the response contains
a parameter map. Some unit tests were added for the class to verify this behavior.

Bug: T243868
Change-Id: I72005880d9301a53224473900efe2917379e8708
2020-01-31 13:43:56 +01:00
..
nodes doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.dm.Converter.test.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.dm.Document.test.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.dm.mwExample.js Merge "Add handling for mw:DisplaySpace" 2020-01-08 22:26:08 +00:00
ve.dm.MWImageModel.test.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.dm.MWInternalLinkAnnotation.test.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.dm.MWTransclusionModel.test.js Use autogenerated parameter info for templates without TemplateData 2020-01-31 13:43:56 +01:00
ve.dm.SurfaceFragment.test.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00