-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #488 from jenkinsci/dependabot/maven/org.jenkins-c…
…i.main-jenkins-core-2.354 Bump jenkins-core from 2.338 to 2.354
- Loading branch information
Showing
13 changed files
with
182 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
ui-tests/etc/assertj-templates/assertions_entry_point_class_template.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package ${package}; | ||
|
||
/** | ||
* Entry point for assertions of different data types. Each method in this class is a static factory for the | ||
* type-specific assertion objects. | ||
*/ | ||
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("NM") | ||
@javax.annotation.Generated(value="assertj-assertions-generator") | ||
public class Assertions extends org.assertj.core.api.Assertions { | ||
${all_assertions_entry_points} | ||
/** | ||
* Creates a new <code>{@link Assertions}</code>. | ||
*/ | ||
protected Assertions() { | ||
// empty | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
/** | ||
* Verifies that the actual ${class_to_assert}'s ${property} is equal to the given one. | ||
* @param ${property_safe} the given ${property} to compare the actual ${class_to_assert}'s ${property} to. | ||
* @return this assertion object. | ||
* @throws AssertionError - if the actual ${class_to_assert}'s ${property} is not equal to the given one.${throws_javadoc} | ||
*/ | ||
public ${self_type} has${Property}(${propertyType} ${property_safe}) ${throws}{ | ||
// check that actual ${class_to_assert} we want to make assertions on is not null. | ||
isNotNull(); | ||
|
||
// overrides the default error message with a more explicit one | ||
String assertjErrorMessage = "\nExpecting ${property} of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>"; | ||
|
||
// null safe check | ||
${propertyType} actual${Property} = actual.${getter}(); | ||
if (!java.util.Objects.deepEquals(actual${Property}, ${property_safe})) { | ||
failWithMessage(assertjErrorMessage, actual, ${property_safe}, actual${Property}); | ||
} | ||
|
||
// return the current assertion for method chaining | ||
return ${myself}; | ||
} |
10 changes: 10 additions & 0 deletions
10
ui-tests/etc/assertj-templates/soft_assertions_entry_point_class_template.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package ${package}; | ||
|
||
/** | ||
* Entry point for soft assertions of different data types. | ||
*/ | ||
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("NM") | ||
@javax.annotation.Generated(value="assertj-assertions-generator") | ||
public class SoftAssertions extends org.assertj.core.api.AutoCloseableSoftAssertions { | ||
${all_assertions_entry_points} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nkins/plugins/forensics/DetailsTable.java → ...s/plugins/forensics/git/DetailsTable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...plugins/forensics/ForensicsPublisher.java → ...ins/forensics/git/ForensicsPublisher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nkins/plugins/forensics/ScmForensics.java → ...s/plugins/forensics/git/ScmForensics.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package io.jenkins.plugins.forensics; | ||
package io.jenkins.plugins.forensics.git; | ||
|
||
import java.net.URL; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...nkins/plugins/forensics/ScrollerUtil.java → ...s/plugins/forensics/git/ScrollerUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
ui-tests/src/main/java/io/jenkins/plugins/forensics/git/Summary.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
package io.jenkins.plugins.forensics.git; | ||
|
||
import java.util.List; | ||
import java.util.regex.Pattern; | ||
import java.util.stream.Collectors; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.WebElement; | ||
|
||
import org.jenkinsci.test.acceptance.po.Build; | ||
import org.jenkinsci.test.acceptance.po.PageObject; | ||
|
||
/** | ||
* {@link PageObject} representing the analysis summary on the build page of a job. | ||
* | ||
* @author Ullrich Hafner | ||
* @author Manuel Hampp | ||
* @author Michaela Reitschuster | ||
* @author Alexandra Wenzel | ||
*/ | ||
public class Summary extends PageObject { | ||
private static final Pattern REMOVE_DETAILS = Pattern.compile("(\\r?\\n|\\r).*"); | ||
|
||
private final WebElement summarySpan; | ||
private final String title; | ||
private final List<String> details; | ||
|
||
/** | ||
* Creates a new page object representing the analysis summary on the build page of a job. | ||
* | ||
* @param parent | ||
* a finished build configured with a static analysis tool | ||
* @param id | ||
* the type of the result page (e.g. simian, checkstyle, cpd, etc.) | ||
*/ | ||
public Summary(final Build parent, final String id) { | ||
super(parent, parent.url(id)); | ||
|
||
summarySpan = getElement(By.id(id)); | ||
title = REMOVE_DETAILS.matcher(summarySpan.getText()).replaceAll(""); | ||
details = summarySpan.findElements(by.xpath("ul/li")).stream() | ||
.map(WebElement::getText) | ||
.map(StringUtils::normalizeSpace) | ||
.collect(Collectors.toList()); | ||
} | ||
|
||
/** | ||
* Return the title of the summary as text. | ||
* | ||
* @return the title text | ||
*/ | ||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
/** | ||
* Returns the texts of the detail elements of the summary. | ||
* | ||
* @return the details | ||
*/ | ||
public List<String> getDetails() { | ||
return details; | ||
} | ||
|
||
/** | ||
* Opens a link given by the specified text. | ||
* | ||
* @param text | ||
* the text of the link | ||
* | ||
* @return the URL of the page that has been opened by the link | ||
*/ | ||
public String openLinkByText(final String text) { | ||
summarySpan.findElement(By.linkText(text)).click(); | ||
|
||
return driver.getCurrentUrl(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters