Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
revolunet committed Feb 9, 2024
1 parent 214bdcf commit 25779f6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 26 deletions.
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 />);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 25779f6

Please sign in to comment.