Skip to content

chore(billing): Added snapshot tests for billing details widget(REVENG-245)#118260

Merged
krithikravi merged 2 commits into
masterfrom
krithikravi/billing-details-snapshot
Jun 23, 2026
Merged

chore(billing): Added snapshot tests for billing details widget(REVENG-245)#118260
krithikravi merged 2 commits into
masterfrom
krithikravi/billing-details-snapshot

Conversation

@krithikravi

Copy link
Copy Markdown
Member

https://linear.app/getsentry/issue/REVENG-245/add-snapshot-tests-to-billing-details-widget-and-enable-ci

This PR adds snapshot tests to cover multiple scenarios for the billing details widget on the subscription page, and integrates these snapshots with CI for automatic diffing.

@krithikravi krithikravi requested review from a team as code owners June 23, 2026 18:09
@linear-code

linear-code Bot commented Jun 23, 2026

Copy link
Copy Markdown

REVENG-245

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 23, 2026
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 93.79% 93.79% ±0%
Typed 132,971 132,976 🟢 +5
Untyped 8,797 8,801 🔴 +4
🔍 4 new type safety issues introduced

any-typed symbols (1 new)

File Line Detail
static/gsApp/components/billingDetails/panel.snapshots.tsx 85 name (param)

Non-null assertions (!) (1 new)

File Line Detail
static/gsApp/components/billingDetails/panel.snapshots.tsx 86 SCENARIOS[name]!

Type assertions (as) (2 new)

File Line Detail
static/gsApp/components/billingDetails/panel.snapshots.tsx 87 as ReturnType<typeof useBillingDetails>{ data: scenario.details, isLoading: false, isError: false, error: null, refetc…
static/gsApp/components/billingDetails/panel.snapshots.tsx 87 as unknown{ data: scenario.details, isLoading: false, isError: false, error: null, refetc…

This is informational only and does not block the PR.

</ThemeProvider>
);
},
name => ({tags: {area: 'billing', scenario: name}})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a strong preference, but you can probably omit scenario:name b/c it's just a dupe of the display name

'%s',
name => {
const scenario = SCENARIOS[name]!;
mockUseBillingDetails.mockReturnValue({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're using this a lot, you could make a centralized mock in tests/js/sentry-test/snapshots/mocks, but only if you're constantly mocking the same thing. We haven't set up anything for where shared domain-specific mocks would go, not sure it's needed in your use case

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will keep in mind as we add tests 👍🏽

@krithikravi krithikravi merged commit 6e59c80 into master Jun 23, 2026
77 checks passed
@krithikravi krithikravi deleted the krithikravi/billing-details-snapshot branch June 23, 2026 21:05
sehr-m pushed a commit that referenced this pull request Jun 23, 2026
…G-245) (#118260)

https://linear.app/getsentry/issue/REVENG-245/add-snapshot-tests-to-billing-details-widget-and-enable-ci

This PR adds snapshot tests to cover multiple scenarios for the billing
details widget on the subscription page, and integrates these snapshots
with CI for automatic diffing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants