Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25793

Functional tests missing for the inline annotate button

    XMLWordPrintable

Details

    • Unknown

    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.

      Attachments

        Issue Links

          Activity

            People

              Lucas C Charpentier Lucas
              Lucas C Charpentier Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: