Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tests #298

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: tests
revolunet committed Feb 9, 2024
commit 25779f6247ce4d974383d7858b6d496d3f789203
6 changes: 6 additions & 0 deletions report/www/src/__tests__/UpdownIoDashboard.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { render } from "@testing-library/react";
import UpdownIo from "../../pages/updownio";
import { vi } from "vitest";

const date = new Date(2021, 3, 6);

vi.useFakeTimers();
vi.setSystemTime(date);

it("Should render UpdownIo", () => {
const { container } = render(<UpdownIo />);
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ exports[`Should render UpdownIo 1`] = `
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 21/1/2024"
/>
16 jours
presque 3 ans
</span>
</div>
</h3>
@@ -190,7 +190,7 @@ exports[`Should render UpdownIo 1`] = `
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 21/1/2024"
/>
16 jours
presque 3 ans
</span>
</div>
</h3>
@@ -309,7 +309,7 @@ exports[`Should render UpdownIo 1`] = `
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 21/1/2024"
/>
16 jours
presque 3 ans
</span>
</div>
</h3>
@@ -428,7 +428,7 @@ exports[`Should render UpdownIo 1`] = `
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 21/1/2024"
/>
16 jours
presque 3 ans
</span>
</div>
</h3>
@@ -539,15 +539,15 @@ exports[`Should render UpdownIo 1`] = `
archifiltre.fabrique.social.gouv.fr
</a>
<span
class="fr-badge fr-badge--error fr-badge--no-icon"
class="fr-badge fr-badge--info fr-badge--no-icon"
id="fr-badge-:rj:"
style="vertical-align: middle; padding-left: 10px;"
>
<i
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 22/5/2022"
/>
plus d’un an
environ 1 an
</span>
</div>
</h3>
@@ -658,15 +658,15 @@ exports[`Should render UpdownIo 1`] = `
index-egapro.travail.gouv.fr
</a>
<span
class="fr-badge fr-badge--error fr-badge--no-icon"
class="fr-badge fr-badge--info fr-badge--no-icon"
id="fr-badge-:rn:"
style="vertical-align: middle; padding-left: 10px;"
>
<i
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 22/5/2022"
/>
plus d’un an
environ 1 an
</span>
</div>
</h3>
@@ -777,15 +777,15 @@ exports[`Should render UpdownIo 1`] = `
domifa.fabrique.social.gouv.fr
</a>
<span
class="fr-badge fr-badge--error fr-badge--no-icon"
class="fr-badge fr-badge--info fr-badge--no-icon"
id="fr-badge-:rr:"
style="vertical-align: middle; padding-left: 10px;"
>
<i
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 22/5/2022"
/>
plus d’un an
environ 1 an
</span>
</div>
</h3>
@@ -896,15 +896,15 @@ exports[`Should render UpdownIo 1`] = `
www.fabrique.social.gouv.fr
</a>
<span
class="fr-badge fr-badge--error fr-badge--no-icon"
class="fr-badge fr-badge--info fr-badge--no-icon"
id="fr-badge-:rv:"
style="vertical-align: middle; padding-left: 10px;"
>
<i
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 22/5/2022"
/>
plus d’un an
environ 1 an
</span>
</div>
</h3>
@@ -1015,15 +1015,15 @@ exports[`Should render UpdownIo 1`] = `
pjm.social.gouv.fr
</a>
<span
class="fr-badge fr-badge--error fr-badge--no-icon"
class="fr-badge fr-badge--info fr-badge--no-icon"
id="fr-badge-:r13:"
style="vertical-align: middle; padding-left: 10px;"
>
<i
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 22/5/2022"
/>
plus d’un an
environ 1 an
</span>
</div>
</h3>
@@ -1134,15 +1134,15 @@ exports[`Should render UpdownIo 1`] = `
tumeplay.fabrique.social.gouv.fr
</a>
<span
class="fr-badge fr-badge--error fr-badge--no-icon"
class="fr-badge fr-badge--info fr-badge--no-icon"
id="fr-badge-:r17:"
style="vertical-align: middle; padding-left: 10px;"
>
<i
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 22/5/2022"
/>
plus d’un an
environ 1 an
</span>
</div>
</h3>
@@ -1253,15 +1253,15 @@ exports[`Should render UpdownIo 1`] = `
1000jours.fabrique.social.gouv.fr
</a>
<span
class="fr-badge fr-badge--error fr-badge--no-icon"
class="fr-badge fr-badge--info fr-badge--no-icon"
id="fr-badge-:r1b:"
style="vertical-align: middle; padding-left: 10px;"
>
<i
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 22/5/2022"
/>
plus d’un an
environ 1 an
</span>
</div>
</h3>
@@ -1372,15 +1372,15 @@ exports[`Should render UpdownIo 1`] = `
1000jours-blues.fabrique.social.gouv.fr
</a>
<span
class="fr-badge fr-badge--error fr-badge--no-icon"
class="fr-badge fr-badge--info fr-badge--no-icon"
id="fr-badge-:r1f:"
style="vertical-align: middle; padding-left: 10px;"
>
<i
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 25/5/2022"
/>
plus d’un an
environ 1 an
</span>
</div>
</h3>
@@ -1491,15 +1491,15 @@ exports[`Should render UpdownIo 1`] = `
monpsy.sante.gouv.fr
</a>
<span
class="fr-badge fr-badge--error fr-badge--no-icon"
class="fr-badge fr-badge--info fr-badge--no-icon"
id="fr-badge-:r1j:"
style="vertical-align: middle; padding-left: 10px;"
>
<i
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 22/5/2022"
/>
plus d’un an
environ 1 an
</span>
</div>
</h3>
@@ -1610,15 +1610,15 @@ exports[`Should render UpdownIo 1`] = `
ressourcerie.fabrique.social.gouv.fr
</a>
<span
class="fr-badge fr-badge--error fr-badge--no-icon"
class="fr-badge fr-badge--info fr-badge--no-icon"
id="fr-badge-:r1n:"
style="vertical-align: middle; padding-left: 10px;"
>
<i
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 22/5/2022"
/>
plus d’un an
environ 1 an
</span>
</div>
</h3>
@@ -1762,15 +1762,15 @@ exports[`Should render UpdownIo 1`] = `
template.fabrique.social.gouv.fr
</a>
<span
class="fr-badge fr-badge--error fr-badge--no-icon"
class="fr-badge fr-badge--info fr-badge--no-icon"
id="fr-badge-:r1t:"
style="vertical-align: middle; padding-left: 10px;"
>
<i
class="fr-icon-time-fill fr-icon--sm fr-mr-1v"
title="Mis à jour le 22/5/2022"
/>
plus d’un an
environ 1 an
</span>
</div>
</h3>
Loading