File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
core/src/main/java/org/jsmart/zerocode/core Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -21,4 +21,7 @@ public interface ZeroCodeReportConstants {
2121 String ZEROCODE_JUNIT = "zerocode.junit" ;
2222 String CHARTS_AND_CSV = "gen-smart-charts-csv-reports" ;
2323
24+ // Custom js and css for extent report
25+ String EXTENT_ADDITIONAL_JS = "document.write('<div id=\" theme-selector\" onClick=$(\" body\" ).toggleClass(\" dark\" )><span><i class=\" fa fa-desktop\" ></i></span></div>')" ;
26+ String EXTENT_ADDITIONAL_CSS = "#theme-selector{cursor:pointer;position:fixed;bottom:10px;left:25px;z-index:9999;}" ;
2427}
Original file line number Diff line number Diff line change 88import java .util .Properties ;
99import java .util .Set ;
1010
11+ import static org .jsmart .zerocode .core .constants .ZeroCodeReportConstants .EXTENT_ADDITIONAL_CSS ;
12+ import static org .jsmart .zerocode .core .constants .ZeroCodeReportConstants .EXTENT_ADDITIONAL_JS ;
1113import static org .jsmart .zerocode .core .constants .ZeroCodeReportConstants .REPORT_DISPLAY_NAME_DEFAULT ;
1214import static org .jsmart .zerocode .core .constants .ZeroCodeReportConstants .REPORT_TITLE_DEFAULT ;
1315import static org .slf4j .LoggerFactory .getLogger ;
@@ -56,7 +58,8 @@ public static void attachSystemInfo() {
5658 public static ExtentSparkReporter createExtentHtmlReporter (String reportFileName ) {
5759 extentSparkReporter = new ExtentSparkReporter (reportFileName );
5860
59-
61+ extentSparkReporter .config ().setJs (EXTENT_ADDITIONAL_JS );
62+ extentSparkReporter .config ().setCss (EXTENT_ADDITIONAL_CSS );
6063 extentSparkReporter .config ().setDocumentTitle (REPORT_TITLE_DEFAULT );
6164 extentSparkReporter .config ().setReportName (REPORT_DISPLAY_NAME_DEFAULT );
6265
You can’t perform that action at this time.
0 commit comments