style(web): satisfy biome on subscription page (format + a11y)

Run biome --write formatting on the subscription page + new tests, and
swap the trial-progress banner's role="status" for aria-live="polite"
(keeps the polite live-region announcement without tripping
lint/a11y/useSemanticElements).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-25 15:31:08 +03:00
parent 0bae337c69
commit 4ba06615a1
3 changed files with 4 additions and 12 deletions

View File

@@ -43,9 +43,7 @@ describe("TrialCtaCard value hook", () => {
});
test("pending state disables the CTA and shows loading label", () => {
const { getByText, container } = render(
<TrialCtaCard onStartTrial={vi.fn()} pending={true} />,
);
const { getByText, container } = render(<TrialCtaCard onStartTrial={vi.fn()} pending={true} />);
expect(getByText("common.loading")).toBeTruthy();
expect(container.querySelector("button")?.hasAttribute("disabled")).toBe(true);
});

View File

@@ -23,11 +23,7 @@ vi.mock("@/lib/posthog", () => ({
setPeopleProperties: vi.fn(),
}));
import {
BillingPeriodToggle,
PlanGrid,
plans,
} from "@/routes/dashboard/subscription/index";
import { BillingPeriodToggle, PlanGrid, plans } from "@/routes/dashboard/subscription/index";
describe("per-day price anchor (PlanGrid)", () => {
test("renders a per-day line on every plan card", () => {

View File

@@ -1026,9 +1026,7 @@ export function BillingPeriodToggle({
))}
</div>
{period === "yearly" && (
<p className="text-xs font-medium text-primary">
{t("subscription.yearlyFreeMonths")}
</p>
<p className="text-xs font-medium text-primary">{t("subscription.yearlyFreeMonths")}</p>
)}
</div>
);
@@ -1635,7 +1633,7 @@ export function TrialProgressBanner({
const pct = Math.round((elapsed / totalDays) * 100);
return (
<div
role="status"
aria-live="polite"
className="animate-fade-in-up flex flex-col gap-3 rounded-2xl border border-brand/25 bg-brand/5 px-5 py-4 sm:flex-row sm:items-center"
>
<div className="flex flex-1 items-start gap-3">