feat: polish stock position cards

This commit is contained in:
2026-08-26 11:40:36 +03:00
parent 1fd9a3a861
commit 273778c4cf
5 changed files with 129 additions and 10 deletions
+30
View File
@@ -214,6 +214,36 @@ describe("AccountPage states", () => {
expect(screen.queryByRole("img", { name: "Абра" })).not.toBeInTheDocument();
});
it("groups stock supporting metrics into quiet single lines", () => {
renderPage(
<AccountPageLoaded
{...loadedProps({
...portfolio,
positions: [
{
figi: "FIGI-QUIET",
displayName: "Тихая акция",
type: "STOCK",
quantity: "2",
currentValue: { currency: "RUB", value: "10" },
averagePurchasePrice: { currency: "RUB", value: "11" },
absoluteReturn: { currency: "RUB", value: "3" },
isin: "RU000QUIET1",
logoName: null,
},
],
})}
/>,
);
expect(screen.getByText("Количество: 2 · RU000QUIET1")).not.toHaveAttribute(
"data-line-clamp",
);
expect(
screen.getByText("Средняя цена: 11 ₽ · Доля: 100 %"),
).toBeInTheDocument();
});
it("renders bond cards with logo, fallback, and signed unlabeled return like stocks", () => {
renderPage(
<AccountPageLoaded