-
Notifications
You must be signed in to change notification settings - Fork 90
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 #169 from trivago/visitor-architecture
Visitor architecture
- Loading branch information
Showing
66 changed files
with
1,128 additions
and
654 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
54 changes: 0 additions & 54 deletions
54
plugin-code/src/main/java/com/trivago/cluecumber/constants/ChartColor.java
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
plugin-code/src/main/java/com/trivago/cluecumber/constants/ChartType.java
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
plugin-code/src/main/java/com/trivago/cluecumber/constants/Charts.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,44 @@ | ||
package com.trivago.cluecumber.constants; | ||
|
||
public class Charts { | ||
|
||
public enum Type {bar, pie} | ||
|
||
/** | ||
* This enum manages the colors for the overview and detail charts that correspond to the passed in {@link Status} value. | ||
*/ | ||
public enum Color { | ||
PASSED(40, 167, 69), FAILED(220, 53, 69), SKIPPED(255, 193, 7); | ||
|
||
private static final String COLOR_FORMAT = "rgba(%d, %d, %d, 1.000)"; | ||
|
||
private final int r; | ||
private final int g; | ||
private final int b; | ||
|
||
Color(final int r, final int g, final int b) { | ||
this.r = r; | ||
this.g = g; | ||
this.b = b; | ||
} | ||
|
||
/** | ||
* Get the corresponding chart color string for the passed {@link Status}. | ||
* | ||
* @param status the {@link Status}. | ||
* @return the matching color string. | ||
*/ | ||
public static String getChartColorStringByStatus(Status status) { | ||
switch (status) { | ||
case FAILED: | ||
return String.format(COLOR_FORMAT, FAILED.r, FAILED.g, FAILED.b); | ||
case SKIPPED: | ||
return String.format(COLOR_FORMAT, SKIPPED.r, SKIPPED.g, SKIPPED.b); | ||
case PASSED: | ||
default: | ||
return String.format(COLOR_FORMAT, PASSED.r, PASSED.g, PASSED.b); | ||
} | ||
} | ||
|
||
} | ||
} |
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
plugin-code/src/main/java/com/trivago/cluecumber/json/pojo/DocString.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
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
Oops, something went wrong.