feat(FN-257): remove duplicated plan names and popular badge from FeatureMatrix table headers (+1 more)

Commits merged:
- fix(FN-257): update test assertions for non-duplicated FeatureMatrix text
- fix(FN-257): remove duplicated plan names and popular badge from FeatureMatrix table headers

Files changed:
apps/web/src/routes/dashboard/subscription/index.test.tsx | 10 ++++------
 apps/web/src/routes/dashboard/subscription/index.tsx      | 10 ++--------
 2 files changed, 6 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-257
This commit is contained in:
Fusion
2026-05-12 20:13:06 +00:00
parent 2907008c9d
commit 441be751c7
2 changed files with 6 additions and 14 deletions

View File

@@ -286,8 +286,7 @@ describe("P0-1 / P0-2 — Plan card rendering", () => {
test("P0-2: brand2 card has Popüler badge (visual dominance indicator)", async () => {
apiGet.mockResolvedValue(fixtures.noSub);
renderWithProviders(<SubscriptionPage />);
// "Popüler" appears in both plan card badge and feature matrix table header
await waitFor(() => expect(screen.getAllByText("Popüler").length).toBeGreaterThanOrEqual(2));
await waitFor(() => expect(screen.getAllByText("Popüler").length).toBeGreaterThanOrEqual(1));
});
test("full plan shows allBrands feature; brand1 does not", async () => {
@@ -543,11 +542,10 @@ describe("Accessibility", () => {
test("popular plan is identifiable by text (Popüler badge), not just color", async () => {
apiGet.mockResolvedValue(fixtures.noSub);
renderWithProviders(<SubscriptionPage />);
// "Popüler" appears in both plan card badge and feature matrix table header
await waitFor(() => expect(screen.getAllByText("Popüler").length).toBeGreaterThanOrEqual(2));
await waitFor(() => expect(screen.getAllByText("Popüler").length).toBeGreaterThanOrEqual(1));
// Verify the badge elements are present (two instances expected)
// Verify the badge element is present
const popularBadges = screen.getAllByText("Popüler");
expect(popularBadges.length).toBeGreaterThanOrEqual(2);
expect(popularBadges.length).toBeGreaterThanOrEqual(1);
});
});

View File

@@ -875,14 +875,8 @@ function FeatureMatrix() {
className={`relative px-4 py-3 text-center font-semibold ${
plan.popular ? "text-primary" : "text-foreground"
}`}
>
{plan.popular && (
<Badge className="absolute -top-3 left-1/2 -translate-x-1/2 text-[10px]">
{t("subscription.popular")}
</Badge>
)}
{t(`subscription.plans.${plan.key}.name`)}
</th>
aria-label={t(`subscription.plans.${plan.key}.name`)}
/>
))}
</tr>
</thead>