fix(ui): fit the member budget prompt title on one line

This commit is contained in:
shrey kharbanda 2026-10-23 15:47:01 -07:00
parent 0e82841157
commit 0270b6bc5c
3 changed files with 4 additions and 6 deletions

View file

@ -45,7 +45,7 @@ describe("ResetMemberBudgetsDialog", () => {
const user = userEvent.setup();
const { onSave } = renderDialog(state("prompting", preview(2, 1)));
expect(screen.getByText("Apply the new $1,250.00 default to members with a custom budget?")).toBeInTheDocument();
expect(screen.getByText("Apply the $1,250.00 default to custom budgets?")).toBeInTheDocument();
expect(screen.getByRole("radio", { name: "Keep all custom budgets" })).toBeChecked();
await user.click(screen.getByRole("button", { name: "Save" }));

View file

@ -52,9 +52,7 @@ function BackfillChoice({ pending, busy, onSave, onDismiss }: BackfillChoiceProp
return (
<>
<DialogHeader>
<DialogTitle>
Apply the new ${formatNumberWithCommas(pending.newBudget, 2)} default to members with a custom budget?
</DialogTitle>
<DialogTitle>Apply the ${formatNumberWithCommas(pending.newBudget, 2)} default to custom budgets?</DialogTitle>
</DialogHeader>
<RadioGroup value={choice} onValueChange={(value) => setChoice(value as MemberBudgetBackfill)}>
{backfillOptions(pending.preview, pending.newBudget).map((option) => (

View file

@ -413,7 +413,7 @@ describe("TeamInfoView - member budget reset prompt", () => {
};
const savedBody = () => vi.mocked(networking.teamUpdateCall).mock.calls[0][1];
const promptTitle = "Apply the new $20.00 default to members with a custom budget?";
const promptTitle = "Apply the $20.00 default to custom budgets?";
beforeEach(() => {
seedDefaultMocks();
@ -514,7 +514,7 @@ describe("TeamInfoView - member budget reset prompt", () => {
await waitFor(() => expect(networking.teamUpdateCall).toHaveBeenCalledTimes(1));
expect(savedBody().team_member_budget).toBe(Number(value));
expect(savedBody()).not.toHaveProperty("team_member_budget_backfill");
expect(screen.queryByText(/default to members with a custom budget/)).not.toBeInTheDocument();
expect(screen.queryByText(/default to custom budgets/)).not.toBeInTheDocument();
});
it("dismisses a pending prompt when the selected team changes", async () => {