Skip to content

Commit e372ef9

Browse files
fix(quota alert): design changes (#97569)
<img width="471" height="289" alt="Screenshot 2025-08-11 at 10 10 15 AM" src="https://github.com/user-attachments/assets/f7dfa877-0205-45a9-9ebb-3df40cd822a1" /> Closes https://linear.app/getsentry/issue/BIL-1193/billing-status-alert-design-changes Changes: - Removes yellow background - Removes animation - Checkbox changed to Dismiss button - Copy changes
1 parent f309777 commit e372ef9

File tree

2 files changed

+110
-110
lines changed

2 files changed

+110
-110
lines changed

static/gsApp/components/navBillingStatus.spec.tsx

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,15 @@ describe('PrimaryNavigationQuotaExceeded', function () {
121121
// doesn't show categories with <=1 reserved tier and no PAYG
122122
expect(
123123
screen.getByText(
124-
/Youve run out of errors, replays, spans, and continuous profile hours for this billing cycle./
124+
/You have used up your quota for errors, replays, spans, and continuous profile hours. Monitoring and new data for these features are paused until your quota resets./
125125
)
126126
).toBeInTheDocument();
127127
expect(screen.queryByText(/cron monitors/)).not.toBeInTheDocument();
128-
expect(screen.getByRole('checkbox')).not.toBeChecked();
128+
expect(
129+
screen.getByRole('button', {
130+
name: 'Dismiss alert for the rest of the billing cycle',
131+
})
132+
).toBeInTheDocument();
129133
});
130134

131135
it('should render for single category', async function () {
@@ -147,9 +151,15 @@ describe('PrimaryNavigationQuotaExceeded', function () {
147151

148152
expect(await screen.findByText('Error Quota Exceeded')).toBeInTheDocument();
149153
expect(
150-
screen.getByText(/Youve run out of errors for this billing cycle./)
154+
screen.getByText(
155+
/You have used up your quota for errors. Monitoring and new data are paused until your quota resets./
156+
)
151157
).toBeInTheDocument(); // doesn't show categories with <=1 reserved tier and no PAYG
152-
expect(screen.getByRole('checkbox')).not.toBeChecked();
158+
expect(
159+
screen.getByRole('button', {
160+
name: 'Dismiss alert for the rest of the billing cycle',
161+
})
162+
).toBeInTheDocument();
153163
});
154164

155165
it('should not render for zero categories', function () {
@@ -183,10 +193,17 @@ describe('PrimaryNavigationQuotaExceeded', function () {
183193
expect(await screen.findByText('Quotas Exceeded')).toBeInTheDocument();
184194
expect(
185195
screen.getByText(
186-
/Youve run out of errors, replays, spans, cron monitors, and continuous profile hours for this billing cycle./
196+
/You have used up your quota for errors, replays, spans, and continuous profile hours./
187197
)
188198
).toBeInTheDocument();
189-
expect(screen.getByRole('checkbox')).not.toBeChecked();
199+
expect(
200+
screen.getByText(/You have also reached your quota for cron monitors./)
201+
).toBeInTheDocument();
202+
expect(
203+
screen.getByRole('button', {
204+
name: 'Dismiss alert for the rest of the billing cycle',
205+
})
206+
).toBeInTheDocument();
190207

191208
// reset
192209
subscription.onDemandMaxSpend = 0;
@@ -213,10 +230,17 @@ describe('PrimaryNavigationQuotaExceeded', function () {
213230
expect(await screen.findByText('Quotas Exceeded')).toBeInTheDocument();
214231
expect(
215232
screen.getByText(
216-
/Youve run out of errors, replays, spans, cron monitors, and continuous profile hours for this billing cycle./
233+
/You have used up your quota for errors, replays, spans, and continuous profile hours./
217234
)
218235
).toBeInTheDocument();
219-
expect(screen.getByRole('checkbox')).not.toBeChecked();
236+
expect(
237+
screen.getByText(/You have also reached your quota for cron monitors./)
238+
).toBeInTheDocument();
239+
expect(
240+
screen.getByRole('button', {
241+
name: 'Dismiss alert for the rest of the billing cycle',
242+
})
243+
).toBeInTheDocument();
220244

221245
// reset
222246
subscription.onDemandMaxSpend = 0;
@@ -236,15 +260,19 @@ describe('PrimaryNavigationQuotaExceeded', function () {
236260
subscription.canSelfServe = true;
237261
});
238262

239-
it('should update prompts when checkbox is toggled', async function () {
263+
it('should update prompts when dismissed', async function () {
240264
render(<PrimaryNavigationQuotaExceeded organization={organization} />);
241265

242266
// open the alert
243267
await userEvent.click(await screen.findByRole('button', {name: 'Billing Status'}));
244268
expect(await screen.findByText('Quotas Exceeded')).toBeInTheDocument();
245269

246270
// stop the alert from animating
247-
await userEvent.click(screen.getByRole('checkbox'));
271+
await userEvent.click(
272+
screen.getByRole('button', {
273+
name: 'Dismiss alert for the rest of the billing cycle',
274+
})
275+
);
248276
expect(promptMock).toHaveBeenCalledTimes(4); // one for each category
249277
});
250278

0 commit comments

Comments
 (0)