Skip to content
Snippets Groups Projects
Commit 20a6a0d6 authored by Reinder Kraaij's avatar Reinder Kraaij :eye:
Browse files

add XXXX-XX-XX for datetime

parent 26d20c6e
No related branches found
No related tags found
1 merge request!1267Tmss code cleanup part 4
...@@ -1302,49 +1302,6 @@ exports[`Project Report Render With Contents Project Report renders correctly w ...@@ -1302,49 +1302,6 @@ exports[`Project Report Render With Contents Project Report renders correctly w
class="p-autocomplete-multiple-container p-component p-inputtext p-focus" class="p-autocomplete-multiple-container p-component p-inputtext p-focus"
data-pc-section="container" data-pc-section="container"
> >
<li
class="p-autocomplete-token p-highlight"
data-pc-section="token"
>
<span
class="p-autocomplete-token-label"
data-pc-section="tokenlabel"
>
Calibration
</span>
<svg
aria-hidden="true"
class="p-icon p-autocomplete-token-icon"
data-pc-section="removetokenicon"
fill="none"
height="14"
viewBox="0 0 14 14"
width="14"
xmlns="http://www.w3.org/2000/svg"
>
<g
clip-path="url(#pr_icon_clip_1)"
>
<path
clip-rule="evenodd"
d="M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z"
fill="currentColor"
fill-rule="evenodd"
/>
</g>
<defs>
<clippath
id="pr_icon_clip_1"
>
<rect
fill="white"
height="14"
width="14"
/>
</clippath>
</defs>
</svg>
</li>
<li <li
class="p-autocomplete-input-token" class="p-autocomplete-input-token"
data-pc-section="inputtoken" data-pc-section="inputtoken"
...@@ -1361,6 +1318,34 @@ exports[`Project Report Render With Contents Project Report renders correctly w ...@@ -1361,6 +1318,34 @@ exports[`Project Report Render With Contents Project Report renders correctly w
/> />
</li> </li>
</ul> </ul>
<svg
aria-hidden="true"
class="p-icon p-autocomplete-loader p-icon-spin"
data-pc-section="loadingicon"
fill="none"
height="14"
viewBox="0 0 14 14"
width="14"
xmlns="http://www.w3.org/2000/svg"
>
<g
clip-path="url(#undefined)"
>
<path
d="M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z"
fill="currentColor"
/>
</g>
<defs>
<clippath>
<rect
fill="white"
height="14"
width="14"
/>
</clippath>
</defs>
</svg>
</span> </span>
<label <label
class="col-lg-2 col-md-2 col-sm-12" class="col-lg-2 col-md-2 col-sm-12"
...@@ -1391,9 +1376,10 @@ exports[`Project Report Render With Contents Project Report renders correctly w ...@@ -1391,9 +1376,10 @@ exports[`Project Report Render With Contents Project Report renders correctly w
class="col-lg-2 col-md-1 col-sm-12" class="col-lg-2 col-md-1 col-sm-12"
> >
<button <button
class="p-button p-component p-button-primary p-button-generate p-button-icon-only" class="p-button p-component p-button-primary p-button-generate p-button-icon-only p-disabled"
data-pc-name="button" data-pc-name="button"
data-pc-section="root" data-pc-section="root"
disabled=""
> >
<span <span
class="p-button-icon p-c pi pi-check" class="p-button-icon p-c pi pi-check"
...@@ -1423,811 +1409,6 @@ exports[`Project Report Render With Contents Project Report renders correctly w ...@@ -1423,811 +1409,6 @@ exports[`Project Report Render With Contents Project Report renders correctly w
</button> </button>
</div> </div>
</div> </div>
<div>
<a
class="report-download-bar"
href="/"
style="color: rgb(20, 128, 72);"
title="Download Report Data in CSV format"
>
<i
class="fas fa-file-csv"
/>
</a>
<a
class="report-download-bar"
href="/"
style="color: rgb(242, 15, 0);"
title="Download Report as PDF"
>
<i
class="fas fa-file-pdf"
/>
</a>
<i
class="pi pi-print report-download-bar print-btn"
title="Print Report"
/>
</div>
<div>
<div
style="margin-bottom: 20px;"
>
<style>
@page { margin: 138px 72px 138px 72px !important; }
</style>
<div
class="report-div"
id="Calibration-report-div"
>
<div
id="Calibration-project-details"
>
<h2
style="text-align: center; margin-bottom: 25px;"
>
Report statistics for project Calibration
</h2>
<div
class="p-grid report-wrap"
>
<div
class="col-lg-3 col-md-4 col-sm-12"
>
<label>
Project Documentation
</label>
</div>
<div
class="col-lg-9 col-md-8 col-sm-12"
>
<a
href="https://support.astron.nl/jira"
rel="noreferrer"
target="_blank"
>
Link to Jira Ticket
</a>
</div>
<div
class="col-lg-3 col-md-4 col-sm-12"
>
<label>
Project statistics over the period
</label>
</div>
<div
class="col-lg-8 col-md-9 col-sm-12"
>
<span>
Jun 01 2023 - May 31 2024
</span>
</div>
<div
class="col-lg-3 col-md-4 col-sm-12"
>
<label>
Contact Project Friend
</label>
</div>
<div
class="col-lg-8 col-md-9 col-sm-12"
>
<span>
Man Kind
</span>
</div>
<div
class="col-lg-3 col-md-4 col-sm-12"
>
<label>
Awarded Observing Time(hours)
</label>
</div>
<div
class="col-lg-8 col-md-9 col-sm-12"
>
<span>
0.00
</span>
</div>
<div
class="col-lg-3 col-md-4 col-sm-12"
>
<label>
Awarded Processing Time(hours)
</label>
</div>
<div
class="col-lg-8 col-md-9 col-sm-12"
>
<span>
0.00
</span>
</div>
<div
class="col-lg-3 col-md-4 col-sm-12"
>
<label>
Awarded LTA Storage(TB)
</label>
</div>
<div
class="col-lg-8 col-md-9 col-sm-12"
>
<span>
109.95
</span>
</div>
<div
class="col-lg-3 col-md-4 col-sm-12"
>
<label>
Awarded Support Time(hours)
</label>
</div>
<div
class="col-lg-8 col-md-9 col-sm-12"
>
<span>
0.00
</span>
</div>
</div>
<div
class="resource-utilization"
id="Calibration-resource-utilization"
style="padding-top: 10px; padding-bottom: 10px;"
>
<canvas
height="10"
role="img"
width="50%"
/>
</div>
</div>
<div
class="su-details"
id="Calibration-su-details"
>
<label>
Scheduling Units of the project
</label>
<table
class="report-table"
>
<thead>
<tr>
<th>
SU Name & Link in TMSS
</th>
<th>
SU Status Failed / Success
</th>
<th>
SU Acceptance Failed / Success / Pending
</th>
<th>
SU Execution Date
</th>
<th>
Time Observed (hr)
</th>
<th>
Time Observed Incremental (hr)
</th>
<th>
Time left for Observing (hr)
</th>
<th>
Completed Observing Time(%)
</th>
<th>
Time Processed (hr)
</th>
<th>
Time Processed Incremental (hr)
</th>
<th>
Time left for Processing (hr)
</th>
<th>
Completed Processing Time(%)
</th>
<th>
LTA Ingest Date
</th>
<th>
Ingested Data Size(TB)
</th>
<th>
Used LTA Allocation (Incremental) (%)
</th>
<th>
SAS ID (Observations)
</th>
<th>
SAS ID (Pipelines)
</th>
</tr>
</thead>
<tbody>
<tr
style="border: 1px solid;"
>
<td>
<a
href="/schedulingunit/view/blueprint/3433"
target="_blank"
>
swlevel 3 test
</a>
</td>
<td>
processed
</td>
<td>
acceptance_pending
</td>
<td>
2023-08-01
</td>
<td>
0.08
</td>
<td>
0.08
</td>
<td>
-0.08
</td>
<td>
Infinity
</td>
<td>
0.09
</td>
<td>
0.09
</td>
<td>
-0.09
</td>
<td>
Infinity
</td>
<td />
<td>
0.00
</td>
<td>
0.00
</td>
<td>
2023804
</td>
<td>
2023806, 2023805
</td>
</tr>
<tr
style="border: 1px solid;"
>
<td>
<a
href="/schedulingunit/view/blueprint/3432"
target="_blank"
>
swlevel 3 test
</a>
</td>
<td>
cancelled
</td>
<td>
acceptance_pending
</td>
<td>
2023-08-01
</td>
<td />
<td />
<td />
<td />
<td>
0.00
</td>
<td>
0.09
</td>
<td>
-0.09
</td>
<td>
Infinity
</td>
<td />
<td>
0.00
</td>
<td>
0.00
</td>
<td>
2023799
</td>
<td>
2023800, 2023801
</td>
</tr>
<tr
style="border: 1px solid;"
>
<td>
<a
href="/schedulingunit/view/blueprint/3537"
target="_blank"
>
Holog test run B1.2
</a>
</td>
<td>
cancelled
</td>
<td>
acceptance_pending
</td>
<td>
2023-08-10
</td>
<td />
<td />
<td />
<td />
<td>
0.00
</td>
<td>
0.09
</td>
<td>
-0.09
</td>
<td>
Infinity
</td>
<td />
<td>
0.00
</td>
<td>
0.00
</td>
<td>
2024252
</td>
<td>
2024253
</td>
</tr>
<tr
style="border: 1px solid;"
>
<td>
<a
href="/schedulingunit/view/blueprint/3820"
target="_blank"
>
Holog test run D1
</a>
</td>
<td>
cancelled
</td>
<td>
acceptance_pending
</td>
<td>
Invalid date
</td>
<td />
<td />
<td />
<td />
<td>
0.07
</td>
<td>
0.16
</td>
<td>
-0.16
</td>
<td>
Infinity
</td>
<td />
<td>
0.00
</td>
<td>
0.00
</td>
<td>
2025506
</td>
<td>
2025509
</td>
</tr>
<tr
style="border: 1px solid;"
>
<td>
<a
href="/schedulingunit/view/blueprint/3726"
target="_blank"
>
Holog test run C2
</a>
</td>
<td>
cancelled
</td>
<td>
acceptance_pending
</td>
<td>
Invalid date
</td>
<td />
<td />
<td />
<td />
<td>
0.07
</td>
<td>
0.23
</td>
<td>
-0.23
</td>
<td>
Infinity
</td>
<td />
<td>
0.00
</td>
<td>
0.00
</td>
<td>
2025124
</td>
<td>
2025125
</td>
</tr>
<tr
style="border: 1px solid;"
>
<td>
<a
href="/schedulingunit/view/blueprint/3724"
target="_blank"
>
Holog test run C1
</a>
</td>
<td>
cancelled
</td>
<td>
acceptance_pending
</td>
<td>
Invalid date
</td>
<td />
<td />
<td />
<td />
<td>
0.00
</td>
<td>
0.23
</td>
<td>
-0.23
</td>
<td>
Infinity
</td>
<td />
<td>
0.00
</td>
<td>
0.00
</td>
<td>
2025119
</td>
<td>
2025120
</td>
</tr>
<tr
style="border: 1px solid;"
>
<td>
<a
href="/schedulingunit/view/blueprint/3536"
target="_blank"
>
Holog test run B1.1
</a>
</td>
<td>
cancelled
</td>
<td>
acceptance_pending
</td>
<td>
Invalid date
</td>
<td />
<td />
<td />
<td />
<td>
0.09
</td>
<td>
0.32
</td>
<td>
-0.32
</td>
<td>
Infinity
</td>
<td />
<td>
0.00
</td>
<td>
0.00
</td>
<td>
2024249
</td>
<td>
2024250
</td>
</tr>
<tr
style="border: 1px solid;"
>
<td>
<a
href="/schedulingunit/view/blueprint/3438"
target="_blank"
>
Holog test run A2.2
</a>
</td>
<td>
cancelled
</td>
<td>
acceptance_pending
</td>
<td>
Invalid date
</td>
<td />
<td />
<td />
<td />
<td>
0.00
</td>
<td>
0.32
</td>
<td>
-0.32
</td>
<td>
Infinity
</td>
<td />
<td>
0.00
</td>
<td>
0.00
</td>
<td>
2023820
</td>
<td>
2023821
</td>
</tr>
<tr
style="border: 1px solid;"
>
<td>
<a
href="/schedulingunit/view/blueprint/3437"
target="_blank"
>
Holog test run A2.1
</a>
</td>
<td>
cancelled
</td>
<td>
acceptance_pending
</td>
<td>
Invalid date
</td>
<td />
<td />
<td />
<td />
<td>
0.00
</td>
<td>
0.32
</td>
<td>
-0.32
</td>
<td>
Infinity
</td>
<td />
<td>
0.00
</td>
<td>
0.00
</td>
<td>
2023817
</td>
<td>
2023818
</td>
</tr>
<tr
style="border: 1px solid;"
>
<td>
<a
href="/schedulingunit/view/blueprint/3436"
target="_blank"
>
Holog test run A1.2
</a>
</td>
<td>
cancelled
</td>
<td>
acceptance_pending
</td>
<td>
Invalid date
</td>
<td />
<td />
<td />
<td />
<td>
0.00
</td>
<td>
0.32
</td>
<td>
-0.32
</td>
<td>
Infinity
</td>
<td />
<td>
0.00
</td>
<td>
0.00
</td>
<td>
2023814
</td>
<td>
2023815
</td>
</tr>
<tr
style="border: 1px solid;"
>
<td>
<a
href="/schedulingunit/view/blueprint/3435"
target="_blank"
>
Holog test run A1.1
</a>
</td>
<td>
cancelled
</td>
<td>
acceptance_pending
</td>
<td>
Invalid date
</td>
<td />
<td />
<td />
<td />
<td>
0.00
</td>
<td>
0.32
</td>
<td>
-0.32
</td>
<td>
Infinity
</td>
<td />
<td>
0.00
</td>
<td>
0.00
</td>
<td>
2023811
</td>
<td>
2023812
</td>
</tr>
</tbody>
</table>
</div>
<div
class="target-exposure"
id="Calibration-target-exposure"
style="padding-top: 10px; padding-bottom: 10px;"
>
<canvas
height="10"
role="img"
width="50%"
/>
</div>
</div>
</div>
</div>
<div />
</div> </div>
</DocumentFragment> </DocumentFragment>
`; `;
......
...@@ -88,12 +88,24 @@ describe('Project Report Render With Contents', () => { ...@@ -88,12 +88,24 @@ describe('Project Report Render With Contents', () => {
const csvanchorElement = component.container.querySelector('[title="Download Report Data in CSV format"]'); const csvanchorElement = component.container.querySelector('[title="Download Report Data in CSV format"]');
act( () => { fireEvent.click(csvanchorElement);}); act( () => { fireEvent.click(csvanchorElement);});
await waitFor(() => {
expect(component.container.querySelector('.p-autocomplete-loader')).toBeNull();
}, { timeout: 5000 });
const componentSnapshotAfterCsv = component.asFragment(); const componentSnapshotAfterCsv = component.asFragment();
expect(componentSnapshotAfterCsv).toMatchSnapshot("After CSV Generation"); expect(componentSnapshotAfterCsv).toMatchSnapshot("After CSV Generation");
cinstance.clearAll(); cinstance.clearAll();
await waitFor(() => {
expect(component.container.querySelector('.p-autocomplete-loader')).toBeNull();
}, { timeout: 5000 });
const componentSnapshotAfterClear = component.asFragment(); const componentSnapshotAfterClear = component.asFragment();
expect(componentSnapshotAfterClear).toMatchSnapshot("After Clear ALl"); expect(componentSnapshotAfterClear).toMatchSnapshot("After Clear ALl");
......
...@@ -18,6 +18,7 @@ import { MemoryRouter } from "react-router-dom"; ...@@ -18,6 +18,7 @@ import { MemoryRouter } from "react-router-dom";
import PermissionStackUtil from "../authenticate/permission.stack.handler"; import PermissionStackUtil from "../authenticate/permission.stack.handler";
import { SystemEventList } from "../routes/SystemEvent/system.event.list"; import { SystemEventList } from "../routes/SystemEvent/system.event.list";
import { giveConsistentNodes } from "../utils/test.helper";
...@@ -50,8 +51,7 @@ describe('Systen Event List ', () => { ...@@ -50,8 +51,7 @@ describe('Systen Event List ', () => {
it('System Event Renders correctly with data', async () => { it('System Event Renders correctly with data', async () => {
let { component } = await Renderist(); let { component } = await Renderist();
const componentSnapshot = component.asFragment(); expect(giveConsistentNodes(component.container.outerHTML)).toMatchSnapshot();
expect(componentSnapshot).toMatchSnapshot();
component.unmount(); component.unmount();
}); });
......
...@@ -56,6 +56,9 @@ export function giveConsistentNodes(html) { ...@@ -56,6 +56,9 @@ export function giveConsistentNodes(html) {
const htmlwithcheerio =load(html, { xmlMode: false }); const htmlwithcheerio =load(html, { xmlMode: false });
htmlwithcheerio('[data-rbd-drag-handle-context-id]').attr('rbd-drag-handle-context-id', 'X'); htmlwithcheerio('[data-rbd-drag-handle-context-id]').attr('rbd-drag-handle-context-id', 'X');
htmlwithcheerio('[datetime]').attr('datetime', 'X'); htmlwithcheerio('[datetime]').attr('datetime', 'X');
htmlwithcheerio('.notfixed-column-td-StartTime div').text('XXXX-XX-XX XXXX:XX:XX');
htmlwithcheerio('.notfixed-column-td-EndTime div').text('XXXX-XX-XX XXXX:XX:XX');
let result = htmlwithcheerio.html() let result = htmlwithcheerio.html()
const formattedHtml = beautify.html(result, { const formattedHtml = beautify.html(result, {
indent_size: 2, indent_size: 2,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment