-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: less flappy recordings stories hopefully
- Loading branch information
1 parent
8dcea1f
commit eac462d
Showing
3 changed files
with
53 additions
and
11 deletions.
There are no files selected for viewing
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
48 changes: 48 additions & 0 deletions
48
frontend/src/scenes/session-recordings/SessionsRecordings-playlist-listing.stories.tsx
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,48 @@ | ||
import { Meta } from '@storybook/react' | ||
import { useEffect } from 'react' | ||
import { mswDecorator } from '~/mocks/browser' | ||
import { router } from 'kea-router' | ||
import { urls } from 'scenes/urls' | ||
import { App } from 'scenes/App' | ||
import recording_playlists from './__mocks__/recording_playlists.json' | ||
import { ReplayTabs } from '~/types' | ||
import recordings from 'scenes/session-recordings/__mocks__/recordings.json' | ||
import recordingEventsJson from 'scenes/session-recordings/__mocks__/recording_events_query' | ||
|
||
const meta: Meta = { | ||
title: 'Scenes-App/Recordings', | ||
parameters: { | ||
layout: 'fullscreen', | ||
viewMode: 'story', | ||
mockDate: '2023-02-01', | ||
}, | ||
decorators: [ | ||
mswDecorator({ | ||
get: { | ||
'/api/projects/:team_id/session_recording_playlists': recording_playlists, | ||
'/api/projects/:team_id/session_recordings': (req) => { | ||
const version = req.url.searchParams.get('version') | ||
return [ | ||
200, | ||
{ | ||
has_next: false, | ||
results: recordings, | ||
version, | ||
}, | ||
] | ||
}, | ||
}, | ||
post: { | ||
'/api/projects/:team/query': recordingEventsJson, | ||
}, | ||
}), | ||
], | ||
} | ||
export default meta | ||
|
||
export function RecordingsPlayLists(): JSX.Element { | ||
useEffect(() => { | ||
router.actions.push(urls.replay(ReplayTabs.Playlists)) | ||
}, []) | ||
return <App /> | ||
} |
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