This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-c2e607a5-8aec-4d57-9235-991884ed7bac XWIKI-25793 Open

Functional tests missing for the inline annotate button

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-b285e1c4-d1ea-4e21-b7e2-4c55ef45cf0c Charpentier Lucas created this issue on 18/Nov/26 10:05
 
Summary: Functional tests missing for the inline annotate button
Issue Type: cid:jira-generated-image-avatar-c2e607a5-8aec-4d57-9235-991884ed7bac Task
Affects Versions: 17.10.0
Assignee: Unassigned
Components: Development Issues only
Created: 18/Nov/26 10:05
Labels: testneeded
Priority: cid:jira-generated-image-static-major-f17dbb44-3faa-4077-986f-a6036b5d10c9 Major
Reporter: Charpentier Lucas
Description:

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.