diff --git a/frontend/src/lib/pages/Portfolio.svelte b/frontend/src/lib/pages/Portfolio.svelte index 336f27448fc..e805871faf3 100644 --- a/frontend/src/lib/pages/Portfolio.svelte +++ b/frontend/src/lib/pages/Portfolio.svelte @@ -47,6 +47,9 @@ let showNoNeuronsCard: boolean; $: showNoNeuronsCard = !$authSignedInStore || totalStakedInUsd === 0; + + // The Card should display a Primary Action when it is the only available option. + // This occurs when there are tokens but no stake. let hasNoNeuronsCardAPrimaryAction: boolean; $: hasNoNeuronsCardAPrimaryAction = !showNoTokensCard; diff --git a/frontend/src/tests/lib/pages/Portfolio.spec.ts b/frontend/src/tests/lib/pages/Portfolio.spec.ts index 58c229ec5fb..a52fdace04d 100644 --- a/frontend/src/tests/lib/pages/Portfolio.spec.ts +++ b/frontend/src/tests/lib/pages/Portfolio.spec.ts @@ -92,7 +92,6 @@ describe("Portfolio page", () => { const po = renderPage({ userTokensData: [token] }); expect(await po.getNoTokensCard().isPresent()).toBe(false); - // There is one token with a balance of 2$ expect(await po.getUsdValueBannerPo().getPrimaryAmount()).toBe("$2.00"); }); }); @@ -113,7 +112,6 @@ describe("Portfolio page", () => { const po = renderPage({ tableProjects: [tableProject] }); expect(await po.getNoNeuronsCarPo().isPresent()).toBe(false); - // There is one token with a balance of 2$ expect(await po.getUsdValueBannerPo().getPrimaryAmount()).toBe("$2.00"); });