Skip to content

Commit

Permalink
[Mission] Résolution d'un bug à l'enregistrement d'une mission (#910)
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 authored Oct 24, 2023
2 parents 349fc50 + fa688d4 commit d29fe0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ context('Mission', () => {
expect(request.body.missionTypes[0]).equal('SEA')
expect(request.body.missionTypes[1]).equal('LAND')
expect(request.body.controlUnits.length).equal(1)
expect(request.body.isClosed).to.be.false
const controlUnit = request.body.controlUnits[0]
expect(controlUnit.administration).equal('DIRM / DM')
expect(controlUnit.id).equal(10011)
Expand Down Expand Up @@ -132,6 +133,7 @@ context('Mission', () => {
cy.wait('@updateMission').then(({ request, response }) => {
expect(response && response.statusCode).equal(200)
expect(request.body.controlUnits[0].contact).equal(undefined)
expect(request.body.isClosed).to.be.true
})
cy.get('*[data-cy="SideWindowHeader-title"]').contains('Missions et contrôles')
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/features/missions/MissionForm/MissionForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function MissionForm({ id, isNewMission, selectedMission, setShouldValida

validateForm({ ...values, isClosed: false }).then(errors => {
if (_.isEmpty(errors)) {
dispatch(saveMission({ ...values, isClosed: true }))
dispatch(saveMission({ ...values, isClosed: false }))

return
}
Expand Down

0 comments on commit d29fe0c

Please sign in to comment.