When an HTML content area contains invalid HTML, some editors will clean
and validate the content upon submission.
In this case the content was:
<b>Test content</b>
But this should be wrapped in some form of container which accepts
phrasing content (such as a <p> tag).
Some editors, such as TinyMCE, will normalise the content and add the
wrapping paragraph tags to it.
Furthermore, the bold tag is purely stylistic and does not have semantic
meaning. As a result, the <strong> tag is favoured and some editors,
again such as TinyMCE, will replace bold tags with strong tags.
We should update the content here to be valid HTML (wrap the bold tag
in a para), and use a strong tag rather than bold. This allows this test
to pass both with Atto, and other stricter editors such as TinyMCE 6.
These steps are currently using Atto-specific UI features and must
therefore make use of the @editor_atto tag to ensure that they continue
to run using Atto.
A new issue will be raised to migrate each of these to be
editor-agnostic.
When the template editor is configured to use the HTML Editor, it should
indicate this to Behat by setting the `data-fieldtype` to "editor".
This indicates to the behat field manager that the editor is in use,
which ensures that the correct value setting can take place.
This is important in the context of MDL-75887.
When an editor is used in a form as part of a group, it is missing its
label element.
This happens because there is no inline template for the editor, and
therefore it reverts to using the old `toHtml` function. The legacy
function does not cater to the editor being in a group, and therefore
does not add the hidden label.
In addition, the hiddenLabel attribute was missing from the editor
element. This is a semi-standard element but must be added to each
supporting element.
Both the missing inline template for the editor, and the hidden label
attribute must be present:
- If the hidden label attribute is not present, then the standard inline
template will add a visible label within the group.
- If the inline editor template is missing, then the label is not shown
at all.
In MDL-75146, the get_fields_record() method was added without any
ordering criteria.
In MDL-75276, this method is reused to get the fields. We need to
re-add the order to guarantee the field are always returned in the
same order (and avoid some Oracle ordering failures).
This change, which should be easy to mimic for other editors.
This will ensure that the correct editor is used for tests relating to
that editor, or its subplugins.