This commit was merged in pull request #79.
This commit is contained in:
@@ -420,6 +420,32 @@ describe("AccountPage states", () => {
|
||||
).toMatchObject({ data: null });
|
||||
});
|
||||
|
||||
it("keeps null events and income envelopes loading in the previews", async () => {
|
||||
server.use(
|
||||
http.get("*/api/v1/brokerage-accounts/:accountId/events", () =>
|
||||
HttpResponse.json(resource(null)),
|
||||
),
|
||||
http.get("*/api/v1/brokerage-accounts/:accountId/income-summary", () =>
|
||||
HttpResponse.json(resource(null)),
|
||||
),
|
||||
);
|
||||
renderAccountRoute(createTestQueryClient());
|
||||
|
||||
expect(
|
||||
await screen.findByText("Портфель пока пуст", undefined, {
|
||||
timeout: 4000,
|
||||
}),
|
||||
).toBeVisible();
|
||||
expect(
|
||||
screen.getByRole("status", { name: "Загрузка будущих событий" }),
|
||||
).toBeVisible();
|
||||
expect(
|
||||
screen.queryByText("На ближайшие 30 дней событий не найдено."),
|
||||
).not.toBeInTheDocument();
|
||||
expect(screen.getByText("Загрузка дохода текущего месяца")).toBeVisible();
|
||||
expect(screen.queryByText("Нет текущих сумм")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("renders a stale portfolio in upstream order with nullable values hidden", () => {
|
||||
renderPage(<AccountPageLoaded {...loadedProps()} />);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user