Skip to content

Commit d381c04

Browse files
committed
fixes #267
1 parent 95caba9 commit d381c04

File tree

8 files changed

+18
-20
lines changed

8 files changed

+18
-20
lines changed

src/main/resources/com/aventstack/extentreports/offline/spark/css/spark-style.css

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/com/aventstack/extentreports/templates/spark/macros/recurse_nodes.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</div>
2828
</div>
2929
</#if>
30-
<#if test.hasChildren()>
30+
<#if node.hasChildren()>
3131
<@recurse_nodes test=node />
3232
</#if>
3333
</div>

src/main/resources/com/aventstack/extentreports/templates/spark/partials/bdd-content.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</#if>
2424
</div>
2525
</div>
26-
<#if test.hasChildren()>
26+
<#if node.hasChildren()>
2727
<#if node.bddType?? && node.bddType.simpleName=="ScenarioOutline">
2828
<div class="scenario_outline <#if node.status.toLower()=='pass'>collapse</#if>">
2929
<#list node.children as child>

src/test/java/com/aventstack/extentreports/config/external/JsonConfigLoaderTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ public void jsonConfigTest() throws FileNotFoundException {
2222
loader.apply();
2323
Assert.assertEquals(conf.getCss(), "css1");
2424
Assert.assertEquals(conf.getDocumentTitle(), "Test1");
25-
Assert.assertEquals(conf.getEncoding(), "utf-16");
25+
Assert.assertEquals(conf.getEncoding(), "utf-8");
2626
Assert.assertEquals(conf.getReportName(), "Test2");
2727
Assert.assertEquals(conf.getTimeStampFormat(), "MMM dd, yyyy HH:mm:ss a");
2828
Assert.assertEquals(conf.getOfflineMode().booleanValue(), true);
2929
Assert.assertEquals(conf.getProtocol(), Protocol.HTTP);
30-
Assert.assertEquals(conf.getTheme(), Theme.DARK);
30+
Assert.assertEquals(conf.getTheme(), Theme.STANDARD);
3131
}
3232

3333
@Test

src/test/java/com/aventstack/extentreports/config/external/XmlConfigLoaderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void xmlConfigTest() throws FileNotFoundException {
2121
new File(XML_FILE));
2222
loader.apply();
2323
Assert.assertEquals(conf.getCss(), "css1");
24-
Assert.assertEquals(conf.getDocumentTitle(), "Test1");
24+
Assert.assertEquals(conf.getDocumentTitle(), "Build 1");
2525
Assert.assertEquals(conf.getEncoding(), "utf-16");
2626
Assert.assertEquals(conf.getReportName(), "Test2");
2727
Assert.assertEquals(conf.getTimeStampFormat(), "MMM dd, yyyy HH:mm:ss a");

src/test/java/com/aventstack/extentreports/reporter/SparkReporterConfigTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public void configTest() {
2525
@Test
2626
public void loadJSONConfigFileTest() throws IOException {
2727
ExtentSparkReporter spark = new ExtentSparkReporter("target/spark.html");
28-
spark.loadJSONConfig(new File("config/spark-config.json"));
28+
spark.loadJSONConfig(new File("src/test/resources/config/spark-config.json"));
2929
Assert.assertEquals(spark.getConf().getTheme(), Theme.STANDARD);
30-
Assert.assertEquals(spark.getConf().getDocumentTitle(), "ExtentReports");
30+
Assert.assertEquals(spark.getConf().getDocumentTitle(), "Test1");
3131
Assert.assertEquals(spark.getConf().getEncoding(), "utf-8");
3232
}
3333

@@ -44,18 +44,18 @@ public void loadJSONConfigStringTest() throws IOException {
4444
@Test
4545
public void loadXMLConfigFileTest() throws IOException {
4646
ExtentSparkReporter spark = new ExtentSparkReporter("target/spark.html");
47-
spark.loadXMLConfig(new File("config/spark-config.xml"));
48-
Assert.assertEquals(spark.getConf().getReportName(), "Build 1");
49-
Assert.assertEquals(spark.getConf().getDocumentTitle(), "Extent Framework");
50-
Assert.assertEquals(spark.getConf().getEncoding(), "UTF-8");
47+
spark.loadXMLConfig(new File("src/test/resources/config/spark-config.xml"));
48+
Assert.assertEquals(spark.getConf().getReportName(), "Test2");
49+
Assert.assertEquals(spark.getConf().getDocumentTitle(), "Build 1");
50+
Assert.assertEquals(spark.getConf().getEncoding(), "utf-16");
5151
}
5252

5353
@Test
5454
public void loadXMLConfigPathTest() throws IOException {
5555
ExtentSparkReporter spark = new ExtentSparkReporter("target/spark.html");
56-
spark.loadXMLConfig("config/spark-config.xml");
57-
Assert.assertEquals(spark.getConf().getReportName(), "Build 1");
58-
Assert.assertEquals(spark.getConf().getDocumentTitle(), "Extent Framework");
59-
Assert.assertEquals(spark.getConf().getEncoding(), "UTF-8");
56+
spark.loadXMLConfig("src/test/resources/config/spark-config.xml");
57+
Assert.assertEquals(spark.getConf().getReportName(), "Test2");
58+
Assert.assertEquals(spark.getConf().getDocumentTitle(), "Build 1");
59+
Assert.assertEquals(spark.getConf().getEncoding(), "utf-16");
6060
}
6161
}

src/test/resources/config/spark-config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"theme": "DARK",
3-
"encoding": "utf-16",
2+
"theme": "standard",
3+
"encoding": "utf-8",
44
"protocol": "HTTP",
55
"timelineEnabled": true,
66
"offlineMode": true,

src/test/resources/config/spark-config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<offlineMode>true</offlineMode>
2323

2424
<!-- title of the document -->
25-
<documentTitle>Test1</documentTitle>
25+
<documentTitle>Build 1</documentTitle>
2626

2727
<!-- report name - displayed at top-nav -->
2828
<reportName>Test2</reportName>

0 commit comments

Comments
 (0)