Skip to content

Commit

Permalink
♻️ fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
michellewzhang committed Aug 27, 2024
1 parent 052f806 commit 7f119be
Showing 1 changed file with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const mockGroupApis = (
project: Project,
group: Group,
event: Event,
replayId: string | undefined,
replayId?: string,
trace?: QuickTraceEvent
) => {
MockApiClient.addMockResponse({
Expand Down Expand Up @@ -364,7 +364,7 @@ describe('groupEventDetails', () => {

it('redirects on switching to an invalid environment selection for event', async function () {
const props = makeDefaultMockData();
mockGroupApis(props.organization, props.project, props.group, props.event, undefined);
mockGroupApis(props.organization, props.project, props.group, props.event);

const {rerender} = render(<TestComponent {...props} />);
expect(browserHistory.replace).not.toHaveBeenCalled();
Expand All @@ -376,7 +376,7 @@ describe('groupEventDetails', () => {

it('does not redirect when switching to a valid environment selection for event', async function () {
const props = makeDefaultMockData();
mockGroupApis(props.organization, props.project, props.group, props.event, undefined);
mockGroupApis(props.organization, props.project, props.group, props.event);

const {rerender} = render(<TestComponent {...props} />);

Expand All @@ -403,8 +403,7 @@ describe('groupEventDetails', () => {
tags: [{key: 'environment', value: 'dev'}],
previousEventID: 'prev-event-id',
nextEventID: 'next-event-id',
}),
undefined
})
);

render(<TestComponent event={undefined} eventError />);
Expand Down Expand Up @@ -436,8 +435,7 @@ describe('groupEventDetails', () => {
tags: [{key: 'environment', value: 'dev'}],
previousEventID: 'prev-event-id',
nextEventID: 'next-event-id',
}),
undefined
})
);

render(<TestComponent group={group} event={transaction} />, {
Expand Down Expand Up @@ -485,8 +483,7 @@ describe('groupEventDetails', () => {
tags: [{key: 'environment', value: 'dev'}],
previousEventID: 'prev-event-id',
nextEventID: 'next-event-id',
}),
undefined
})
);

render(<TestComponent group={group} event={transaction} />, {});
Expand All @@ -505,7 +502,7 @@ describe('groupEventDetails', () => {

it('renders event tags ui', async () => {
const props = makeDefaultMockData();
mockGroupApis(props.organization, props.project, props.group, props.event, undefined);
mockGroupApis(props.organization, props.project, props.group, props.event);
render(<TestComponent group={props.group} event={props.event} />, {});

expect(await screen.findByText('Event ID:')).toBeInTheDocument();
Expand Down Expand Up @@ -552,8 +549,7 @@ describe('EventCause', () => {
tags: [{key: 'environment', value: 'dev'}],
previousEventID: 'prev-event-id',
nextEventID: 'next-event-id',
}),
undefined
})
);

MockApiClient.addMockResponse({
Expand Down Expand Up @@ -613,8 +609,7 @@ describe('Platform Integrations', () => {
tags: [{key: 'environment', value: 'dev'}],
previousEventID: 'prev-event-id',
nextEventID: 'next-event-id',
}),
undefined
})
);

const component = SentryAppComponentFixture({
Expand Down

0 comments on commit 7f119be

Please sign in to comment.