Skip to content

Commit

Permalink
Merge pull request #174 from MTES-MCT/poll
Browse files Browse the repository at this point in the history
feat(polling): add polling 5min on mission timeline query
  • Loading branch information
lwih authored Jun 5, 2024
2 parents 349573b + 0e14f54 commit 78d3c72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ const crewList = [
]

describe('MissionCrewMemberList', () => {
it('should render Agent firstname, lastname', async () => {
it('should render Agent firstname lastname', async () => {
render(
<MissionCrewMemberList crewList={crewList} handleEditCrew={handleEditCrew} handleDeleteCrew={handleDeleteCrew} />
)
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 () => {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/pam/mission/timeline/use-mission-timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 78d3c72

Please sign in to comment.