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).