Skip to content

Commit

Permalink
fix other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper committed Sep 27, 2024
1 parent 964795d commit 01c206f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions static/app/views/issueDetails/streamline/header.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {LocationFixture} from 'sentry-fixture/locationFixture';
import {OrganizationFixture} from 'sentry-fixture/organization';
import {ProjectFixture} from 'sentry-fixture/project';
import {ReleaseFixture} from 'sentry-fixture/release';
import {RouterFixture} from 'sentry-fixture/routerFixture';
import {TeamFixture} from 'sentry-fixture/team';
import {UserFixture} from 'sentry-fixture/user';

Expand Down Expand Up @@ -32,7 +33,9 @@ describe('UpdatedGroupHeader', () => {
teams: [TeamFixture()],
});
const group = GroupFixture({issueCategory: IssueCategory.ERROR, isUnhandled: true});
const location = LocationFixture({query: {streamline: '1'}});
const router = RouterFixture({
location: LocationFixture({query: {streamline: '1'}}),
});

describe('JS Project Error Issue', () => {
const defaultProps = {
Expand Down Expand Up @@ -109,7 +112,7 @@ describe('UpdatedGroupHeader', () => {
/>,
{
organization,
router: {location},
router,
}
);

Expand Down Expand Up @@ -159,7 +162,7 @@ describe('UpdatedGroupHeader', () => {
<StreamlinedGroupHeader {...defaultProps} group={group} project={project} />,
{
organization,
router: {location},
router,
}
);
expect(
Expand All @@ -180,7 +183,7 @@ describe('UpdatedGroupHeader', () => {
<StreamlinedGroupHeader {...defaultProps} group={group} project={project} />,
{
organization: flaggedOrganization,
router: {location},
router,
}
);
expect(
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/issueDetails/useGroupDetailsRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function getCurrentTab({router}: {router: RouteProps['router']}) {
return Tab.TAGS;
}
return (
Object.values(Tab).find(tab => currentRoute.path === TabPaths[tab]) ?? Tab.DETAILS
Object.values(Tab).find(tab => currentRoute?.path === TabPaths[tab]) ?? Tab.DETAILS
);
}

Expand Down

0 comments on commit 01c206f

Please sign in to comment.