Skip to content
Merged
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
15 changes: 7 additions & 8 deletions static/app/components/events/eventReplay/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import type {RawReplayError} from 'sentry/utils/replays/types';

jest.mock('sentry/utils/replays/hooks/useReplayOnboarding');
jest.mock('sentry/utils/replays/hooks/useLoadReplayReader');
jest.mock('sentry/utils/replays/hooks/useReplayOnboarding');
// Replay clip preview is very heavy, mock it out
jest.mock(
'sentry/components/events/eventReplay/replayClipPreview',
Expand All @@ -30,6 +29,12 @@ jest.mock(
return <div data-test-id="replay-clip" />;
}
);
jest.mock('sentry/components/events/eventReplay/replayInlineOnboardingPanel', () => ({
__esModule: true,
default: function MockReplayOnboardingPanel() {
return <div data-test-id="replay-inline-onboarding" />;
},
}));

const mockEventTimestamp = new Date('2022-09-22T16:59:41Z');
const mockReplayId = '761104e184c64d439ee1014b72b4d83b';
Expand Down Expand Up @@ -136,15 +141,9 @@ describe('EventReplay', () => {
MockUseReplayOnboardingSidebarPanel.mockReturnValue({
activateSidebar: jest.fn(),
});
MockApiClient.addMockResponse({
url: '/organizations/org-slug/prompts-activity/',
body: {data: {dismissed_ts: null}},
});
render(<EventReplay {...defaultProps} />, {organization});

expect(
await screen.findByText('Watch the errors and latency issues your users face')
).toBeInTheDocument();
expect(await screen.findByTestId('replay-inline-onboarding')).toBeInTheDocument();
});

it('should render a replay when there is a replayId from tags', async () => {
Expand Down
Loading