Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed event check in management not updating automatically bug #1062

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/CheckIn/CheckInModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import { ToastContainer } from 'react-toastify';
import { LocalizationProvider } from '@mui/x-date-pickers';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { checkInQueryMock } from './mocks';
import { StaticMockLink } from 'utils/StaticMockLink';

const link = new StaticMockLink(checkInQueryMock, true);

describe('Testing Check In Attendees Modal', () => {
const props = {
Expand All @@ -21,7 +24,7 @@ describe('Testing Check In Attendees Modal', () => {

test('The modal should be rendered, and all the fetched users should be shown properly and user filtering should work', async () => {
const { queryByText, queryByLabelText } = render(
<MockedProvider addTypename={false} mocks={checkInQueryMock}>
<MockedProvider addTypename={false} link={link}>
<BrowserRouter>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<Provider store={store}>
Expand Down
1 change: 1 addition & 0 deletions src/components/CheckIn/CheckInModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const CheckInModal = (props: InterfaceModalProp): JSX.Element => {
});

useEffect(() => {
checkInRefetch();
if (checkInLoading) setTableData([]);
else
setTableData(
Expand Down
5 changes: 4 additions & 1 deletion src/components/CheckIn/CheckInWrapper.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import { ToastContainer } from 'react-toastify';
import { LocalizationProvider } from '@mui/x-date-pickers';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { checkInQueryMock } from './mocks';
import { StaticMockLink } from 'utils/StaticMockLink';

const link = new StaticMockLink(checkInQueryMock, true);

describe('Testing CheckIn Wrapper', () => {
const props = {
Expand All @@ -19,7 +22,7 @@ describe('Testing CheckIn Wrapper', () => {

test('The button to open and close the modal should work properly', async () => {
const { queryByText } = render(
<MockedProvider addTypename={false} mocks={checkInQueryMock}>
<MockedProvider addTypename={false} link={link}>
<BrowserRouter>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<Provider store={store}>
Expand Down
Loading