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

CopyPageIT#copyDoesNotCarryOverRightsTheUserCannotGrant is flickering

    XMLWordPrintable

Details

    • Unknown
    • org.xwiki.flamingo.test.docker.AllIT$NestedCopyPageIT#copyDoesNotCarryOverRightsTheUserCannotGrant

    Description

      The functional test org.xwiki.flamingo.test.docker.AllIT$NestedCopyPageIT#copyDoesNotCarryOverRightsTheUserCannotGrant fails intermittently on ci.xwiki.org.

      Occurrence

      Error

      org.openqa.selenium.JavascriptException: javascript error: Cannot read properties of undefined (reading 'runPartial')
      	at org.xwiki.test.ui.XWikiWebDriver.executeScript(XWikiWebDriver.java:814)
      	at org.xwiki.test.ui.po.BasePage.validateWCAG(BasePage.java:719)
      	at org.xwiki.test.ui.po.BasePage.validateWCAG(BasePage.java:694)
      	at org.xwiki.test.ui.po.BasePage.validateWCAG(BasePage.java:683)
      	at org.xwiki.test.ui.po.BasePage.<init>(BasePage.java:139)
      	at org.xwiki.test.ui.po.RefactoringStatusPage.<init>(RefactoringStatusPage.java:32)
      	at org.xwiki.test.ui.po.CopyOrRenameOrDeleteStatusPage.<init>(CopyOrRenameOrDeleteStatusPage.java:33)
      	at org.xwiki.test.ui.po.CopyPage.clickCopyButton(CopyPage.java:177)
      

      Analysis

      CopyPage#clickCopyButton() submits the form and immediately builds a CopyOrRenameOrDeleteStatusPage, without waiting for the page to be reloaded. The BasePage constructor then runs the WCAG validation (axe-core) while the browser is navigating, and axe.runPartial is called on a document where axe is no longer defined, hence Cannot read properties of undefined (reading 'runPartial'). The rights logic under test is not involved.

      This is the same failure and the same cause as XWIKI-20767, fixed in TemplatesAdministrationSectionPage by calling getDriver().addPageNotYetReloadedMarker() before the click and getDriver().waitUntilPageIsReloaded() after it.

      Possible fix

      Apply the XWIKI-20767 pattern in CopyPage#clickCopyButton(), which fixes every test using it.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: