Skip to content

Conversation

@jasonyuezhang
Copy link
Owner


Copied from getsentry#102525
Original PR: getsentry#102525

@propel-test-bot
Copy link

Remove deprecatedRouterMocks from GroupHeader tests

The PR updates the static/app/views/issueDetails/header.spec.tsx test suite to the current routing test utilities. All legacy deprecatedRouterMocks and initializeOrg helpers are removed, with assertions rewritten to inspect router.location instead of spying on router.push. Net result is fewer mocks, clearer expectations, and alignment with the recommended testing pattern.

Key Changes

• Deleted initializeOrg import and deprecatedRouterMocks usage
• Refactored render() calls to destructure router and assert on router.location
• Introduced helper expectLocation() and constant baseUrl = '/mock-pathname/' for pathname checks
• Reduced reliance on router.push spies; removed hard-coded 'BASE_URL' strings

Affected Areas

static/app/views/issueDetails/header.spec.tsx (tests only)

This summary was automatically generated by @propel-code-bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants