(Followup to the bug found in https://phabricator.wikimedia.org/T203052#4564464)
We have a focus method by which we try to set the focus initially, and later when fields are added/removed based on either the first available field or the 'add/remove all' button.
The problem, is that the add/remove button can be missing if the template has no fields or if all fields are mandatory.
In that case, we have nothing to focus on, and the focus method should bail.
To test this:
- Try to load an empty template into TemplateWizard
Example TemplateData:
<templatedata>
{
"params": {},
"description": "An empty template without parameters"
}
</templatedata>Expected: No crash :)