Compare commits
1
Commits
develop
...
f2f81b6e08
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2f81b6e08 |
@@ -492,6 +492,20 @@ describe("AccountOperationsPage", () => {
|
|||||||
}),
|
}),
|
||||||
).toBeInTheDocument();
|
).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("keeps a null operations envelope loading instead of a confirmed empty period", async () => {
|
||||||
|
configureTestAuth();
|
||||||
|
server.use(
|
||||||
|
http.get("*/api/v1/brokerage-accounts/:accountId/operations", () =>
|
||||||
|
HttpResponse.json(resource(null)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
renderPage();
|
||||||
|
expect(
|
||||||
|
await screen.findByRole("status", { name: "Загрузка" }, { timeout: 4000 }),
|
||||||
|
).toBeVisible();
|
||||||
|
expect(screen.queryByText("Операций нет")).not.toBeInTheDocument();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("keeps UTC operation boundaries in GET and source sync requests", async () => {
|
it("keeps UTC operation boundaries in GET and source sync requests", async () => {
|
||||||
|
|||||||
@@ -402,6 +402,24 @@ describe("AccountPage states", () => {
|
|||||||
).toBeInTheDocument();
|
).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("keeps a null portfolio envelope loading instead of an empty portfolio", async () => {
|
||||||
|
server.use(
|
||||||
|
http.get("*/api/v1/brokerage-accounts/:accountId/portfolio", () =>
|
||||||
|
HttpResponse.json(resource(null)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
const queryClient = createTestQueryClient();
|
||||||
|
renderAccountRoute(queryClient);
|
||||||
|
|
||||||
|
expect(
|
||||||
|
await screen.findByRole("status", { name: "Загрузка" }, { timeout: 4000 }),
|
||||||
|
).toBeVisible();
|
||||||
|
expect(screen.queryByText("Портфель пока пуст")).not.toBeInTheDocument();
|
||||||
|
expect(
|
||||||
|
queryClient.getQueryData(portfolioQueryOptions("account-1").queryKey),
|
||||||
|
).toMatchObject({ data: null });
|
||||||
|
});
|
||||||
|
|
||||||
it("renders a stale portfolio in upstream order with nullable values hidden", () => {
|
it("renders a stale portfolio in upstream order with nullable values hidden", () => {
|
||||||
renderPage(<AccountPageLoaded {...loadedProps()} />);
|
renderPage(<AccountPageLoaded {...loadedProps()} />);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user