-
-
Notifications
You must be signed in to change notification settings - Fork 811
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added test for eventstats and eventattendance
- Loading branch information
Showing
8 changed files
with
498 additions
and
554 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
src/components/EventManagement/EventAttendance/Attendance.mocks.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { EVENT_ATTENDEES } from 'GraphQl/Queries/Queries'; | ||
|
||
export const MOCKS = [ | ||
{ | ||
request: { | ||
query: EVENT_ATTENDEES, | ||
variables: {}, // Removed id since it's not required based on error | ||
}, | ||
result: { | ||
data: { | ||
event: { | ||
attendees: [ | ||
{ | ||
_id: '6589386a2caa9d8d69087484', | ||
firstName: 'Bruce', | ||
lastName: 'Garza', | ||
gender: null, | ||
birthDate: null, | ||
createdAt: '2023-04-13T10:23:17.742', | ||
eventsAttended: [ | ||
{ | ||
__typename: 'Event', | ||
_id: '660fdf7d2c1ef6c7db1649ad', | ||
}, | ||
{ | ||
__typename: 'Event', | ||
_id: '660fdd562c1ef6c7db1644f7', | ||
}, | ||
], | ||
__typename: 'User', | ||
}, | ||
{ | ||
_id: '6589386a2caa9d8d69087485', | ||
firstName: 'Jane', | ||
lastName: 'Smith', | ||
gender: null, | ||
birthDate: null, | ||
createdAt: '2023-04-13T10:23:17.742', | ||
eventsAttended: [ | ||
{ | ||
__typename: 'Event', | ||
_id: '660fdf7d2c1ef6c7db1649ad', | ||
}, | ||
], | ||
__typename: 'User', | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
]; | ||
|
||
export const MOCKS_ERROR = [ | ||
{ | ||
request: { | ||
query: EVENT_ATTENDEES, | ||
variables: {}, | ||
}, | ||
error: new Error('An error occurred'), | ||
}, | ||
]; |
Oops, something went wrong.