diff --git a/src/pages/account/ui/AccountPage/AccountPage.test.tsx b/src/pages/account/ui/AccountPage/AccountPage.test.tsx index dacc807..7ec12f2 100644 --- a/src/pages/account/ui/AccountPage/AccountPage.test.tsx +++ b/src/pages/account/ui/AccountPage/AccountPage.test.tsx @@ -151,6 +151,20 @@ function loadedProps(nextPortfolio: Portfolio = portfolio) { } describe("AccountPage states", () => { + it("shows the loaded portfolio source sync status", async () => { + server.use( + http.get("*/api/v1/brokerage-accounts/:accountId/portfolio", () => + HttpResponse.json(resource(portfolio, { freshness: "stale" })), + ), + ); + renderAccountRoute(createTestQueryClient()); + + expect( + await screen.findByText("Данные требуют обновления"), + ).toBeInTheDocument(); + expect(screen.getByText(/Данные на 14\.08\.2026/)).toBeInTheDocument(); + }); + it.each( ["account-1", "all"].flatMap(accountId => ["STOCK", "BOND"].flatMap(type => diff --git a/src/pages/account/ui/AccountPage/AccountPage.tsx b/src/pages/account/ui/AccountPage/AccountPage.tsx index 0e38a79..a30dc6a 100644 --- a/src/pages/account/ui/AccountPage/AccountPage.tsx +++ b/src/pages/account/ui/AccountPage/AccountPage.tsx @@ -31,6 +31,7 @@ const AccountPage: FC = () => { positionSections={viewModel.positionSections} recentEvents={viewModel.recentEvents} recentOperations={viewModel.recentOperations} + source={viewModel.source} unrealizedReturns={viewModel.unrealizedReturns} /> );