From 8b2d90913d43a8c9ed0920561293a52b278d057b Mon Sep 17 00:00:00 2001 From: lwih Date: Tue, 4 Jun 2024 17:43:17 +0200 Subject: [PATCH 1/2] feat(polling): add polling 5min on mission timeline query --- frontend/src/pam/mission/timeline/use-mission-timeline.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/pam/mission/timeline/use-mission-timeline.tsx b/frontend/src/pam/mission/timeline/use-mission-timeline.tsx index e80b3241f..322fc2468 100644 --- a/frontend/src/pam/mission/timeline/use-mission-timeline.tsx +++ b/frontend/src/pam/mission/timeline/use-mission-timeline.tsx @@ -114,7 +114,8 @@ const useGetMissionTimeline = ( error?: ApolloError } => { const { loading, error, data } = useQuery(GET_MISSION_TIMELINE, { - variables: { missionId } + variables: { missionId }, + pollInterval: 500000 // 5 min }) if (!missionId) { From 0e14f54ce192f10aa7fb760e720e8fcda8bd3c75 Mon Sep 17 00:00:00 2001 From: lwih Date: Wed, 5 Jun 2024 12:43:22 +0200 Subject: [PATCH 2/2] fix(tests): fix test for mission crew list --- .../src/pam/mission/crew/mission-crew-member-list.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/pam/mission/crew/mission-crew-member-list.test.tsx b/frontend/src/pam/mission/crew/mission-crew-member-list.test.tsx index aaf23c0b6..b913c7107 100644 --- a/frontend/src/pam/mission/crew/mission-crew-member-list.test.tsx +++ b/frontend/src/pam/mission/crew/mission-crew-member-list.test.tsx @@ -37,12 +37,12 @@ const crewList = [ ] describe('MissionCrewMemberList', () => { - it('should render Agent firstname, lastname', async () => { + it('should render Agent firstname lastname', async () => { render( ) - expect(screen.getByText('Ivan, Lapierre')).toBeInTheDocument() - expect(screen.getByText('Joseph, Dupont')).toBeInTheDocument() + expect(screen.getByText('Ivan Lapierre')).toBeInTheDocument() + expect(screen.getByText('Joseph Dupont')).toBeInTheDocument() }) it('should render comment and active comment icon', async () => {