Skip to content

Commit

Permalink
feat(candidate): add new badge data test props and enhance status han…
Browse files Browse the repository at this point in the history
…dling
  • Loading branch information
ThomasDos committed Dec 20, 2024
1 parent e35e696 commit 8790c4a
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@ interface UseGetDossierDeValidationAutonomeTimelineInfo {
const EDITABLE_STATUSES = [
"DOSSIER_FAISABILITE_RECEVABLE",
"DOSSIER_DE_VALIDATION_SIGNALE",
"DEMANDE_FINANCEMENT_ENVOYE",
];

const ToCompleteBadge = <Badge severity="warning">À compléter</Badge>;
const ToCompleteBadge = (
<Badge
severity="warning"
data-test="dossier-de-validation-autonome-to-complete-badge"
>
À compléter
</Badge>
);

export function useGetDossierDeValidationAutonomeTimelineInfo(): UseGetDossierDeValidationAutonomeTimelineInfo {
const { candidacy } = useCandidacy();
Expand Down Expand Up @@ -64,7 +72,14 @@ export function useGetDossierDeValidationAutonomeTimelineInfo(): UseGetDossierDe
case isReadOnly:
return {
status: "readonly",
badge: <Badge severity="success">Envoyé</Badge>,
badge: (
<Badge
severity="success"
data-test="dossier-de-validation-autonome-sent-badge"
>
Envoyé
</Badge>
),
notice: (
<TimelineNotice
icon="fr-icon-info-fill"
Expand Down

0 comments on commit 8790c4a

Please sign in to comment.