Skip to content

Commit

Permalink
fix: bump to lsd-core 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmcdowall committed Apr 10, 2023
1 parent 00306e8 commit e0b67be
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 39 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ repositories {
}

dependencies {
api 'io.github.lsd-consulting:lsd-core:3.2.6'
api 'io.github.lsd-consulting:lsd-core:3.4.0'
implementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
implementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
implementation 'com.j2html:j2html:1.5.0'
implementation 'io.cucumber:cucumber-plugin:7.2.3'

testImplementation 'org.assertj:assertj-core:3.22.0'
testImplementation 'com.approvaltests:approvaltests:14.0.0'
testImplementation 'com.approvaltests:approvaltests:18.6.0'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation 'io.cucumber:cucumber-java8:7.2.3'
testImplementation 'io.cucumber:cucumber-junit-platform-engine:7.2.3'
Expand Down
2 changes: 1 addition & 1 deletion lsdReportVerification.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ dependencies {
lsdReportVerificationImplementation 'org.assertj:assertj-core:3.21.0'
lsdReportVerificationImplementation 'org.mockito:mockito-all:1.10.19'
lsdReportVerificationImplementation 'com.microsoft.playwright:playwright:1.17.0'
lsdReportVerificationImplementation 'com.approvaltests:approvaltests:14.0.0'
lsdReportVerificationImplementation 'com.approvaltests:approvaltests:18.6.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@
<span onclick="location.href='lsd-index.html';" title="back to index page" class="back_to_index"></span>
<h1 class="logo">LSD</h1>
<h1>scenario_outline</h1>
<div class="contents">
<h3>Contents</h3>
<ul class="contents">
<div class="dropdown">
<label class="dropdown">Scenarios</label>
<div class="dropdown-content">

<li class="success"><a href="#7">Scenario with a data table #1</a></li>
<a class="success" href="#7">Scenario with a data table #1</a>

<li class="success"><a href="#10">Scenario with a data table #2</a></li>
<a class="success" href="#10">Scenario with a data table #2</a>

</ul>
</div>
</div>



<article id="7">
<span onclick="location.href='#top';" title="top of page" class="back_to_top"></span>
Expand All @@ -29,7 +30,6 @@ <h3 class="success">Description</h3>
Given the following values for value1_1 and value1_2</br>When when3</br>Then then3
</section>


<section class="sequence diagram svg success">
<h3 class="success">Sequence Diagram</h3>
<figure><?xml version="1.0" encoding="us-ascii" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="152px" preserveAspectRatio="none" style="width:212px;height:152px;" version="1.1" viewBox="0 0 212 152" width="212px" zoomAndPan="magnify"><defs/><g><line style="stroke:#000000;stroke-width:1.0;" x1="51" x2="51" y1="37.0146" y2="116.6133"/><line style="stroke:#000000;stroke-width:1.0;" x1="159" x2="159" y1="37.0146" y2="116.6133"/><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="62" x="20" y="5"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="48" x="27" y="26.0752">Source</text><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="62" x="20" y="115.6133"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="48" x="27" y="136.6885">Source</text><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="94" x="112" y="5"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="80" x="119" y="26.0752">Destination</text><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="94" x="112" y="115.6133"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="80" x="119" y="136.6885">Destination</text><polygon fill="#000000" points="147,64.814,157,68.814,147,72.814,151,68.814" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="51" x2="153" y1="68.814" y2="68.814"/><a href="#id1" target="_top" title="label1" xlink:actuate="onRequest" xlink:href="#id1" xlink:show="new" xlink:title="label1" xlink:type="simple"><text fill="" font-family="Verdana" font-size="13" lengthAdjust="spacing" text-decoration="underline" textLength="40" x="58" y="64.0845">label1</text></a><polygon fill="#000000" points="62,94.6133,52,98.6133,62,102.6133,58,98.6133" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="56" x2="158" y1="98.6133" y2="98.6133"/><a href="#id2" target="_top" title="label2" xlink:actuate="onRequest" xlink:href="#id2" xlink:show="new" xlink:title="label2" xlink:type="simple"><text fill="" font-family="Verdana" font-size="13" lengthAdjust="spacing" text-decoration="underline" textLength="40" x="68" y="93.8838">label2</text></a></g></svg></figure>
Expand Down Expand Up @@ -122,7 +122,6 @@ <h2>label2</h2>
</div>
</div>


</article>


Expand All @@ -134,7 +133,6 @@ <h3 class="success">Description</h3>
Given the following values for value2_1 and value2_2</br>When when3</br>Then then3
</section>


<section class="sequence diagram svg success">
<h3 class="success">Sequence Diagram</h3>
<figure><?xml version="1.0" encoding="us-ascii" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="152px" preserveAspectRatio="none" style="width:212px;height:152px;" version="1.1" viewBox="0 0 212 152" width="212px" zoomAndPan="magnify"><defs/><g><line style="stroke:#000000;stroke-width:1.0;" x1="51" x2="51" y1="37.0146" y2="116.6133"/><line style="stroke:#000000;stroke-width:1.0;" x1="159" x2="159" y1="37.0146" y2="116.6133"/><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="62" x="20" y="5"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="48" x="27" y="26.0752">Source</text><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="62" x="20" y="115.6133"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="48" x="27" y="136.6885">Source</text><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="94" x="112" y="5"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="80" x="119" y="26.0752">Destination</text><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="94" x="112" y="115.6133"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="80" x="119" y="136.6885">Destination</text><polygon fill="#000000" points="147,64.814,157,68.814,147,72.814,151,68.814" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="51" x2="153" y1="68.814" y2="68.814"/><a href="#id1" target="_top" title="label1" xlink:actuate="onRequest" xlink:href="#id1" xlink:show="new" xlink:title="label1" xlink:type="simple"><text fill="" font-family="Verdana" font-size="13" lengthAdjust="spacing" text-decoration="underline" textLength="40" x="58" y="64.0845">label1</text></a><polygon fill="#000000" points="62,94.6133,52,98.6133,62,102.6133,58,98.6133" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="56" x2="158" y1="98.6133" y2="98.6133"/><a href="#id2" target="_top" title="label2" xlink:actuate="onRequest" xlink:href="#id2" xlink:show="new" xlink:title="label2" xlink:type="simple"><text fill="" font-family="Verdana" font-size="13" lengthAdjust="spacing" text-decoration="underline" textLength="40" x="68" y="93.8838">label2</text></a></g></svg></figure>
Expand Down Expand Up @@ -227,7 +225,6 @@ <h2>label2</h2>
</div>
</div>


</article>

</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@
<span onclick="location.href='lsd-index.html';" title="back to index page" class="back_to_index"></span>
<h1 class="logo">LSD</h1>
<h1>scenario</h1>
<div class="contents">
<h3>Contents</h3>
<ul class="contents">

<li class="success"><a href="#4">Basic scenario</a></li>

</ul>
</div>




<article id="4">
Expand All @@ -27,7 +21,6 @@ <h3 class="success">Description</h3>
Given given1</br>When when1</br>Then then1
</section>


<section class="sequence diagram svg success">
<h3 class="success">Sequence Diagram</h3>
<figure><?xml version="1.0" encoding="us-ascii" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="152px" preserveAspectRatio="none" style="width:212px;height:152px;" version="1.1" viewBox="0 0 212 152" width="212px" zoomAndPan="magnify"><defs/><g><line style="stroke:#000000;stroke-width:1.0;" x1="51" x2="51" y1="37.0146" y2="116.6133"/><line style="stroke:#000000;stroke-width:1.0;" x1="159" x2="159" y1="37.0146" y2="116.6133"/><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="62" x="20" y="5"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="48" x="27" y="26.0752">Source</text><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="62" x="20" y="115.6133"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="48" x="27" y="136.6885">Source</text><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="94" x="112" y="5"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="80" x="119" y="26.0752">Destination</text><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="94" x="112" y="115.6133"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="80" x="119" y="136.6885">Destination</text><polygon fill="#000000" points="147,64.814,157,68.814,147,72.814,151,68.814" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="51" x2="153" y1="68.814" y2="68.814"/><a href="#id1" target="_top" title="label1" xlink:actuate="onRequest" xlink:href="#id1" xlink:show="new" xlink:title="label1" xlink:type="simple"><text fill="" font-family="Verdana" font-size="13" lengthAdjust="spacing" text-decoration="underline" textLength="40" x="58" y="64.0845">label1</text></a><polygon fill="#000000" points="62,94.6133,52,98.6133,62,102.6133,58,98.6133" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="56" x2="158" y1="98.6133" y2="98.6133"/><a href="#id2" target="_top" title="label2" xlink:actuate="onRequest" xlink:href="#id2" xlink:show="new" xlink:title="label2" xlink:type="simple"><text fill="" font-family="Verdana" font-size="13" lengthAdjust="spacing" text-decoration="underline" textLength="40" x="68" y="93.8838">label2</text></a></g></svg></figure>
Expand Down Expand Up @@ -120,7 +113,6 @@ <h2>label2</h2>
</div>
</div>


</article>

</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@
<span onclick="location.href='lsd-index.html';" title="back to index page" class="back_to_index"></span>
<h1 class="logo">LSD</h1>
<h1>data_table</h1>
<div class="contents">
<h3>Contents</h3>
<ul class="contents">

<li class="success"><a href="#1">Scenario with a data table</a></li>

</ul>
</div>




<article id="1">
Expand All @@ -27,7 +21,6 @@ <h3 class="success">Description</h3>
Given given2</br>When when2</br>Then then2
</section>


<section class="sequence diagram svg success">
<h3 class="success">Sequence Diagram</h3>
<figure><?xml version="1.0" encoding="us-ascii" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="152px" preserveAspectRatio="none" style="width:212px;height:152px;" version="1.1" viewBox="0 0 212 152" width="212px" zoomAndPan="magnify"><defs/><g><line style="stroke:#000000;stroke-width:1.0;" x1="51" x2="51" y1="37.0146" y2="116.6133"/><line style="stroke:#000000;stroke-width:1.0;" x1="159" x2="159" y1="37.0146" y2="116.6133"/><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="62" x="20" y="5"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="48" x="27" y="26.0752">Source</text><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="62" x="20" y="115.6133"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="48" x="27" y="136.6885">Source</text><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="94" x="112" y="5"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="80" x="119" y="26.0752">Destination</text><rect fill="#FFFFFF" height="31.0146" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:1.0;" width="94" x="112" y="115.6133"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="80" x="119" y="136.6885">Destination</text><polygon fill="#000000" points="147,64.814,157,68.814,147,72.814,151,68.814" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="51" x2="153" y1="68.814" y2="68.814"/><a href="#id1" target="_top" title="label1" xlink:actuate="onRequest" xlink:href="#id1" xlink:show="new" xlink:title="label1" xlink:type="simple"><text fill="" font-family="Verdana" font-size="13" lengthAdjust="spacing" text-decoration="underline" textLength="40" x="58" y="64.0845">label1</text></a><polygon fill="#000000" points="62,94.6133,52,98.6133,62,102.6133,58,98.6133" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="56" x2="158" y1="98.6133" y2="98.6133"/><a href="#id2" target="_top" title="label2" xlink:actuate="onRequest" xlink:href="#id2" xlink:show="new" xlink:title="label2" xlink:type="simple"><text fill="" font-family="Verdana" font-size="13" lengthAdjust="spacing" text-decoration="underline" textLength="40" x="68" y="93.8838">label2</text></a></g></svg></figure>
Expand Down Expand Up @@ -120,7 +113,6 @@ <h2>label2</h2>
</div>
</div>


</article>

</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,40 @@
import org.approvaltests.Approvals;
import org.junit.jupiter.api.Test;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

import static java.nio.charset.Charset.defaultCharset;
import static java.nio.file.Files.readString;
import static java.nio.file.Paths.get;
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;

class LsdCucumberPluginShould {

@Test
void generateMenu() throws IOException {
Approvals.verifyHtml(readString(get("build/reports/lsd/lsd-index.html"), defaultCharset()));
Approvals.verify(copyOfFile("build/reports/lsd/lsd-index.html"));
}

@Test
void generateReportForBasicScenario() throws IOException {
Approvals.verifyHtml(readString(get("build/reports/lsd/Scenario.html"), defaultCharset()));
Approvals.verify(copyOfFile("build/reports/lsd/Scenario.html"));
}

@Test
void generateReportForScenarioWithDataTable() throws IOException {
Approvals.verifyHtml(readString(get("build/reports/lsd/Data_table.html"), defaultCharset()));
Approvals.verify(copyOfFile("build/reports/lsd/Data_table.html"));
}

@Test
void generateForScenarioOutline() throws IOException {
Approvals.verifyHtml(readString(get("build/reports/lsd/Scenario_outline.html"), defaultCharset()));
Approvals.verify(copyOfFile("build/reports/lsd/Scenario_outline.html"));
}

private File copyOfFile(String path) throws IOException {
Path original = get(path);
Path copy = Path.of(original.getParent().toString(), "copy_" + original.getFileName());
Files.copy(original, copy, REPLACE_EXISTING);
return copy.toFile();
}
}

0 comments on commit e0b67be

Please sign in to comment.