From 451400b63be0011a7a3b4dfd77e9365f7bcca467 Mon Sep 17 00:00:00 2001 From: Sergey Krylov Date: Wed, 9 Sep 2026 17:58:02 +0300 Subject: [PATCH] feat: unify upcoming event cards across pages --- .../broker-operation/ui/LedgerEntryRow.tsx | 43 ++----- .../api/useBrokerageEvents.test.tsx | 2 + src/entities/brokerage-event/index.ts | 5 + .../brokerage-event/ui/BrokerageEventCard.tsx | 45 ++++++++ .../ui/BrokerageEventsPreview.stories.tsx} | 29 ++++- .../ui/BrokerageEventsPreview.tsx} | 40 ++----- .../ui/AccountEventsPage.test.tsx | 28 ++++- .../ui/components/AccountEventRow.view.tsx | 44 -------- .../AccountEventsPageLoaded.view.tsx | 20 ++-- src/pages/account/ui/AccountPage.test.tsx | 105 ++++++++++++++++++ src/pages/account/ui/AccountPage.vm.ts | 13 +-- .../ui/components/AccountPageEmpty.view.tsx | 4 +- .../ui/components/AccountPageLoaded.view.tsx | 4 +- src/shared/api/generated/schema.d.ts | 2 + src/shared/api/spec/openapi.json | 10 ++ src/shared/i18n/locales/ru.ts | 1 + .../ui/EntryCard.module.css} | 6 +- src/shared/ui/EntryCard.tsx | 49 ++++++++ src/shared/ui/index.ts | 1 + src/test/storybook.test.tsx | 2 +- 20 files changed, 313 insertions(+), 140 deletions(-) create mode 100644 src/entities/brokerage-event/ui/BrokerageEventCard.tsx rename src/{pages/account/ui/components/RecentEvents.stories.tsx => entities/brokerage-event/ui/BrokerageEventsPreview.stories.tsx} (85%) rename src/{pages/account/ui/components/RecentEvents.view.tsx => entities/brokerage-event/ui/BrokerageEventsPreview.tsx} (51%) delete mode 100644 src/pages/account-events/ui/components/AccountEventRow.view.tsx rename src/{entities/broker-operation/ui/LedgerEntryRow.module.css => shared/ui/EntryCard.module.css} (95%) create mode 100644 src/shared/ui/EntryCard.tsx diff --git a/src/entities/broker-operation/ui/LedgerEntryRow.tsx b/src/entities/broker-operation/ui/LedgerEntryRow.tsx index e83fcbb..4ccbc79 100644 --- a/src/entities/broker-operation/ui/LedgerEntryRow.tsx +++ b/src/entities/broker-operation/ui/LedgerEntryRow.tsx @@ -1,11 +1,9 @@ -import { Avatar, Paper, Stack, Text } from "@mantine/core"; import type { FC } from "react"; -import { useState } from "react"; import { useTranslation } from "react-i18next"; import { formatSnapshotTime, instrumentLogoUrl } from "@/shared/lib"; +import { EntryCard } from "@/shared/ui"; import type { BrokerageOperation } from "../api/useBrokerageOperations"; import { paymentPresentation } from "../model/display"; -import classes from "./LedgerEntryRow.module.css"; type LedgerEntryRowProps = { operation: BrokerageOperation; @@ -14,44 +12,23 @@ type LedgerEntryRowProps = { const LedgerEntryRow: FC = (props) => { const { operation } = props; const { t } = useTranslation(); - const [imageFailed, setImageFailed] = useState(false); const instrument = operation.ticker ?? operation.instrumentType ?? t("ledger.noInstrument"); - const logoSrc = imageFailed ? null : instrumentLogoUrl(operation.logoName); const payment = paymentPresentation(operation); const metadata = [formatSnapshotTime(operation.occurredAt), instrument].join( " · ", ); return ( - - - - - {operation.description || operation.type} - - - {metadata} - - - - - {payment.amount} - - - {t(payment.label)} - - - + ); }; diff --git a/src/entities/brokerage-event/api/useBrokerageEvents.test.tsx b/src/entities/brokerage-event/api/useBrokerageEvents.test.tsx index b222bd4..895b014 100644 --- a/src/entities/brokerage-event/api/useBrokerageEvents.test.tsx +++ b/src/entities/brokerage-event/api/useBrokerageEvents.test.tsx @@ -43,6 +43,7 @@ describe("useBrokerageEvents", () => { instrumentUid: null, ticker: "SBER", displayName: "Сбер", + logoName: "sber3.png", projectedAmount: { currency: "RUB", value: "12.34" }, }, ], @@ -64,6 +65,7 @@ describe("useBrokerageEvents", () => { instrumentUid: null, ticker: "SBER", displayName: "Сбер", + logoName: "sber3.png", projectedAmount: { currency: "RUB", value: "12.34" }, }, ]); diff --git a/src/entities/brokerage-event/index.ts b/src/entities/brokerage-event/index.ts index 79b8b4e..af8c9e0 100644 --- a/src/entities/brokerage-event/index.ts +++ b/src/entities/brokerage-event/index.ts @@ -2,3 +2,8 @@ export { type BrokerageEvent, useBrokerageEvents, } from "./api/useBrokerageEvents"; +export { BrokerageEventCard } from "./ui/BrokerageEventCard"; +export { + BrokerageEventsPreview, + type BrokerageEventsPreviewState, +} from "./ui/BrokerageEventsPreview"; diff --git a/src/entities/brokerage-event/ui/BrokerageEventCard.tsx b/src/entities/brokerage-event/ui/BrokerageEventCard.tsx new file mode 100644 index 0000000..136b5fb --- /dev/null +++ b/src/entities/brokerage-event/ui/BrokerageEventCard.tsx @@ -0,0 +1,45 @@ +import type { FC } from "react"; +import { useTranslation } from "react-i18next"; +import { formatMoney, instrumentLogoUrl } from "@/shared/lib"; +import { EntryCard } from "@/shared/ui"; +import type { BrokerageEvent } from "../api/useBrokerageEvents"; + +type BrokerageEventCardProps = { event: BrokerageEvent }; + +const BrokerageEventCard: FC = (props) => { + const { event } = props; + const { t } = useTranslation(); + + const date = new Intl.DateTimeFormat("ru-RU", { + dateStyle: "medium", + timeZone: "UTC", + }).format(new Date(`${event.date}T00:00:00Z`)); + + const metadata = [ + date, + event.dateKind === "registry" ? t("events.dateKind.registry") : null, + event.isin, + ] + .filter(Boolean) + .join(" · "); + + return ( + + ); +}; + +export { BrokerageEventCard }; diff --git a/src/pages/account/ui/components/RecentEvents.stories.tsx b/src/entities/brokerage-event/ui/BrokerageEventsPreview.stories.tsx similarity index 85% rename from src/pages/account/ui/components/RecentEvents.stories.tsx rename to src/entities/brokerage-event/ui/BrokerageEventsPreview.stories.tsx index 4ace323..16a55dc 100644 --- a/src/pages/account/ui/components/RecentEvents.stories.tsx +++ b/src/entities/brokerage-event/ui/BrokerageEventsPreview.stories.tsx @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from "@storybook/react-vite"; import { MemoryRouter } from "react-router"; -import type { BrokerageEvent } from "@/entities/brokerage-event"; -import { RecentEvents } from "./RecentEvents.view"; +import type { BrokerageEvent } from "../api/useBrokerageEvents"; +import { BrokerageEventsPreview } from "./BrokerageEventsPreview"; const syntheticEvent = { type: "coupon", @@ -11,6 +11,8 @@ const syntheticEvent = { instrumentUid: null, ticker: "DEMO", displayName: "Учебные облигации", + logoName: null, + isin: "RU000A0JX0J2", projectedAmount: { currency: "RUB", value: "850.50" }, } satisfies BrokerageEvent; @@ -18,7 +20,7 @@ const eventsPath = "/accounts/storybook-account/events"; const meta = { title: "Product/RecentEvents", - component: RecentEvents, + component: BrokerageEventsPreview, tags: ["autodocs"], argTypes: { events: { control: false }, @@ -56,7 +58,7 @@ const meta = { ], }, }, -} satisfies Meta; +} satisfies Meta; export default meta; @@ -131,3 +133,22 @@ export const MissingAmount: Story = { }, }, }; + +export const LongEvent: Story = { + name: "Длинное название на узком экране", + args: { + events: { + state: "loaded", + to: eventsPath, + items: [ + { + ...syntheticEvent, + type: "offer", + displayName: + "Учебные облигации компании с очень длинным названием инструмента", + projectedAmount: null, + }, + ], + }, + }, +}; diff --git a/src/pages/account/ui/components/RecentEvents.view.tsx b/src/entities/brokerage-event/ui/BrokerageEventsPreview.tsx similarity index 51% rename from src/pages/account/ui/components/RecentEvents.view.tsx rename to src/entities/brokerage-event/ui/BrokerageEventsPreview.tsx index 196b1bb..f4cb6e1 100644 --- a/src/pages/account/ui/components/RecentEvents.view.tsx +++ b/src/entities/brokerage-event/ui/BrokerageEventsPreview.tsx @@ -1,22 +1,20 @@ -import { Alert, Button, Paper, Skeleton, Stack, Text } from "@mantine/core"; +import { Alert, Button, Skeleton, Stack, Text } from "@mantine/core"; import type { FC } from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router"; -import type { BrokerageEvent } from "@/entities/brokerage-event"; -import { formatMoney } from "@/shared/lib"; import { LoadingSkeleton } from "@/shared/ui"; -import classes from "../AccountPage.module.css"; -import type { AccountPageRecentEvents } from "../AccountPage.vm"; +import type { BrokerageEvent } from "../api/useBrokerageEvents"; +import { BrokerageEventCard } from "./BrokerageEventCard"; -type RecentEventsProps = { - events: AccountPageRecentEvents; +type BrokerageEventsPreviewProps = { + events: BrokerageEventsPreviewState; }; -type RecentEventProps = { - event: BrokerageEvent; -}; +type BrokerageEventsPreviewState = + | { state: "loading" | "error" | "empty"; to: string } + | { state: "loaded"; to: string; items: BrokerageEvent[] }; -const RecentEvents: FC = (props) => { +const BrokerageEventsPreview: FC = (props) => { const { events } = props; const { t } = useTranslation(); @@ -37,7 +35,7 @@ const RecentEvents: FC = (props) => { ) : null} {events.state === "loaded" ? events.items.map((event) => ( - @@ -50,20 +48,4 @@ const RecentEvents: FC = (props) => { ); }; -const RecentEvent: FC = (props) => { - const { event } = props; - const { t } = useTranslation(); - - return ( - - {`${t(`events.type.${event.type}`)} · ${event.displayName}`} - - {event.projectedAmount - ? formatMoney(event.projectedAmount) - : t("events.noAmount")} - - - ); -}; - -export { RecentEvents }; +export { BrokerageEventsPreview, type BrokerageEventsPreviewState }; diff --git a/src/pages/account-events/ui/AccountEventsPage.test.tsx b/src/pages/account-events/ui/AccountEventsPage.test.tsx index aab036d..e2de2e0 100644 --- a/src/pages/account-events/ui/AccountEventsPage.test.tsx +++ b/src/pages/account-events/ui/AccountEventsPage.test.tsx @@ -1,11 +1,12 @@ import { MantineProvider } from "@mantine/core"; -import { render, screen } from "@testing-library/react"; +import { fireEvent, render, screen } from "@testing-library/react"; import { MemoryRouter, Route, Routes } from "react-router"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { useBrokerageEvents } from "@/entities/brokerage-event"; import { AccountEventsPage } from "./AccountEventsPage"; -vi.mock("@/entities/brokerage-event", () => ({ +vi.mock("@/entities/brokerage-event", async (importOriginal) => ({ + ...(await importOriginal()), useBrokerageEvents: vi.fn(), })); @@ -81,6 +82,8 @@ describe("AccountEventsPage", () => { projectedAmount: { currency: "RUB", value: "1250" }, ticker: "OFZ", type: "coupon", + logoName: "ofz.png", + isin: "RU000A0JX0J2", }, { date: "2026-08-25", @@ -91,6 +94,8 @@ describe("AccountEventsPage", () => { projectedAmount: null, ticker: "OFZ", type: "offer", + logoName: null, + isin: null, }, ], }, @@ -98,9 +103,26 @@ describe("AccountEventsPage", () => { isLoading: false, refetch: vi.fn(), } as never); - renderPage(); + const { container } = renderPage(); expect(screen.getByText("1 250 ₽")).toBeInTheDocument(); expect(screen.getByText("Сумма неизвестна")).toBeInTheDocument(); + expect(screen.getByText("Купон · ОФЗ 26238")).toBeVisible(); + expect(screen.getByText("Оферта · ОФЗ 26238")).toBeVisible(); + expect(screen.getByText("20 авг. 2026 г. · RU000A0JX0J2")).toBeVisible(); + expect(screen.getAllByText(/RU000A0JX0J2$/)).toHaveLength(1); + expect(screen.getByText("25 авг. 2026 г.")).toBeVisible(); + expect(screen.queryByText(/Дата события/)).not.toBeInTheDocument(); + expect(screen.getAllByText("Ожидаемая сумма")).toHaveLength(2); + const logo = container.querySelector("img"); + expect(logo).toHaveAttribute( + "src", + "https://invest-brands.cdn-tinkoff.ru/ofzx160.png", + ); + expect(screen.getAllByText("O")).toHaveLength(1); + if (!logo) throw new Error("Expected the event logo"); + fireEvent.error(logo); + expect(container.querySelector("img")).toBeNull(); + expect(screen.getAllByText("O")).toHaveLength(2); }); it("renders empty and retryable error states", () => { diff --git a/src/pages/account-events/ui/components/AccountEventRow.view.tsx b/src/pages/account-events/ui/components/AccountEventRow.view.tsx deleted file mode 100644 index 185a770..0000000 --- a/src/pages/account-events/ui/components/AccountEventRow.view.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { Card, Group, Stack, Text } from "@mantine/core"; -import type { FC } from "react"; -import { useTranslation } from "react-i18next"; -import type { BrokerageEvent } from "@/entities/brokerage-event"; -import { formatMoney } from "@/shared/lib"; - -type AccountEventRowProps = { event: BrokerageEvent }; - -const AccountEventRow: FC = (props) => { - const { event } = props; - const { t } = useTranslation(); - return ( - - - - {event.displayName} - - {formatCalendarDate(event.date)} ·{" "} - {t(`events.dateKind.${event.dateKind}`)} - - - - - {event.projectedAmount - ? formatMoney(event.projectedAmount) - : t("events.noAmount")} - - - {t(`events.type.${event.type}`)} - - - - - ); -}; - -function formatCalendarDate(date: string) { - return new Intl.DateTimeFormat("ru-RU", { - dateStyle: "medium", - timeZone: "UTC", - }).format(new Date(`${date}T00:00:00Z`)); -} - -export { AccountEventRow }; diff --git a/src/pages/account-events/ui/components/AccountEventsPageLoaded.view.tsx b/src/pages/account-events/ui/components/AccountEventsPageLoaded.view.tsx index 963b4d8..b31b650 100644 --- a/src/pages/account-events/ui/components/AccountEventsPageLoaded.view.tsx +++ b/src/pages/account-events/ui/components/AccountEventsPageLoaded.view.tsx @@ -1,8 +1,10 @@ import { Stack, Text, Title } from "@mantine/core"; import type { FC } from "react"; import { useTranslation } from "react-i18next"; -import type { BrokerageEvent } from "@/entities/brokerage-event"; -import { AccountEventRow } from "./AccountEventRow.view"; +import { + type BrokerageEvent, + BrokerageEventCard, +} from "@/entities/brokerage-event"; type AccountEventsPageLoadedProps = { events: BrokerageEvent[] }; @@ -12,12 +14,14 @@ const AccountEventsPageLoaded: FC = (props) => { {t("events.title")} {t("events.hint")} - {props.events.map((event) => ( - - ))} + + {props.events.map((event) => ( + + ))} + ); }; diff --git a/src/pages/account/ui/AccountPage.test.tsx b/src/pages/account/ui/AccountPage.test.tsx index 647683e..fb89b41 100644 --- a/src/pages/account/ui/AccountPage.test.tsx +++ b/src/pages/account/ui/AccountPage.test.tsx @@ -10,6 +10,7 @@ import { import { HttpResponse, http } from "msw"; import { MemoryRouter, Route, Routes } from "react-router"; import { describe, expect, it, vi } from "vitest"; +import type { BrokerageEvent } from "@/entities/brokerage-event"; import { type Portfolio, portfolioQueryOptions } from "@/entities/portfolio"; import { configureAuthClient } from "@/shared/api"; import { createTestQueryClient } from "@/test/query"; @@ -637,6 +638,110 @@ describe("AccountPage states", () => { expect(screen.getByText("−12 ₽")).toBeInTheDocument(); }); + it("keeps future events ordered with calendar dates and projected rather than posted amounts", () => { + const event: BrokerageEvent = { + type: "coupon", + date: "2026-09-10", + dateKind: "event", + figi: null, + instrumentUid: null, + ticker: "DEMO", + displayName: "Облигация", + logoName: null, + isin: "RU000A0JX0J2", + projectedAmount: { currency: "RUB", value: "850.50" }, + }; + renderPage( + , + ); + + const section = screen.getByRole("region", { name: "Будущие события" }); + const content = within(section); + const text = section.textContent ?? ""; + const titles = [ + "Купон · Облигация", + "Дивиденд · Акция", + "Погашение · Облигация", + "Оферта · Облигация", + ]; + for (const title of titles) expect(content.getByText(title)).toBeVisible(); + expect(titles.map((title) => text.indexOf(title))).toEqual( + titles.map((title) => text.indexOf(title)).sort((a, b) => a - b), + ); + expect(content.getByText("10 сент. 2026 г. · RU000A0JX0J2")).toBeVisible(); + expect(content.getAllByText(/RU000A0JX0J2$/)).toHaveLength(4); + expect(content.queryByText(/Дата события/)).not.toBeInTheDocument(); + expect( + content.getByText("11 сент. 2026 г. · Дата реестра · RU000A0JX0J2"), + ).toBeVisible(); + for (const amount of ["850,50 ₽", "0 USD", "1 000 ₽", "Сумма неизвестна"]) + expect(content.getByText(amount)).toBeVisible(); + expect(content.getAllByText("Ожидаемая сумма")).toHaveLength(4); + expect(content.queryByText("Без движения денег")).not.toBeInTheDocument(); + expect(content.queryByText(/^\+/)).not.toBeInTheDocument(); + expect( + content.getByRole("link", { name: "Открыть будущие события" }), + ).toHaveAttribute("href", "/accounts/account-1/events"); + }); + + it.each(["loading", "empty"] as const)( + "keeps the upcoming %s state and calendar action", + (state) => { + renderPage( + , + ); + const content = within( + screen.getByRole("region", { name: "Будущие события" }), + ); + if (state === "loading") { + const skeleton = content.getByRole("status", { + name: "Загрузка будущих событий", + }); + expect(skeleton).toHaveAttribute("aria-busy", "true"); + expect(within(skeleton).queryByRole("link")).not.toBeInTheDocument(); + } else { + expect( + content.getByText("На ближайшие 30 дней событий не найдено."), + ).toBeVisible(); + } + expect( + content.getByRole("link", { name: "Открыть будущие события" }), + ).toHaveAttribute("href", "/accounts/account-1/events"); + }, + ); + it("keeps the portfolio visible when upcoming events fail", () => { renderPage( = (props) => { text={t("portfolio.emptyText")} /> - + {props.incomeSummary ? : null} ); diff --git a/src/pages/account/ui/components/AccountPageLoaded.view.tsx b/src/pages/account/ui/components/AccountPageLoaded.view.tsx index 76eb8d2..d96ce81 100644 --- a/src/pages/account/ui/components/AccountPageLoaded.view.tsx +++ b/src/pages/account/ui/components/AccountPageLoaded.view.tsx @@ -2,6 +2,7 @@ import { Accordion, Alert, Stack, Text } from "@mantine/core"; import type { FC } from "react"; import { useTranslation } from "react-i18next"; import type { BrokerageAccount } from "@/entities/brokerage-account"; +import { BrokerageEventsPreview } from "@/entities/brokerage-event"; import type { Portfolio } from "@/entities/portfolio"; import { formatSnapshotTime } from "@/shared/lib"; import classes from "../AccountPage.module.css"; @@ -16,7 +17,6 @@ import { CurrencyCards } from "./CurrencyCards.view"; import { IncomeSummary } from "./IncomeSummary.view"; import { PortfolioRefreshState } from "./PortfolioRefreshState.view"; import { PositionSection } from "./PositionSection.view"; -import { RecentEvents } from "./RecentEvents.view"; import { RecentOperations } from "./RecentOperations.view"; type AccountPageLoadedProps = { @@ -91,7 +91,7 @@ const AccountPageLoaded: FC = (props) => { {t("events.recentTitle")} - + diff --git a/src/shared/api/generated/schema.d.ts b/src/shared/api/generated/schema.d.ts index 9b308cd..95ccc0c 100644 --- a/src/shared/api/generated/schema.d.ts +++ b/src/shared/api/generated/schema.d.ts @@ -312,6 +312,8 @@ export interface components { instrumentUid: string | null; ticker: string; displayName: string; + isin: string | null; + logoName: string | null; projectedAmount: components["schemas"]["MoneyDto"] | null; }; UpcomingEventsDto: { diff --git a/src/shared/api/spec/openapi.json b/src/shared/api/spec/openapi.json index 7ff95ad..8e3ac14 100644 --- a/src/shared/api/spec/openapi.json +++ b/src/shared/api/spec/openapi.json @@ -1659,6 +1659,14 @@ "displayName": { "type": "string" }, + "isin": { + "type": "string", + "nullable": true + }, + "logoName": { + "type": "string", + "nullable": true + }, "projectedAmount": { "nullable": true, "type": "object", @@ -1677,6 +1685,8 @@ "instrumentUid", "ticker", "displayName", + "isin", + "logoName", "projectedAmount" ] }, diff --git a/src/shared/i18n/locales/ru.ts b/src/shared/i18n/locales/ru.ts index dca43a8..603be39 100644 --- a/src/shared/i18n/locales/ru.ts +++ b/src/shared/i18n/locales/ru.ts @@ -144,6 +144,7 @@ const ru = { errorText: "Попробуйте запросить прогноз еще раз.", retry: "Повторить", noAmount: "Сумма неизвестна", + projectedAmount: "Ожидаемая сумма", dateKind: { event: "Дата события", registry: "Дата реестра" }, type: { coupon: "Купон", diff --git a/src/entities/broker-operation/ui/LedgerEntryRow.module.css b/src/shared/ui/EntryCard.module.css similarity index 95% rename from src/entities/broker-operation/ui/LedgerEntryRow.module.css rename to src/shared/ui/EntryCard.module.css index 2fd0d75..cdd813b 100644 --- a/src/entities/broker-operation/ui/LedgerEntryRow.module.css +++ b/src/shared/ui/EntryCard.module.css @@ -9,11 +9,11 @@ } .identity, -.amount { +.value { min-width: 0; } -.amount { +.value { text-align: right; white-space: nowrap; } @@ -35,7 +35,7 @@ grid-template-columns: auto minmax(0, 1fr); } - .amount { + .value { grid-column: 2; text-align: left; } diff --git a/src/shared/ui/EntryCard.tsx b/src/shared/ui/EntryCard.tsx new file mode 100644 index 0000000..e65433d --- /dev/null +++ b/src/shared/ui/EntryCard.tsx @@ -0,0 +1,49 @@ +import { Avatar, Paper, Stack, Text } from "@mantine/core"; +import { type FC, useState } from "react"; +import classes from "./EntryCard.module.css"; + +type EntryCardProps = { + title: string; + metadata: string; + initial: string; + imageSrc?: string | null; + value: string; + valueLabel: string; + tone: "positive" | "negative" | "neutral"; +}; + +const EntryCard: FC = (props) => { + const [imageFailed, setImageFailed] = useState(false); + return ( + + + + + {props.title} + + + {props.metadata} + + + + + {props.value} + + + {props.valueLabel} + + + + ); +}; + +export { EntryCard }; diff --git a/src/shared/ui/index.ts b/src/shared/ui/index.ts index 69471ee..db527c2 100644 --- a/src/shared/ui/index.ts +++ b/src/shared/ui/index.ts @@ -1,3 +1,4 @@ export { AppShell } from "./AppShell"; +export { EntryCard } from "./EntryCard"; export { LoadingSkeleton } from "./LoadingSkeleton"; export { StateView } from "./StateView"; diff --git a/src/test/storybook.test.tsx b/src/test/storybook.test.tsx index a45b493..4eaee02 100644 --- a/src/test/storybook.test.tsx +++ b/src/test/storybook.test.tsx @@ -4,10 +4,10 @@ import { fn } from "storybook/test"; import { afterEach, describe, expect, it, vi } from "vitest"; import preview from "../../.storybook/preview"; import * as AccountStories from "../entities/brokerage-account/ui/BrokerageAccountList.stories"; +import * as EventStories from "../entities/brokerage-event/ui/BrokerageEventsPreview.stories"; import * as LoadingStories from "../pages/account/ui/components/AccountPageLoading.stories"; import * as RefreshStories from "../pages/account/ui/components/PortfolioRefreshState.stories"; import * as PositionStories from "../pages/account/ui/components/PositionCard.stories"; -import * as EventStories from "../pages/account/ui/components/RecentEvents.stories"; import * as StateStories from "../shared/ui/StateView.stories"; afterEach(() => vi.restoreAllMocks());