Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[JENKINS-65587] fix FreestyleJobTest#should_visit_build_with_permalink in latest cores #662

Merged
merged 1 commit into from
May 21, 2021

Conversation

jtnord
Copy link
Member

@jtnord jtnord commented May 20, 2021

https://issues.jenkins.io/browse/JENKINS-65587

Test failed in latest cores as the build status icon was no longer an image but an SVG.

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue


WebElement successIcon = build.find(By.xpath("//h1/img"));
assertThat(successIcon.getAttribute("tooltip"), is("Success"));
String expectedUrl = link.getAttribute("href");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about switching this to match the SVG's title but a quick attempt did not work (and it seems that the SVN has some asynchronous javascript associated with it to manipulate the DOM).

As the Build PageObject already has a permalink option (it does not use the permalink.click though) use that and as the page URL is hard coded check that the permalink link was actually reffering to this page (incase the Permalink regresses in the future)

@jglick jglick merged commit d149888 into jenkinsci:master May 21, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants