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

WikiEditIT#allowForceSaveWhenCSRFIssue is flickering

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A
    • org.xwiki.flamingo.test.docker.AllIT$NestedEditIT#allowForceSaveWhenCSRFIssue

    Description

      AllIT$NestedEditIT#allowForceSaveWhenCSRFIssue (class WikiEditIT in xwiki-platform-flamingo-skin-test-docker) failed once in the last 10 builds of the stable-18.4.x branch.

      Where: https://ci.xwiki.org/job/XWiki%20Environment%20Tests/job/xwiki-platform/job/stable-18.4.x/172/ (MySQL latest, Tomcat 11-jdk25, Filesystem, Chrome). The other environment and the other recent builds passed.

      Error:

      org.openqa.selenium.WebDriverException:
      unknown error: unhandled inspector error: {"code":-32000,"message":"Node with given id does not belong to the document"}
      Command: [..., getElementAttribute {name=data-xwiki-page-ready, ...}]
      	at org.xwiki.test.ui.XWikiWebDriver.waitUntilElementHasAttributeValue(XWikiWebDriver.java:484)
      	at org.xwiki.test.ui.po.BaseElement.waitUntilPageIsReady(BaseElement.java:155)
      	at org.xwiki.test.ui.po.BasePage.<init>(BasePage.java:145)
      	at org.xwiki.test.ui.po.ViewPage.<init>(ViewPage.java:43)
      	at org.xwiki.flamingo.test.docker.WikiEditIT.allowForceSaveWhenCSRFIssue(WikiEditIT.java:384)
      

      Likely cause: after clickSaveAndView(false) and clickForceSaveCSRFButton(), the test immediately creates a ViewPage. Its constructor waits for data-xwiki-page-ready on the html element, but that element can still belong to the edit page that is being unloaded. Chrome then rejects the attribute read because the node is no longer part of the current document. The test needs to wait for the navigation to the view page to happen before building the ViewPage.

      An older flicker of the same test was fixed in XWIKI-19905.

      Attachments

        Issue Links

          Activity

            People

              mleduc Manuel Leduc
              mleduc Manuel Leduc
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: