Skip to content

Commit

Permalink
Update dist
Browse files Browse the repository at this point in the history
  • Loading branch information
PerThomasHaga committed Nov 9, 2023
1 parent 290f28b commit fb93cff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 7 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127497,9 +127497,13 @@ const writeSummary = async (path, screenshots) => {
testSuitesElements
.filter((element) => element.name === "testcase")
.forEach((testSuite) => {
let errorMessage = testSuite.elements?.find((element) => element.name === "failure")
?.attributes?.message || "";
errorMessage += testSuite.elements?.find((element) => element.name === "failure");
const failureElements = testSuite.elements?.find((element) => element.name === "failure");
let errorMessage = failureElements?.attributes?.message ||
"" +
testSuite.elements
?.find((element) => element.name === "failure")
?.elements?.map((element) => element.text) ||
"";
let status;
if (!testSuite.elements) {
status = "success";
Expand Down
2 changes: 1 addition & 1 deletion src/tests/__snapshots__/writeSummary.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Summary {
<h3>Nabolaget - Address is shown</h3>
<table><tr><th>Test name</th><th>Time elapsed</th><th>Result</th></tr><tr><td>Nabolaget - Address is shown</td><td>14.0 s</td><td>✅</td></tr></table>
<h3>Lottery results</h3>
<table><tr><th>Test name</th><th>Time elapsed</th><th>Result</th></tr><tr><td><a href="#lottery results-lottery results">Lottery results</a></td><td>70.0 s</td><td>❌</td></tr></table>
<table><tr><th>Test name</th><th>Time elapsed</th><th>Result</th></tr><tr><td><a href="#lottery results-lottery results">Lottery results</a></td><td>69.0 s</td><td>❌</td></tr></table>
<h3>Eurojackpot - Andelsbank feature toggle</h3>
<table><tr><th>Test name</th><th>Time elapsed</th><th>Result</th></tr><tr><td>Eurojackpot - Andelsbank feature toggle</td><td>18.0 s</td><td>✅</td></tr></table>
",
Expand Down
6 changes: 3 additions & 3 deletions src/tests/exampleFiles/fail-variation1.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version='1.0' encoding='UTF-8'?>
<testsuites>
<testsuite name="Hjem" device="emulator-5554" tests="4" failures="1" time="113">
<testsuite name="Hjem" device="emulator-5554" tests="4" failures="1" time="112">
<testcase id="Profil Name" name="Profil Name" classname="Profil Name" time="11"/>
<testcase id="Nabolaget - Address is shown" name="Nabolaget - Address is shown" classname="Nabolaget - Address is shown" time="14"/>
<testcase id="Lottery results" name="Lottery results" classname="Lottery results" time="70">
<testcase id="Lottery results" name="Lottery results" classname="Lottery results" time="69">
<failure>Assertion is false: "Hver tirsdag og fredag!" is visible</failure>
</testcase>
<testcase id="Eurojackpot - Andelsbank feature toggle" name="Eurojackpot - Andelsbank feature toggle" classname="Eurojackpot - Andelsbank feature toggle" time="18"/>
</testsuite>
</testsuites>
</testsuites>

0 comments on commit fb93cff

Please sign in to comment.