feat: render hourly investment states
Frontend verify / commits (pull_request) Successful in 45s
Frontend verify / security (pull_request) Successful in 14s
Frontend verify / verify (pull_request) Successful in 6m45s

This commit is contained in:
2026-10-09 19:56:20 +03:00
parent 734c5bdc2e
commit 6b1b26aa34
36 changed files with 1388 additions and 1238 deletions
+8 -5
View File
@@ -75,9 +75,10 @@ describe("persistent resource query lifecycle", () => {
http.get("*/api/v1/brokerage-accounts/:accountId/portfolio", () =>
HttpResponse.json(
resource(null, {
sync: {
errorCode: "TBANK_UNAVAILABLE",
id: "work",
lastAttempt: {
finishedAt: "2026-08-14T00:01:00Z",
problems: [],
startedAt: "2026-08-14T00:00:00Z",
state: "failed",
},
}),
@@ -89,14 +90,16 @@ describe("persistent resource query lifecycle", () => {
wrapper: createQueryWrapper().wrapper,
});
await waitFor(() => expect(result.current.meta?.sync.state).toBe("failed"));
await waitFor(() =>
expect(result.current.meta?.lastAttempt.state).toBe("failed"),
);
expect(result.current.data).toBeUndefined();
expect(result.current.isSuccess).toBe(true);
expect(result.current.status).toBe("success");
expect(result.current.isPending).toBe(false);
expect(result.current.isLoading).toBe(false);
expect(result.current.meta?.availability).toBe("missing");
expect(result.current.meta?.availability).toBe("initial-loading");
});
it("keeps the refetch envelope while exposing the refreshed resource payload", async () => {
auth();