anyway/backend/report.html
kscheidecker ba14a0279e
Some checks failed
Run testing on the backend code / Build (pull_request) Has been cancelled
Run linting on the backend code / Build (pull_request) Has been cancelled
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 1m41s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 25s
better logs again
2025-02-20 19:49:18 +01:00

1094 lines
69 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title id="head-title">Backend Testing Report</title>
<style type="text/css">body {
font-family: Helvetica, Arial, sans-serif;
font-size: 12px;
/* do not increase min-width as some may use split screens */
min-width: 800px;
color: #999;
}
h1 {
font-size: 24px;
color: black;
}
h2 {
font-size: 16px;
color: black;
}
p {
color: black;
}
a {
color: #999;
}
table {
border-collapse: collapse;
}
/******************************
* SUMMARY INFORMATION
******************************/
#environment td {
padding: 5px;
border: 1px solid #e6e6e6;
vertical-align: top;
}
#environment tr:nth-child(odd) {
background-color: #f6f6f6;
}
#environment ul {
margin: 0;
padding: 0 20px;
}
/******************************
* TEST RESULT COLORS
******************************/
span.passed,
.passed .col-result {
color: green;
}
span.skipped,
span.xfailed,
span.rerun,
.skipped .col-result,
.xfailed .col-result,
.rerun .col-result {
color: orange;
}
span.error,
span.failed,
span.xpassed,
.error .col-result,
.failed .col-result,
.xpassed .col-result {
color: red;
}
.col-links__extra {
margin-right: 3px;
}
/******************************
* RESULTS TABLE
*
* 1. Table Layout
* 2. Extra
* 3. Sorting items
*
******************************/
/*------------------
* 1. Table Layout
*------------------*/
#results-table {
border: 1px solid #e6e6e6;
color: #999;
font-size: 12px;
width: 100%;
}
#results-table th,
#results-table td {
padding: 5px;
border: 1px solid #e6e6e6;
text-align: left;
}
#results-table th {
font-weight: bold;
}
/*------------------
* 2. Extra
*------------------*/
.logwrapper {
max-height: 230px;
overflow-y: scroll;
background-color: #e6e6e6;
}
.logwrapper.expanded {
max-height: none;
}
.logwrapper.expanded .logexpander:after {
content: "collapse [-]";
}
.logwrapper .logexpander {
z-index: 1;
position: sticky;
top: 10px;
width: max-content;
border: 1px solid;
border-radius: 3px;
padding: 5px 7px;
margin: 10px 0 10px calc(100% - 80px);
cursor: pointer;
background-color: #e6e6e6;
}
.logwrapper .logexpander:after {
content: "expand [+]";
}
.logwrapper .logexpander:hover {
color: #000;
border-color: #000;
}
.logwrapper .log {
min-height: 40px;
position: relative;
top: -50px;
height: calc(100% + 50px);
border: 1px solid #e6e6e6;
color: black;
display: block;
font-family: "Courier New", Courier, monospace;
padding: 5px;
padding-right: 80px;
white-space: pre-wrap;
}
div.media {
border: 1px solid #e6e6e6;
float: right;
height: 240px;
margin: 0 5px;
overflow: hidden;
width: 320px;
}
.media-container {
display: grid;
grid-template-columns: 25px auto 25px;
align-items: center;
flex: 1 1;
overflow: hidden;
height: 200px;
}
.media-container--fullscreen {
grid-template-columns: 0px auto 0px;
}
.media-container__nav--right,
.media-container__nav--left {
text-align: center;
cursor: pointer;
}
.media-container__viewport {
cursor: pointer;
text-align: center;
height: inherit;
}
.media-container__viewport img,
.media-container__viewport video {
object-fit: cover;
width: 100%;
max-height: 100%;
}
.media__name,
.media__counter {
display: flex;
flex-direction: row;
justify-content: space-around;
flex: 0 0 25px;
align-items: center;
}
.collapsible td:not(.col-links) {
cursor: pointer;
}
.collapsible td:not(.col-links):hover::after {
color: #bbb;
font-style: italic;
cursor: pointer;
}
.col-result {
width: 130px;
}
.col-result:hover::after {
content: " (hide details)";
}
.col-result.collapsed:hover::after {
content: " (show details)";
}
#environment-header h2:hover::after {
content: " (hide details)";
color: #bbb;
font-style: italic;
cursor: pointer;
font-size: 12px;
}
#environment-header.collapsed h2:hover::after {
content: " (show details)";
color: #bbb;
font-style: italic;
cursor: pointer;
font-size: 12px;
}
/*------------------
* 3. Sorting items
*------------------*/
.sortable {
cursor: pointer;
}
.sortable.desc:after {
content: " ";
position: relative;
left: 5px;
bottom: -12.5px;
border: 10px solid #4caf50;
border-bottom: 0;
border-left-color: transparent;
border-right-color: transparent;
}
.sortable.asc:after {
content: " ";
position: relative;
left: 5px;
bottom: 12.5px;
border: 10px solid #4caf50;
border-top: 0;
border-left-color: transparent;
border-right-color: transparent;
}
.hidden, .summary__reload__button.hidden {
display: none;
}
.summary__data {
flex: 0 0 550px;
}
.summary__reload {
flex: 1 1;
display: flex;
justify-content: center;
}
.summary__reload__button {
flex: 0 0 300px;
display: flex;
color: white;
font-weight: bold;
background-color: #4caf50;
text-align: center;
justify-content: center;
align-items: center;
border-radius: 3px;
cursor: pointer;
}
.summary__reload__button:hover {
background-color: #46a049;
}
.summary__spacer {
flex: 0 0 550px;
}
.controls {
display: flex;
justify-content: space-between;
}
.filters,
.collapse {
display: flex;
align-items: center;
}
.filters button,
.collapse button {
color: #999;
border: none;
background: none;
cursor: pointer;
text-decoration: underline;
}
.filters button:hover,
.collapse button:hover {
color: #ccc;
}
.filter__label {
margin-right: 10px;
}
</style>
</head>
<body>
<h1 id="title">Backend Testing Report</h1>
<p>Report generated on 20-Feb-2025 at 10:03:16 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a>
v4.1.1</p>
<div id="environment-header">
<h2>Environment</h2>
</div>
<table id="environment"></table>
<!-- TEMPLATES -->
<template id="template_environment_row">
<tr>
<td></td>
<td></td>
</tr>
</template>
<template id="template_results-table__body--empty">
<tbody class="results-table-row">
<tr id="not-found-message">
<td colspan="7">No results found. Check the filters.</th>
</tr>
</template>
<template id="template_results-table__tbody">
<tbody class="results-table-row">
<tr class="collapsible">
</tr>
<tr class="extras-row">
<td class="extra" colspan="7">
<div class="extraHTML"></div>
<div class="media">
<div class="media-container">
<div class="media-container__nav--left"><</div>
<div class="media-container__viewport">
<img src="" />
<video controls>
<source src="" type="video/mp4">
</video>
</div>
<div class="media-container__nav--right">></div>
</div>
<div class="media__name"></div>
<div class="media__counter"></div>
</div>
<div class="logwrapper">
<div class="logexpander"></div>
<div class="log"></div>
</div>
</td>
</tr>
</tbody>
</template>
<!-- END TEMPLATES -->
<div class="summary">
<div class="summary__data">
<h2>Summary</h2>
<div class="additional-summary prefix">
</div>
<p class="run-count">18 tests took 00:02:19.</p>
<p class="filter">(Un)check the boxes to filter the results.</p>
<div class="summary__reload">
<div class="summary__reload__button hidden" onclick="location.reload()">
<div>There are still tests running. <br />Reload this page to get the latest results!</div>
</div>
</div>
<div class="summary__spacer"></div>
<div class="controls">
<div class="filters">
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="failed" />
<span class="failed">1 Failed,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="passed" />
<span class="passed">17 Passed,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="skipped" disabled/>
<span class="skipped">0 Skipped,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="xfailed" disabled/>
<span class="xfailed">0 Expected failures,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="xpassed" disabled/>
<span class="xpassed">0 Unexpected passes,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="error" disabled/>
<span class="error">0 Errors,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="rerun" disabled/>
<span class="rerun">0 Reruns</span>
</div>
<div class="collapse">
<button id="show_all_details">Show all details</button>&nbsp;/&nbsp;<button id="hide_all_details">Hide all details</button>
</div>
</div>
</div>
<div class="additional-summary summary">
</div>
<div class="additional-summary postfix">
</div>
</div>
<table id="results-table">
<thead id="results-table-head">
<tr>
<th class="sortable" data-column-type="result">Result</th>
<th class="sortable" data-column-type="testId">Test</th>
<th>Detailed trip</th>
<th>Trip Duration</th>
<th>Target Duration</th>
<th>Execution time</th>
<th>Links</th>
</tr>
</thead>
</table>
</body>
<footer>
<div id="data-container" data-jsonblob="{&#34;environment&#34;: {&#34;Python&#34;: &#34;3.12.3&#34;, &#34;Platform&#34;: &#34;Linux-6.8.0-53-generic-x86_64-with-glibc2.39&#34;, &#34;Packages&#34;: {&#34;pytest&#34;: &#34;8.3.4&#34;, &#34;pluggy&#34;: &#34;1.5.0&#34;}, &#34;Plugins&#34;: {&#34;html&#34;: &#34;4.1.1&#34;, &#34;anyio&#34;: &#34;4.8.0&#34;, &#34;metadata&#34;: &#34;3.1.1&#34;}}, &#34;tests&#34;: {&#34;src/tests/test_invalid_input.py::test_input[start0-preferences0-422]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_invalid_input.py::test_input[start0-preferences0-422]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_invalid_input.py::test_input[start0-preferences0-422]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;14 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &amp;quot;HTTP/1.1 422 Unprocessable Entity&amp;quot;\n\n&#34;}], &#34;src/tests/test_invalid_input.py::test_input[start1-preferences1-422]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_invalid_input.py::test_input[start1-preferences1-422]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_invalid_input.py::test_input[start1-preferences1-422]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;3 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &amp;quot;HTTP/1.1 422 Unprocessable Entity&amp;quot;\n\n&#34;}], &#34;src/tests/test_invalid_input.py::test_input[start2-preferences2-422]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_invalid_input.py::test_input[start2-preferences2-422]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_invalid_input.py::test_input[start2-preferences2-422]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;2 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &amp;quot;HTTP/1.1 422 Unprocessable Entity&amp;quot;\n\n&#34;}], &#34;src/tests/test_invalid_input.py::test_input[start3-preferences3-422]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_invalid_input.py::test_input[start3-preferences3-422]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_invalid_input.py::test_input[start3-preferences3-422]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;4 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &amp;quot;HTTP/1.1 422 Unprocessable Entity&amp;quot;\n\n&#34;}], &#34;src/tests/test_invalid_input.py::test_input[start4-preferences4-422]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_invalid_input.py::test_input[start4-preferences4-422]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_invalid_input.py::test_input[start4-preferences4-422]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;5 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &amp;quot;HTTP/1.1 422 Unprocessable Entity&amp;quot;\n\n&#34;}], &#34;src/tests/test_invalid_input.py::test_input[start5-preferences5-422]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_invalid_input.py::test_input[start5-preferences5-422]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_invalid_input.py::test_input[start5-preferences5-422]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;4 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &amp;quot;HTTP/1.1 422 Unprocessable Entity&amp;quot;\n\n&#34;}], &#34;src/tests/test_invalid_input.py::test_input[start6-preferences6-422]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_invalid_input.py::test_input[start6-preferences6-422]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_invalid_input.py::test_input[start6-preferences6-422]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;5 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &amp;quot;HTTP/1.1 422 Unprocessable Entity&amp;quot;\n\n&#34;}], &#34;src/tests/test_invalid_input.py::test_input[start7-preferences7-422]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_invalid_input.py::test_input[start7-preferences7-422]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_invalid_input.py::test_input[start7-preferences7-422]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;3 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &amp;quot;HTTP/1.1 422 Unprocessable Entity&amp;quot;\n\n&#34;}], &#34;src/tests/test_main.py::test_paris&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;src/tests/test_main.py::test_paris&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_main.py::test_paris&lt;/td&gt;&#34;, &#34;&lt;td&gt;start (0 | 0) - 9 - \u00c9glise Saint-Germain l&#39;Auxerrois (496 | 5) - 9 - Palais du Louvre (891 | 5) - 6 - Temple de l&#39;Oratoire du Louvre (630 | 5) - 6 - La Samaritaine (416 | 5) - 7 - Fontaine du Palmier (333 | 5) - 2 - Tour Saint-Jacques (793 | 5) - 3 - \u00c9glise Saint-Merri (397 | 5) - 3 - Centre Georges Pompidou (1118 | 5) - 10 - 4e Arrondissement (855 | 30) - 8 - H\u00f4tel de Ville (672 | 5) - 9 - M\u00e9morial des Martyrs de la D\u00e9portation (624 | 5) - 4 - Cath\u00e9drale Notre-Dame de Paris (1469 | 10) - 8 - Pont au Change (333 | 5) - 4 - Palais de Justice de Paris (531 | 5) - 3 - finish (0 | 0) - 0&lt;/td&gt;&#34;, &#34;&lt;td&gt;191 min&lt;/td&gt;&#34;, &#34;&lt;td&gt;200 min&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;00:01:58&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;client = &amp;lt;starlette.testclient.TestClient object at 0x762b0065c530&amp;gt;\nrequest = &amp;lt;FixtureRequest for &amp;lt;Function test_paris&amp;gt;&amp;gt;\n\n def test_paris(client, request) : # pylint: disable=redefined-outer-name\n &amp;quot;&amp;quot;&amp;quot;\n Test n\u00b06 : Custom test in Paris (les Halles) centre to ensure proper decision making in crowded area.\n \n Args:\n client:\n request:\n &amp;quot;&amp;quot;&amp;quot;\n start_time = time.time() # Start timer\n duration_minutes = 200\n \n response = client.post(\n &amp;quot;/trip/new&amp;quot;,\n json={\n &amp;quot;preferences&amp;quot;: {&amp;quot;sightseeing&amp;quot;: {&amp;quot;type&amp;quot;: &amp;quot;sightseeing&amp;quot;, &amp;quot;score&amp;quot;: 5},\n &amp;quot;nature&amp;quot;: {&amp;quot;type&amp;quot;: &amp;quot;nature&amp;quot;, &amp;quot;score&amp;quot;: 0},\n &amp;quot;shopping&amp;quot;: {&amp;quot;type&amp;quot;: &amp;quot;shopping&amp;quot;, &amp;quot;score&amp;quot;: 5},\n &amp;quot;max_time_minute&amp;quot;: duration_minutes,\n &amp;quot;detour_tolerance_minute&amp;quot;: 0},\n &amp;quot;start&amp;quot;: [48.85468881798671, 2.3423925755998374]\n }\n )\n result = response.json()\n landmarks = load_trip_landmarks(client, result[&amp;#x27;first_landmark_uuid&amp;#x27;])\n \n # Get computation time\n comp_time = time.time() - start_time\n \n # Add details to report\n log_trip_details(request, landmarks, result[&amp;#x27;total_time&amp;#x27;], duration_minutes)\n \n # for elem in landmarks :\n # print(elem)\n \n # checks :\n assert response.status_code == 200 # check for successful planning\n&amp;gt; assert comp_time &amp;lt; 30, f&amp;quot;Computation time exceeded 30 seconds: {comp_time:.2f} seconds&amp;quot;\nE AssertionError: Computation time exceeded 30 seconds: 118.42 seconds\nE assert 118.42416024208069 &amp;lt; 30\n\nsrc/tests/test_main.py:259: AssertionError\n\n------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO src.main:main.py:70 No end coordinates provided. Using start=end.\nINFO src.main:main.py:72 Requested new trip generation. Details:\n\tCoordinates: (48.85468881798671, 2.3423925755998374)\n\tTime: 200\n\tSightseeing: 5\n\tNature: 0\n\tShopping: 5\nDEBUG src.landmarks.landmarks_manager:landmarks_manager.py:75 Starting to fetch landmarks...\nDEBUG src.landmarks.landmarks_manager:landmarks_manager.py:87 Fetching sightseeing landmarks...\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/4 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(way[tourism~&amp;quot;^(museum|attraction|gallery|artwork|aquarium)$&amp;quot;](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744);relation[tourism~&amp;quot;^(museum|attraction|gallery|artwork|aquarium)$&amp;quot;](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/4 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(way[historic](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744);relation[historic](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/4 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(way[amenity~&amp;quot;^(planetarium|place_of_worship|fountain|townhall)$&amp;quot;](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744);relation[amenity~&amp;quot;^(planetarium|place_of_worship|fountain|townhall)$&amp;quot;](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/4 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(way[water=reflecting_pool](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744);relation[water=reflecting_pool](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/4 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(way[bridge~&amp;quot;^(aqueduct|viaduct|boardwalk|cantilever|abandoned)$&amp;quot;](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744);relation[bridge~&amp;quot;^(aqueduct|viaduct|boardwalk|cantilever|abandoned)$&amp;quot;](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/4 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(way[building=cathedral](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744);relation[building=cathedral](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744););out ids center tags;\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:90 Found 426 sightseeing landmarks\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/4 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(way[&amp;quot;historic&amp;quot;~&amp;quot;^(monument|building|yes)$&amp;quot;](48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744););out ids center;\nINFO src.landmarks.cluster_manager:cluster_manager.py:145 Found 0 sightseeing clusters.\nDEBUG src.landmarks.landmarks_manager:landmarks_manager.py:107 Fetching shopping landmarks...\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/4 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(way[shop~&amp;quot;^(department_store|mall)$&amp;quot;](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744);relation[shop~&amp;quot;^(department_store|mall)$&amp;quot;](if: count_tags()&amp;gt;5)(48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744););out ids center tags;\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:109 Found 10 shopping landmarks\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/4 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(node[&amp;quot;shop&amp;quot;~&amp;quot;^(bag|boutique|clothes)$&amp;quot;](48.83672251230432,2.3150869554078004,48.872655123669105,2.3696981957918744););out ids center;\nINFO src.landmarks.cluster_manager:cluster_manager.py:137 Found 17 different shopping clusters.\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/1 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(node[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.864535554147636,2.322543930515973,48.86992544585236,2.3307376694840265);way[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.864535554147636,2.322543930515973,48.86992544585236,2.3307376694840265);relation[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.864535554147636,2.322543930515973,48.86992544585236,2.3307376694840265););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/1 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(node[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.864535554147636,2.322543930515973,48.86992544585236,2.3307376694840265);way[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.864535554147636,2.322543930515973,48.86992544585236,2.3307376694840265);relation[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.864535554147636,2.322543930515973,48.86992544585236,2.3307376694840265););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/2 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(node[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.86121605414764,2.342718602264653,48.86660594585236,2.350911797735347);way[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.86121605414764,2.342718602264653,48.86660594585236,2.350911797735347);relation[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.86121605414764,2.342718602264653,48.86660594585236,2.350911797735347););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/2 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(node[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.86121605414764,2.342718602264653,48.86660594585236,2.350911797735347);way[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.86121605414764,2.342718602264653,48.86660594585236,2.350911797735347);relation[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.86121605414764,2.342718602264653,48.86660594585236,2.350911797735347););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/1 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(node[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.854939054147636,2.3546762159910193,48.86032894585236,2.362868384008981);way[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.854939054147636,2.3546762159910193,48.86032894585236,2.362868384008981);relation[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.854939054147636,2.3546762159910193,48.86032894585236,2.362868384008981););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/1 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(node[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.854939054147636,2.3546762159910193,48.86032894585236,2.362868384008981);way[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.854939054147636,2.3546762159910193,48.86032894585236,2.362868384008981);relation[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.854939054147636,2.3546762159910193,48.86032894585236,2.362868384008981););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/2 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(node[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.849747754147636,2.3286988407263425,48.85513764585236,2.3368901592736573);way[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.849747754147636,2.3286988407263425,48.85513764585236,2.3368901592736573);relation[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.849747754147636,2.3286988407263425,48.85513764585236,2.3368901592736573););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/2 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(node[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.849747754147636,2.3286988407263425,48.85513764585236,2.3368901592736573);way[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.849747754147636,2.3286988407263425,48.85513764585236,2.3368901592736573);relation[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.849747754147636,2.3286988407263425,48.85513764585236,2.3368901592736573););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/1 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(node[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.85910515414764,2.360323175046188,48.864495045852365,2.3685160249538124);way[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.85910515414764,2.360323175046188,48.864495045852365,2.3685160249538124);relation[&amp;quot;place&amp;quot;~&amp;quot;^(suburb|neighborhood|neighbourhood|quarter|city_block)$&amp;quot;](48.85910515414764,2.360323175046188,48.864495045852365,2.3685160249538124););out ids center tags;\nDEBUG src.overpass.overpass:overpass.py:56 Cache hit for 0/1 quadrants.\nDEBUG src.overpass.overpass:overpass.py:65 Query string: [out:json][timeout:20];(node[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.85910515414764,2.360323175046188,48.864495045852365,2.3685160249538124);way[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.85910515414764,2.360323175046188,48.864495045852365,2.3685160249538124);relation[&amp;quot;shop&amp;quot;=&amp;quot;mall&amp;quot;](48.85910515414764,2.360323175046188,48.864495045852365,2.3685160249538124););out ids center tags;\nINFO src.main:main.py:110 Fetched 377 landmarks in \t: 28.834 seconds\nDEBUG src.optimization.optimizer:optimizer.py:596 First results are out. Looking out for circles and correcting...\nINFO src.optimization.optimizer:optimizer.py:636 Re-optimized 8 times, objective value : 8551\nDEBUG src.optimization.refiner:refiner.py:345 Using 15 minor landmarks around the predicted path\nDEBUG src.optimization.optimizer:optimizer.py:596 First results are out. Looking out for circles and correcting...\nINFO src.optimization.optimizer:optimizer.py:636 Re-optimized 4 times, objective value : 9558\nDEBUG src.main:main.py:136 First stage optimization\t: 5.209 seconds\nDEBUG src.main:main.py:137 Second stage optimization\t: 1.239 seconds\nINFO src.main:main.py:138 Total computation time\t: 6.448 seconds\nINFO src.main:main.py:143 Generated a trip of 191 minutes with 16 landmarks in 35.282 seconds.\nDEBUG src.main:main.py:144 Detailed trip :\n\tLandmark(start): [start @(48.85468881798671, 2.3423925755998374), score=0, time_to_next=9]\n\tLandmark(sightseeing): [\u00c9glise Saint-Germain l&amp;#x27;Auxerrois @(48.8595016, 2.3413445), score=496, time_to_next=9]\n\tLandmark(sightseeing): [Palais du Louvre @(48.8614768, 2.3351677), score=891, time_to_next=6]\n\tLandmark(sightseeing): [Temple de l&amp;#x27;Oratoire du Louvre @(48.8616725, 2.3400059), score=630, time_to_next=6]\n\tLandmark(sightseeing): [La Samaritaine @(48.8592672, 2.3424349), score=416, time_to_next=7, secondary]\n\tLandmark(sightseeing): [Fontaine du Palmier @(48.8575005, 2.3472864), score=333, time_to_next=2, secondary]\n\tLandmark(sightseeing): [Tour Saint-Jacques @(48.8579983, 2.3489178), score=793, time_to_next=3]\n\tLandmark(sightseeing): [\u00c9glise Saint-Merri @(48.8590777, 2.3508448), score=397, time_to_next=3, secondary]\n\tLandmark(sightseeing): [Centre Georges Pompidou @(48.8605235, 2.3524395), score=1118, time_to_next=10]\n\tLandmark(shopping): [4e Arrondissement @(48.857634, 2.3587723), score=855, time_to_next=8]\n\tLandmark(sightseeing): [H\u00f4tel de Ville @(48.8564265, 2.352527), score=672, time_to_next=9]\n\tLandmark(sightseeing): [M\u00e9morial des Martyrs de la D\u00e9portation @(48.8517365, 2.3524734), score=624, time_to_next=4]\n\tLandmark(sightseeing): [Cath\u00e9drale Notre-Dame de Paris @(48.8529372, 2.3498701), score=1469, time_to_next=8]\n\tLandmark(sightseeing): [Pont au Change @(48.8567097, 2.3468433), score=333, time_to_next=4, secondary]\n\tLandmark(sightseeing): [Palais de Justice de Paris @(48.8556537, 2.3446072), score=531, time_to_next=3]\n\tLandmark(finish): [finish @(48.85468881798671, 2.3423925755998374), score=0]\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 78351b124204bc03e1ef90607268f93f\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for ad4dc4da03822ac79868bcfba3d45c79\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for f4d32ee9aef9ab0e8fc99189f62eb335\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for e948371ee73e26513b31196a39024ad9\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 64718cf4b830c17ce59614fb2516d113\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 0ebf3424e8582facb69da2d544675d8a\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 492f2f962491d1740a5c77d09a6c92c4\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 684a8a12089403eadb3c7ce091c2be80\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 0761193ce64927f58787e2fc39863356\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for d1d35056fe1637ce51119c73a2a52a15\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 2a0067f12a13b198722138c1f197c456\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for b13c7051ce6fe4b8d323b2a7b67c91c4\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 36a9addf8f85c7842056a22fb23f72f9\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 60c5bd7fa08145f807bfb8e462830130\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for a4acc25e1e9a5be738003b0c732f5a64\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for fffff4287ae55e52e5d025711fd1bc68\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for f7e8692e57d36017b272a4af957d79c4\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 1402693db5cd9fb147445a983cb49026\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for f5b32e229f857fd748d4ad61501f875f\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for e3eb0b02c4fa2babe7fbe7caf81fb12a\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for f069676d76126e01a57a287e2bcb6f50\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 3450e459ceb991b5bffb1d93566abaf6\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 73ca842980b79e6fc1dfd82fc8458d7a\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 1515d3ba78aff33836603e6fdd07079e\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for f7ed59837e9d15359043253bd96dd490\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for e094a045360468b2a70a9b1f671b91b9\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 42902c0fe52b7b3534124a9b4c1c6471\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for d8a5c85713268c52e876355b315bed80\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 403b7c33e4330a23925525d6807ce441\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 6411002b97a7b565577c42c8e440f9dc\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for ee316eb08a8986f967f0495112f41ce7\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 22d1b41451ac026e9fa93cc3a4cde884\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 073d5c87636bb136526e997cc131a82c\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for e2c3187d657812d57fbb488c8a856666\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 71b657d0bc0748e1c76951adeff4d5cc\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 64b1af12be350f7fba57d89055462253\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 10ea1df16aafbd4f2c077e0d936b5773\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 0192977825ad85074fdb26005a6950d0\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 57f529fd05034522c841da34c8cc433e\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 642067051f13007c46bd092a5ade5caf\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for 2b34766c9639bc208e3269b8380e56e3\nDEBUG src.overpass.overpass:overpass.py:122 Cache set for b8ae0a66097bf25e5d9e07dcedef9fa3\nINFO src.overpass.overpass:overpass.py:422 Successfully filled 42/42 cache files.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &amp;quot;HTTP/1.1 200 OK&amp;quot;\n\n&#34;}], &#34;src/tests/test_toilets.py::test_invalid_input[location0-None-422]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_toilets.py::test_invalid_input[location0-None-422]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_toilets.py::test_invalid_input[location0-None-422]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;3 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=%7B%7D&amp;amp;radius= &amp;quot;HTTP/1.1 422 Unprocessable Entity&amp;quot;\n\n&#34;}], &#34;src/tests/test_toilets.py::test_invalid_input[location1-None-422]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_toilets.py::test_invalid_input[location1-None-422]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_toilets.py::test_invalid_input[location1-None-422]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;2 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=443&amp;amp;radius= &amp;quot;HTTP/1.1 422 Unprocessable Entity&amp;quot;\n\n&#34;}], &#34;src/tests/test_toilets.py::test_invalid_input[location2-None-422]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_toilets.py::test_invalid_input[location2-None-422]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_toilets.py::test_invalid_input[location2-None-422]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;3 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=443&amp;amp;location=433&amp;amp;radius= &amp;quot;HTTP/1.1 422 Unprocessable Entity&amp;quot;\n\n&#34;}], &#34;src/tests/test_toilets.py::test_no_toilets[location0-200]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_toilets.py::test_no_toilets[location0-200]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_toilets.py::test_no_toilets[location0-200]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;303 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=48.227&amp;amp;location=7.437 &amp;quot;HTTP/1.1 200 OK&amp;quot;\n\n&#34;}], &#34;src/tests/test_toilets.py::test_no_toilets[location1-200]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_toilets.py::test_no_toilets[location1-200]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_toilets.py::test_no_toilets[location1-200]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;254 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=10.2012&amp;amp;location=10.123 &amp;quot;HTTP/1.1 200 OK&amp;quot;\n\n&#34;}], &#34;src/tests/test_toilets.py::test_no_toilets[location2-200]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_toilets.py::test_no_toilets[location2-200]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_toilets.py::test_no_toilets[location2-200]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;259 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=63.989&amp;amp;location=-19.677 &amp;quot;HTTP/1.1 200 OK&amp;quot;\n\n&#34;}], &#34;src/tests/test_toilets.py::test_toilets[location0-200]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_toilets.py::test_toilets[location0-200]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_toilets.py::test_toilets[location0-200]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;00:00:13&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=45.7576485&amp;amp;location=4.8330241&amp;amp;radius=600 &amp;quot;HTTP/1.1 200 OK&amp;quot;\n\n&#34;}], &#34;src/tests/test_toilets.py::test_toilets[location1-200]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_toilets.py::test_toilets[location1-200]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_toilets.py::test_toilets[location1-200]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;306 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=-6.913795&amp;amp;location=107.60278&amp;amp;radius=600 &amp;quot;HTTP/1.1 200 OK&amp;quot;\n\n&#34;}], &#34;src/tests/test_toilets.py::test_toilets[location2-200]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;src/tests/test_toilets.py::test_toilets[location2-200]&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;src/tests/test_toilets.py::test_toilets[location2-200]&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td&gt;N/A&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;00:00:06&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log call -------------------------------\nDEBUG asyncio:selector_events.py:64 Using selector: EpollSelector\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=-22.97014&amp;amp;location=-43.18181&amp;amp;radius=600 &amp;quot;HTTP/1.1 200 OK&amp;quot;\n\n&#34;}]}, &#34;renderCollapsed&#34;: [&#34;passed&#34;], &#34;initialSort&#34;: &#34;result&#34;, &#34;title&#34;: &#34;Backend Testing Report&#34;}"></div>
<script>
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
const { getCollapsedCategory, setCollapsedIds } = require('./storage.js')
class DataManager {
setManager(data) {
const collapsedCategories = [...getCollapsedCategory(data.renderCollapsed)]
const collapsedIds = []
const tests = Object.values(data.tests).flat().map((test, index) => {
const collapsed = collapsedCategories.includes(test.result.toLowerCase())
const id = `test_${index}`
if (collapsed) {
collapsedIds.push(id)
}
return {
...test,
id,
collapsed,
}
})
const dataBlob = { ...data, tests }
this.data = { ...dataBlob }
this.renderData = { ...dataBlob }
setCollapsedIds(collapsedIds)
}
get allData() {
return { ...this.data }
}
resetRender() {
this.renderData = { ...this.data }
}
setRender(data) {
this.renderData.tests = [...data]
}
toggleCollapsedItem(id) {
this.renderData.tests = this.renderData.tests.map((test) =>
test.id === id ? { ...test, collapsed: !test.collapsed } : test,
)
}
set allCollapsed(collapsed) {
this.renderData = { ...this.renderData, tests: [...this.renderData.tests.map((test) => (
{ ...test, collapsed }
))] }
}
get testSubset() {
return [...this.renderData.tests]
}
get environment() {
return this.renderData.environment
}
get initialSort() {
return this.data.initialSort
}
}
module.exports = {
manager: new DataManager(),
}
},{"./storage.js":8}],2:[function(require,module,exports){
const mediaViewer = require('./mediaviewer.js')
const templateEnvRow = document.getElementById('template_environment_row')
const templateResult = document.getElementById('template_results-table__tbody')
function htmlToElements(html) {
const temp = document.createElement('template')
temp.innerHTML = html
return temp.content.childNodes
}
const find = (selector, elem) => {
if (!elem) {
elem = document
}
return elem.querySelector(selector)
}
const findAll = (selector, elem) => {
if (!elem) {
elem = document
}
return [...elem.querySelectorAll(selector)]
}
const dom = {
getStaticRow: (key, value) => {
const envRow = templateEnvRow.content.cloneNode(true)
const isObj = typeof value === 'object' && value !== null
const values = isObj ? Object.keys(value).map((k) => `${k}: ${value[k]}`) : null
const valuesElement = htmlToElements(
values ? `<ul>${values.map((val) => `<li>${val}</li>`).join('')}<ul>` : `<div>${value}</div>`)[0]
const td = findAll('td', envRow)
td[0].textContent = key
td[1].appendChild(valuesElement)
return envRow
},
getResultTBody: ({ testId, id, log, extras, resultsTableRow, tableHtml, result, collapsed }) => {
const resultBody = templateResult.content.cloneNode(true)
resultBody.querySelector('tbody').classList.add(result.toLowerCase())
resultBody.querySelector('tbody').id = testId
resultBody.querySelector('.collapsible').dataset.id = id
resultsTableRow.forEach((html) => {
const t = document.createElement('template')
t.innerHTML = html
resultBody.querySelector('.collapsible').appendChild(t.content)
})
if (log) {
// Wrap lines starting with "E" with span.error to color those lines red
const wrappedLog = log.replace(/^E.*$/gm, (match) => `<span class="error">${match}</span>`)
resultBody.querySelector('.log').innerHTML = wrappedLog
} else {
resultBody.querySelector('.log').remove()
}
if (collapsed) {
resultBody.querySelector('.collapsible > td')?.classList.add('collapsed')
resultBody.querySelector('.extras-row').classList.add('hidden')
} else {
resultBody.querySelector('.collapsible > td')?.classList.remove('collapsed')
}
const media = []
extras?.forEach(({ name, format_type, content }) => {
if (['image', 'video'].includes(format_type)) {
media.push({ path: content, name, format_type })
}
if (format_type === 'html') {
resultBody.querySelector('.extraHTML').insertAdjacentHTML('beforeend', `<div>${content}</div>`)
}
})
mediaViewer.setup(resultBody, media)
// Add custom html from the pytest_html_results_table_html hook
tableHtml?.forEach((item) => {
resultBody.querySelector('td[class="extra"]').insertAdjacentHTML('beforeend', item)
})
return resultBody
},
}
module.exports = {
dom,
htmlToElements,
find,
findAll,
}
},{"./mediaviewer.js":6}],3:[function(require,module,exports){
const { manager } = require('./datamanager.js')
const { doSort } = require('./sort.js')
const storageModule = require('./storage.js')
const getFilteredSubSet = (filter) =>
manager.allData.tests.filter(({ result }) => filter.includes(result.toLowerCase()))
const doInitFilter = () => {
const currentFilter = storageModule.getVisible()
const filteredSubset = getFilteredSubSet(currentFilter)
manager.setRender(filteredSubset)
}
const doFilter = (type, show) => {
if (show) {
storageModule.showCategory(type)
} else {
storageModule.hideCategory(type)
}
const currentFilter = storageModule.getVisible()
const filteredSubset = getFilteredSubSet(currentFilter)
manager.setRender(filteredSubset)
const sortColumn = storageModule.getSort()
doSort(sortColumn, true)
}
module.exports = {
doFilter,
doInitFilter,
}
},{"./datamanager.js":1,"./sort.js":7,"./storage.js":8}],4:[function(require,module,exports){
const { redraw, bindEvents, renderStatic } = require('./main.js')
const { doInitFilter } = require('./filter.js')
const { doInitSort } = require('./sort.js')
const { manager } = require('./datamanager.js')
const data = JSON.parse(document.getElementById('data-container').dataset.jsonblob)
function init() {
manager.setManager(data)
doInitFilter()
doInitSort()
renderStatic()
redraw()
bindEvents()
}
init()
},{"./datamanager.js":1,"./filter.js":3,"./main.js":5,"./sort.js":7}],5:[function(require,module,exports){
const { dom, find, findAll } = require('./dom.js')
const { manager } = require('./datamanager.js')
const { doSort } = require('./sort.js')
const { doFilter } = require('./filter.js')
const {
getVisible,
getCollapsedIds,
setCollapsedIds,
getSort,
getSortDirection,
possibleFilters,
} = require('./storage.js')
const removeChildren = (node) => {
while (node.firstChild) {
node.removeChild(node.firstChild)
}
}
const renderStatic = () => {
const renderEnvironmentTable = () => {
const environment = manager.environment
const rows = Object.keys(environment).map((key) => dom.getStaticRow(key, environment[key]))
const table = document.getElementById('environment')
removeChildren(table)
rows.forEach((row) => table.appendChild(row))
}
renderEnvironmentTable()
}
const addItemToggleListener = (elem) => {
elem.addEventListener('click', ({ target }) => {
const id = target.parentElement.dataset.id
manager.toggleCollapsedItem(id)
const collapsedIds = getCollapsedIds()
if (collapsedIds.includes(id)) {
const updated = collapsedIds.filter((item) => item !== id)
setCollapsedIds(updated)
} else {
collapsedIds.push(id)
setCollapsedIds(collapsedIds)
}
redraw()
})
}
const renderContent = (tests) => {
const sortAttr = getSort(manager.initialSort)
const sortAsc = JSON.parse(getSortDirection())
const rows = tests.map(dom.getResultTBody)
const table = document.getElementById('results-table')
const tableHeader = document.getElementById('results-table-head')
const newTable = document.createElement('table')
newTable.id = 'results-table'
// remove all sorting classes and set the relevant
findAll('.sortable', tableHeader).forEach((elem) => elem.classList.remove('asc', 'desc'))
tableHeader.querySelector(`.sortable[data-column-type="${sortAttr}"]`)?.classList.add(sortAsc ? 'desc' : 'asc')
newTable.appendChild(tableHeader)
if (!rows.length) {
const emptyTable = document.getElementById('template_results-table__body--empty').content.cloneNode(true)
newTable.appendChild(emptyTable)
} else {
rows.forEach((row) => {
if (!!row) {
findAll('.collapsible td:not(.col-links', row).forEach(addItemToggleListener)
find('.logexpander', row).addEventListener('click',
(evt) => evt.target.parentNode.classList.toggle('expanded'),
)
newTable.appendChild(row)
}
})
}
table.replaceWith(newTable)
}
const renderDerived = () => {
const currentFilter = getVisible()
possibleFilters.forEach((result) => {
const input = document.querySelector(`input[data-test-result="${result}"]`)
input.checked = currentFilter.includes(result)
})
}
const bindEvents = () => {
const filterColumn = (evt) => {
const { target: element } = evt
const { testResult } = element.dataset
doFilter(testResult, element.checked)
const collapsedIds = getCollapsedIds()
const updated = manager.renderData.tests.map((test) => {
return {
...test,
collapsed: collapsedIds.includes(test.id),
}
})
manager.setRender(updated)
redraw()
}
const header = document.getElementById('environment-header')
header.addEventListener('click', () => {
const table = document.getElementById('environment')
table.classList.toggle('hidden')
header.classList.toggle('collapsed')
})
findAll('input[name="filter_checkbox"]').forEach((elem) => {
elem.addEventListener('click', filterColumn)
})
findAll('.sortable').forEach((elem) => {
elem.addEventListener('click', (evt) => {
const { target: element } = evt
const { columnType } = element.dataset
doSort(columnType)
redraw()
})
})
document.getElementById('show_all_details').addEventListener('click', () => {
manager.allCollapsed = false
setCollapsedIds([])
redraw()
})
document.getElementById('hide_all_details').addEventListener('click', () => {
manager.allCollapsed = true
const allIds = manager.renderData.tests.map((test) => test.id)
setCollapsedIds(allIds)
redraw()
})
}
const redraw = () => {
const { testSubset } = manager
renderContent(testSubset)
renderDerived()
}
module.exports = {
redraw,
bindEvents,
renderStatic,
}
},{"./datamanager.js":1,"./dom.js":2,"./filter.js":3,"./sort.js":7,"./storage.js":8}],6:[function(require,module,exports){
class MediaViewer {
constructor(assets) {
this.assets = assets
this.index = 0
}
nextActive() {
this.index = this.index === this.assets.length - 1 ? 0 : this.index + 1
return [this.activeFile, this.index]
}
prevActive() {
this.index = this.index === 0 ? this.assets.length - 1 : this.index -1
return [this.activeFile, this.index]
}
get currentIndex() {
return this.index
}
get activeFile() {
return this.assets[this.index]
}
}
const setup = (resultBody, assets) => {
if (!assets.length) {
resultBody.querySelector('.media').classList.add('hidden')
return
}
const mediaViewer = new MediaViewer(assets)
const container = resultBody.querySelector('.media-container')
const leftArrow = resultBody.querySelector('.media-container__nav--left')
const rightArrow = resultBody.querySelector('.media-container__nav--right')
const mediaName = resultBody.querySelector('.media__name')
const counter = resultBody.querySelector('.media__counter')
const imageEl = resultBody.querySelector('img')
const sourceEl = resultBody.querySelector('source')
const videoEl = resultBody.querySelector('video')
const setImg = (media, index) => {
if (media?.format_type === 'image') {
imageEl.src = media.path
imageEl.classList.remove('hidden')
videoEl.classList.add('hidden')
} else if (media?.format_type === 'video') {
sourceEl.src = media.path
videoEl.classList.remove('hidden')
imageEl.classList.add('hidden')
}
mediaName.innerText = media?.name
counter.innerText = `${index + 1} / ${assets.length}`
}
setImg(mediaViewer.activeFile, mediaViewer.currentIndex)
const moveLeft = () => {
const [media, index] = mediaViewer.prevActive()
setImg(media, index)
}
const doRight = () => {
const [media, index] = mediaViewer.nextActive()
setImg(media, index)
}
const openImg = () => {
window.open(mediaViewer.activeFile.path, '_blank')
}
if (assets.length === 1) {
container.classList.add('media-container--fullscreen')
} else {
leftArrow.addEventListener('click', moveLeft)
rightArrow.addEventListener('click', doRight)
}
imageEl.addEventListener('click', openImg)
}
module.exports = {
setup,
}
},{}],7:[function(require,module,exports){
const { manager } = require('./datamanager.js')
const storageModule = require('./storage.js')
const genericSort = (list, key, ascending, customOrder) => {
let sorted
if (customOrder) {
sorted = list.sort((a, b) => {
const aValue = a.result.toLowerCase()
const bValue = b.result.toLowerCase()
const aIndex = customOrder.findIndex((item) => item.toLowerCase() === aValue)
const bIndex = customOrder.findIndex((item) => item.toLowerCase() === bValue)
// Compare the indices to determine the sort order
return aIndex - bIndex
})
} else {
sorted = list.sort((a, b) => a[key] === b[key] ? 0 : a[key] > b[key] ? 1 : -1)
}
if (ascending) {
sorted.reverse()
}
return sorted
}
const durationSort = (list, ascending) => {
const parseDuration = (duration) => {
if (duration.includes(':')) {
// If it's in the format "HH:mm:ss"
const [hours, minutes, seconds] = duration.split(':').map(Number)
return (hours * 3600 + minutes * 60 + seconds) * 1000
} else {
// If it's in the format "nnn ms"
return parseInt(duration)
}
}
const sorted = list.sort((a, b) => parseDuration(a['duration']) - parseDuration(b['duration']))
if (ascending) {
sorted.reverse()
}
return sorted
}
const doInitSort = () => {
const type = storageModule.getSort(manager.initialSort)
const ascending = storageModule.getSortDirection()
const list = manager.testSubset
const initialOrder = ['Error', 'Failed', 'Rerun', 'XFailed', 'XPassed', 'Skipped', 'Passed']
storageModule.setSort(type)
storageModule.setSortDirection(ascending)
if (type?.toLowerCase() === 'original') {
manager.setRender(list)
} else {
let sortedList
switch (type) {
case 'duration':
sortedList = durationSort(list, ascending)
break
case 'result':
sortedList = genericSort(list, type, ascending, initialOrder)
break
default:
sortedList = genericSort(list, type, ascending)
break
}
manager.setRender(sortedList)
}
}
const doSort = (type, skipDirection) => {
const newSortType = storageModule.getSort(manager.initialSort) !== type
const currentAsc = storageModule.getSortDirection()
let ascending
if (skipDirection) {
ascending = currentAsc
} else {
ascending = newSortType ? false : !currentAsc
}
storageModule.setSort(type)
storageModule.setSortDirection(ascending)
const list = manager.testSubset
const sortedList = type === 'duration' ? durationSort(list, ascending) : genericSort(list, type, ascending)
manager.setRender(sortedList)
}
module.exports = {
doInitSort,
doSort,
}
},{"./datamanager.js":1,"./storage.js":8}],8:[function(require,module,exports){
const possibleFilters = [
'passed',
'skipped',
'failed',
'error',
'xfailed',
'xpassed',
'rerun',
]
const getVisible = () => {
const url = new URL(window.location.href)
const settings = new URLSearchParams(url.search).get('visible')
const lower = (item) => {
const lowerItem = item.toLowerCase()
if (possibleFilters.includes(lowerItem)) {
return lowerItem
}
return null
}
return settings === null ?
possibleFilters :
[...new Set(settings?.split(',').map(lower).filter((item) => item))]
}
const hideCategory = (categoryToHide) => {
const url = new URL(window.location.href)
const visibleParams = new URLSearchParams(url.search).get('visible')
const currentVisible = visibleParams ? visibleParams.split(',') : [...possibleFilters]
const settings = [...new Set(currentVisible)].filter((f) => f !== categoryToHide).join(',')
url.searchParams.set('visible', settings)
window.history.pushState({}, null, unescape(url.href))
}
const showCategory = (categoryToShow) => {
if (typeof window === 'undefined') {
return
}
const url = new URL(window.location.href)
const currentVisible = new URLSearchParams(url.search).get('visible')?.split(',').filter(Boolean) ||
[...possibleFilters]
const settings = [...new Set([categoryToShow, ...currentVisible])]
const noFilter = possibleFilters.length === settings.length || !settings.length
noFilter ? url.searchParams.delete('visible') : url.searchParams.set('visible', settings.join(','))
window.history.pushState({}, null, unescape(url.href))
}
const getSort = (initialSort) => {
const url = new URL(window.location.href)
let sort = new URLSearchParams(url.search).get('sort')
if (!sort) {
sort = initialSort || 'result'
}
return sort
}
const setSort = (type) => {
const url = new URL(window.location.href)
url.searchParams.set('sort', type)
window.history.pushState({}, null, unescape(url.href))
}
const getCollapsedCategory = (renderCollapsed) => {
let categories
if (typeof window !== 'undefined') {
const url = new URL(window.location.href)
const collapsedItems = new URLSearchParams(url.search).get('collapsed')
switch (true) {
case !renderCollapsed && collapsedItems === null:
categories = ['passed']
break
case collapsedItems?.length === 0 || /^["']{2}$/.test(collapsedItems):
categories = []
break
case /^all$/.test(collapsedItems) || collapsedItems === null && /^all$/.test(renderCollapsed):
categories = [...possibleFilters]
break
default:
categories = collapsedItems?.split(',').map((item) => item.toLowerCase()) || renderCollapsed
break
}
} else {
categories = []
}
return categories
}
const getSortDirection = () => JSON.parse(sessionStorage.getItem('sortAsc')) || false
const setSortDirection = (ascending) => sessionStorage.setItem('sortAsc', ascending)
const getCollapsedIds = () => JSON.parse(sessionStorage.getItem('collapsedIds')) || []
const setCollapsedIds = (list) => sessionStorage.setItem('collapsedIds', JSON.stringify(list))
module.exports = {
getVisible,
hideCategory,
showCategory,
getCollapsedIds,
setCollapsedIds,
getSort,
setSort,
getSortDirection,
setSortDirection,
getCollapsedCategory,
possibleFilters,
}
},{}]},{},[4]);
</script>
</footer>
</html>