There are 2 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-0c6fdb39-a6a8-44e3-ad53-d41409be63c9 XWIKI-25147 Reopened

Add automated test for "Homepage Tour"

 
View issue   ยท   Add comment
 

2 updates

 
cid:jira-generated-image-avatar-4af999b7-d8c3-4a01-945d-1a3f3fd599b2 Changes by Vincent Massol on 13/Oct/26 10:00
 
Resolution: Fixed
Status: Closed Reopened
 
 

1 comment

 
cid:jira-generated-image-avatar-4af999b7-d8c3-4a01-945d-1a3f3fd599b2 Vincent Massol on 13/Oct/26 10:00
 

Reopening: with the previous fix (the "settled position" wait), HomepageTourIT#homepageTour still failed in the first Environment Tests run of each branch, each time on one Chrome environment only (the other 3 environments and all main builds passed):

  • stable-17.10.x Environment Tests 318, PostgreSQL: timeout in PageWithTour#previousStep() on the "Header" step.
  • stable-18.4.x Environment Tests 153, MySQL: timeout in PageWithTour#previousStep() on the "Header" step.
  • master Environment Tests 1402, PostgreSQL: timeout in PageWithTour#nextStep() on the "Page Menu" step.

The CI videos show the step popover shown and stable with the navbar at the top, then the page jumping down (~110px, to its max scroll), the popover fading out and being re-shown at the viewport top, and the tour staying on that step until the timeout.

Root cause: XWikiWebDriver#findElement() always calls scrollIntoView() on the element it finds. Looking up the "Prev"/"Next" button (or the step title/id) scrolls the page, bootstrap-tour's debounced window scroll listener then re-positions the popover, and the click lands on the tour backdrop instead of the button. The previous JavaScript "settled" wait could not see this, since the scroll is triggered by the lookup done after the wait.

Fix: PageWithTour looks up all the popover elements with findElementWithoutScrolling() / hasElementWithoutWaitingWithoutScrolling(), and clickStepButton() no longer uses JavaScript: it waits (WebDriver APIs only) until the shown popover (.tour.in) has an opacity of 1 and clicks the button inside it, retrying on StaleElementReferenceException. Passed locally in Docker on Firefox (1 run) and Chrome (2 runs).

PRs: