Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-63044

Update xpath of reIndex link for Multibranch Pipelines

    Details

    • Similar Issues:

      Description

      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"]

        Attachments

          Issue Links

            Activity

            Hide
            alibkord Ali Kord added a comment - - edited

            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.

            Show
            alibkord Ali Kord added a comment - - edited 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.

              People

              • Assignee:
                Unassigned
                Reporter:
                alibkord Ali Kord
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: