| XWIKI-23737 adds an inline button that appears above a text selection in the page content and opens the annotation creation form (pull request https://github.com/xwiki/xwiki-platform/pull/5457). It is not covered by any automated test: every existing annotation functional test opens the creation form through AnnotatableViewPage#beginAddAnnotation, which selects the text and presses the Ctrl+M shortcut, so none of them goes through the new button. The following behaviours should be covered by a functional test in xwiki-platform-annotation-test-docker:
- selecting text inside the page content shows the button, and selecting text outside of it does not;
- clicking the button opens the annotation creation form for the selected text;
- pressing Escape on the button closes it;
- the button does not show while the page is being edited in place.
The interactions should go through new page object methods in xwiki-platform-annotation-test-pageobjects, for example a beginAddAnnotationUsingButton(text) action in AnnotatableViewPage that waits for #annotation-popup.opened, so that the test itself holds no selector. One step of the existing AnnotationsIT#addEditReplyToAndDeleteAnnotations scenario could use it instead of the shortcut. |