Skip to content

Commit

Permalink
[FIX] e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
maximeperrault committed Jun 18, 2024
1 parent ac08408 commit 0844ec8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ context('Reportings', () => {
Cypress.env('CYPRESS_REPORTING_FORM_AUTO_SAVE_ENABLED', 'true')
}
})
cy.intercept('GET', '/bff/v1/rhe mission form Should be updated When a miportings*').as('getReportings')
cy.intercept('GET', '/bff/v1/reportings*').as('getReportings')
cy.clickButton('Signalements')
cy.wait('@getReportings')
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function ControlForm({
}: {
currentActionId: string
removeControlAction: () => void
setCurrentActionId: (string) => void
setCurrentActionId: (actionId: string | undefined) => void
}) {
const {
errors,
Expand All @@ -72,7 +72,7 @@ export function ControlForm({

const { actionsMissingFields } = useMissionAndActionsCompletion()

const envActionIndex = envActions.findIndex(envAction => envAction.id === String(currentActionId))
const envActionIndex = envActions.findIndex(envAction => envAction.id === currentActionId)
const currentAction = envActions[envActionIndex]
const actionDate =
envActions[envActionIndex]?.actionStartDateTimeUtc ?? (startDateTimeUtc || new Date().toISOString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function NoteForm({ currentActionId, remove, setCurrentActionId }) {
setFieldValue,
values: { envActions }
} = useFormikContext<Mission<EnvActionNote>>()
const envActionIndex = actionsFields.value.findIndex(envAction => envAction.id === String(currentActionId))
const envActionIndex = actionsFields.value.findIndex(envAction => envAction.id === currentActionId)
const currentAction = envActions[envActionIndex]

const handleRemoveAction = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function SurveillanceForm({ currentActionId, remove, setCurrentActionId }
const { actionsMissingFields } = useMissionAndActionsCompletion()

const [actionsFields] = useField<EnvAction[]>('envActions')
const envActionIndex = actionsFields.value.findIndex(envAction => envAction.id === String(currentActionId))
const envActionIndex = actionsFields.value.findIndex(envAction => envAction.id === currentActionId)
const currentAction = envActions[envActionIndex]

const actionDate = envActions[envActionIndex]?.actionStartDateTimeUtc ?? startDateTimeUtc ?? new Date().toISOString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export function ActionsTimeLine({ currentActionId, setCurrentActionId }) {
hasError={!!envActionsErrors}
removeAction={() => handleRemoveAction(action.id)}
selectAction={() => handleSelectAction(action.id)}
selected={String(action.id) === String(currentActionId)}
selected={String(action.id) === currentActionId}
setCurrentActionId={setCurrentActionId}
/>
)
Expand Down

0 comments on commit 0844ec8

Please sign in to comment.