-
Notifications
You must be signed in to change notification settings - Fork 346
Adjust for experimental Run UI #755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
138145d
Adjust for experimental Run UI
janfaracik aa59aec
Fix card
janfaracik 03e262a
Update widget.jelly
janfaracik 4d351e4
Merge branch 'master' into adjust-for-new-run-ui
janfaracik fe5cae5
Update pom.xml
timja c4041e8
Fix detail bar spacing
janfaracik 33263e5
Refine content
janfaracik 97530cf
Improve card + i18n
janfaracik 1794260
Update Widget.java
janfaracik 07a0a2d
Add run sub page for individual tests
janfaracik d13e644
Update history to align with run subpage
janfaracik 08b26f1
I18n last string
janfaracik 6174bda
Fix sidepanel link
janfaracik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,69 @@ | ||
| package hudson.tasks.junit; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
|
|
||
| public class Widget { | ||
|
|
||
| private final String symbol; | ||
| private final String symbolClass; | ||
| private final List<String> lines = new ArrayList<>(); | ||
|
|
||
| public Widget(TestResult result) { | ||
| int failCount = result.getFailCount(); | ||
| boolean isFailed = failCount > 0; | ||
| int totalCount = result.getTotalCount(); | ||
|
|
||
| this.symbol = isFailed | ||
| ? "symbol-close-circle-outline plugin-ionicons-api" | ||
| : "symbol-checkmark-done-outline plugin-ionicons-api"; | ||
| this.symbolClass = isFailed ? "jenkins-!-error-color" : "jenkins-!-success-color"; | ||
|
|
||
| List<String> counts = new ArrayList<>(); | ||
|
|
||
| if (isFailed) { | ||
| lines.add(Messages.Widget_Failed(failCount)); | ||
| counts.add(Messages.Widget_Passed(result.getPassCount())); | ||
|
|
||
| long regressions = result.getSuites().stream() | ||
| .flatMap(e -> e.getCases().stream()) | ||
| .filter(e -> { | ||
| var previousResult = e.getPreviousResult(); | ||
| if (previousResult == null) { | ||
| return false; | ||
| } | ||
| return e.isPassed(); | ||
| }) | ||
| .count(); | ||
|
|
||
| if (regressions > 0) { | ||
| lines.add(Messages.Widget_Regression(regressions)); | ||
| } | ||
|
|
||
| } else { | ||
| lines.add(Messages.Widget_AllTestsPassing()); | ||
| } | ||
|
|
||
| if (result.getSkipCount() > 0) { | ||
| counts.add(Messages.Widget_Skipped(result.getSkipCount())); | ||
| } | ||
|
|
||
| counts.add(Messages.Widget_Total(totalCount)); | ||
|
|
||
| lines.add(String.join(", ", counts)); | ||
|
|
||
| lines.add(Messages.Widget_Took(result.getDurationString())); | ||
| } | ||
|
|
||
| public String getSymbol() { | ||
| return symbol; | ||
| } | ||
|
|
||
| public String getSymbolClass() { | ||
| return symbolClass; | ||
| } | ||
|
|
||
| public List<String> getLines() { | ||
| return lines; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.