-
Task
-
Resolution: Unresolved
-
Minor
-
None
From JENKINS-42581:
Multibranch pipelines have the option to trigger a re-index and scan again all the branches in the repository.
While testing the Bitbucket Server Jenkins integration plugin with a Multibranch Pipeline job, when trying to trigger a re-index of branches (from Bitbucket Server SCM) via the WorkflowMultiBranchJob page object, we get a NoSuchElementException because the text() searches currently in the xpaths can't find the re-index link.
Testing with Jenkins 2.190.1 (run using the jut-server.sh script), the xpath that works in our tests is:
//div[@class="task"]//*[text()="Scan Multibranch Pipeline Now"]
- relates to
-
JENKINS-42581 Introduce reIndex for Multibranch Pipelines
-
- Resolved
-
It seems like the current page object was designed for the (now deprecated) multi-branch-project-plugin, but atlassian-bitbucket-server-integration-plugin has a dependency on workflow-multibranch-plugin, which displays a different text() for the re-index link.
Instead of just appending the xpath in the current page object to cater for the new plugin, it may be a good idea to instead mark the current WorkflowMultiBranchJob page object as @Deprecated (with a note in the Javadoc) and create a fresh page object for the new plugin.