Skip to content

Commit 4b7dd16

Browse files
NicolappsConvex, Inc.
authored andcommitted
Rename Spend limit → Disable threshold (#35335)
GitOrigin-RevId: ae05b0f55a87edb742173a4cc5d91f3025ce66ce
1 parent ad7e9be commit 4b7dd16

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

npm-packages/dashboard/src/components/billing/SpendingLimits.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export function SpendingLimits() {
200200
<SpendLimitInput
201201
formKey="spendingLimitDisableThresholdUsd"
202202
label="Limit usage spending to"
203-
accessibleInputLabel="Spend Limit"
203+
accessibleInputLabel="Disable Threshold"
204204
description={
205205
spendingLimitDisableThresholdUsd !== null && (
206206
<span className="mt-0.5 flex gap-1.5 text-content-warning">

npm-packages/dashboard/src/components/billing/SpendingLimitsForm.test.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe("SpendingLimitsForm", () => {
3131
await userEvent.click(spendLimitCheckbox);
3232
expect(spendLimitCheckbox).toBeChecked();
3333

34-
const spendLimitInput = screen.getByLabelText("Spend Limit");
34+
const spendLimitInput = screen.getByLabelText("Disable Threshold");
3535
await userEvent.clear(spendLimitInput);
3636
await userEvent.type(spendLimitInput, "0");
3737

@@ -72,7 +72,7 @@ describe("SpendingLimitsForm", () => {
7272
);
7373

7474
// Find the spend limit input
75-
const spendLimitInput = screen.getByLabelText("Spend Limit");
75+
const spendLimitInput = screen.getByLabelText("Disable Threshold");
7676

7777
// Enter a non-numeric value
7878
const nonNumericValue = "not a number";
@@ -114,7 +114,7 @@ describe("SpendingLimitsForm", () => {
114114
expect(warningThresholdCheckbox).toBeChecked();
115115

116116
// Enter two values that don’t match
117-
const spendLimitInput = screen.getByLabelText("Spend Limit");
117+
const spendLimitInput = screen.getByLabelText("Disable Threshold");
118118
await userEvent.clear(spendLimitInput);
119119
await userEvent.type(spendLimitInput, "100");
120120

@@ -147,7 +147,7 @@ describe("SpendingLimitsForm", () => {
147147
);
148148

149149
// Find the spend limit input
150-
const spendLimitInput = screen.getByLabelText("Spend Limit");
150+
const spendLimitInput = screen.getByLabelText("Disable Threshold");
151151

152152
// Enter a value less than the current spending
153153
await userEvent.type(spendLimitInput, "99");
@@ -173,7 +173,7 @@ describe("SpendingLimitsForm", () => {
173173
/>,
174174
);
175175

176-
const spendLimitInput = screen.getByLabelText("Spend Limit");
176+
const spendLimitInput = screen.getByLabelText("Disable Threshold");
177177
await userEvent.clear(spendLimitInput);
178178
await userEvent.type(spendLimitInput, "0");
179179
await userEvent.click(document.body);
@@ -230,7 +230,7 @@ describe("SpendingLimitsForm", () => {
230230
const spendLimitCheckbox = screen.getByLabelText("Limit usage spending to");
231231
await userEvent.click(spendLimitCheckbox);
232232
expect(spendLimitCheckbox).not.toBeChecked();
233-
expect(screen.getByLabelText("Spend Limit")).toBeDisabled();
233+
expect(screen.getByLabelText("Disable Threshold")).toBeDisabled();
234234

235235
const warningThresholdCheckbox = screen.getByLabelText(
236236
"Warn when spending exceeds",

npm-packages/dashboard/src/components/billing/SubscriptionOverview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export function SpendingLimitsSection({
215215
)}
216216
{currentSpendLimit.disableThresholdCents !== null && (
217217
<CostLabel
218-
label="Spending limit"
218+
label="Disable threshold"
219219
priceCents={currentSpendLimit.disableThresholdCents}
220220
tooltip={`If your usage exceeds ${currentSpendLimit.disableThresholdCents === 0 ? "the built-in limits of your plan" : "this amount"}, all your projects will be paused.`}
221221
/>

npm-packages/dashboard/src/components/teamSettings/AuditLogItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ function EntryAction({
536536
{previous.disableThresholdCents !==
537537
current.disableThresholdCents && (
538538
<SpendingLimitLine
539-
label="Spending limit"
539+
label="Disable threshold"
540540
tooltip="When your team exceeds this spending level, your projects will be disabled."
541541
previousValue={previous.disableThresholdCents}
542542
currentValue={current.disableThresholdCents}

0 commit comments

Comments
 (0)