-
Notifications
You must be signed in to change notification settings - Fork 277
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 #1119 from jenkinsci/info-messaages
Use new messages dialog and improve associated icon link
- Loading branch information
Showing
9 changed files
with
59 additions
and
28 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
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: 2 additions & 0 deletions
2
...src/main/resources/io/jenkins/plugins/analysis/core/model/ResultAction/summary.properties
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,2 @@ | ||
icon.error.tooltip=Some errors have been logged during recording, click to see these errors in a details view. | ||
icon.info.tooltip=Click to see all logging messages during recording. |
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
33 changes: 33 additions & 0 deletions
33
plugin/src/test/java/io/jenkins/plugins/analysis/core/model/InfoErrorDetailTest.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,33 @@ | ||
package io.jenkins.plugins.analysis.core.model; | ||
|
||
import org.eclipse.collections.api.list.ImmutableList; | ||
import org.eclipse.collections.impl.factory.Lists; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import hudson.model.Run; | ||
|
||
import static org.assertj.core.api.Assertions.*; | ||
import static org.mockito.Mockito.*; | ||
|
||
/** | ||
* Tests the class {@link InfoErrorDetail}. | ||
* | ||
* @author Ullrich Hafner | ||
*/ | ||
class InfoErrorDetailTest { | ||
private static final String TITLE = "Title"; | ||
private static final String DISPLAY_NAME = TITLE + " - Messages"; | ||
private static final ImmutableList<String> INFO_MESSAGES = Lists.immutable.of("One", "Two"); | ||
private static final ImmutableList<String> ERROR_MESSAGES = Lists.immutable.of("Error One", "Error Two"); | ||
|
||
@Test | ||
void shouldCreateMessagesAndErrors() { | ||
Run<?, ?> build = mock(Run.class); | ||
InfoErrorDetail model = new InfoErrorDetail(build, ERROR_MESSAGES, INFO_MESSAGES, TITLE); | ||
|
||
assertThat(model.getDisplayName()).isEqualTo(DISPLAY_NAME); | ||
assertThat(model.getOwner()).isSameAs(build); | ||
assertThat(model.getInfoMessages()).containsExactlyElementsOf(INFO_MESSAGES); | ||
assertThat(model.getErrorMessages()).containsExactlyElementsOf(ERROR_MESSAGES); | ||
} | ||
} |
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