Skip to content

Commit

Permalink
Expand loadNotebooksContainingResource Storybook mock
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Nov 23, 2023
1 parent 3c1d2a4 commit 7a7a77b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 12 additions & 2 deletions frontend/src/mocks/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,17 @@ export const defaultMocks: Mocks = {
'/api/projects/:team_id/event_definitions/': EMPTY_PAGINATED_RESPONSE,
'/api/projects/:team_id/cohorts/': toPaginatedResponse([MOCK_DEFAULT_COHORT]),
'/api/projects/:team_id/dashboards/': EMPTY_PAGINATED_RESPONSE,
'/api/projects/@current/dashboard_templates/repository/': [],
'/api/projects/:team_id/dashboard_templates/repository/': [],
'/api/projects/:team_id/notebooks': () => {
// this was matching on `?contains=query` but that made MSW unhappy and seems unnecessary
return [
200,
{
count: 0,
results: [],
},
]
},
'/api/projects/:team_id/groups/': EMPTY_PAGINATED_RESPONSE,
'/api/projects/:team_id/groups_types/': [],
'/api/projects/:team_id/insights/': EMPTY_PAGINATED_RESPONSE,
Expand All @@ -44,7 +54,7 @@ export const defaultMocks: Mocks = {
} as SharingConfigurationType,
'/api/projects/:team_id/property_definitions/': EMPTY_PAGINATED_RESPONSE,
'/api/projects/:team_id/feature_flags/': EMPTY_PAGINATED_RESPONSE,
'api/projects/:team_id/feature_flags/:feature_flag_id/role_access': EMPTY_PAGINATED_RESPONSE,
'/api/projects/:team_id/feature_flags/:feature_flag_id/role_access': EMPTY_PAGINATED_RESPONSE,
'/api/projects/:team_id/experiments/': EMPTY_PAGINATED_RESPONSE,
'/api/projects/:team_id/explicit_members/': [],
'/api/organizations/@current/': (): MockSignature => [
Expand Down
10 changes: 0 additions & 10 deletions frontend/src/scenes/insights/Insights.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ const meta: Meta = {
'/api/projects/:team_id/persons/retention': sampleRetentionPeopleResponse,
'/api/projects/:team_id/persons/properties': samplePersonProperties,
'/api/projects/:team_id/groups_types': [],
'/api/projects/:team_id/notebooks': () => {
// this was matching on `?contains=query` but that made MSW unhappy and seems unnecessary
return [
200,
{
count: 0,
results: [],
},
]
},
},
post: {
'/api/projects/:team_id/cohorts/': { id: 1 },
Expand Down

0 comments on commit 7a7a77b

Please sign in to comment.