feat: add агегку events
This commit is contained in:
@@ -141,4 +141,26 @@ describe("AccountPage states", () => {
|
||||
);
|
||||
expect(screen.getByText("Вторая")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("keeps the portfolio visible when upcoming events fail", async () => {
|
||||
server.use(
|
||||
http.get("*/api/v1/brokerage-accounts/:accountId/events", () =>
|
||||
HttpResponse.json({ code: "MOEX_UNAVAILABLE" }, { status: 503 }),
|
||||
),
|
||||
);
|
||||
renderPage(
|
||||
<AccountPageLoaded
|
||||
accountId="account-1"
|
||||
accessToken="token"
|
||||
portfolio={portfolio}
|
||||
/>,
|
||||
);
|
||||
|
||||
await waitFor(() =>
|
||||
expect(
|
||||
screen.getByText("Не удалось загрузить будущие события."),
|
||||
).toBeInTheDocument(),
|
||||
);
|
||||
expect(screen.getByText("Вторая")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user