refactor: tighten types and reuse instrument UI
Frontend verify / commits (pull_request) Successful in 24s
Frontend verify / security (pull_request) Failing after 9s
Frontend verify / verify (pull_request) Skipped

This commit is contained in:
2026-09-29 06:15:31 +03:00
parent b404c1802a
commit 7c28a423dd
67 changed files with 380 additions and 347 deletions
@@ -11,7 +11,7 @@ import {
useLocation,
useNavigate,
} from "react-router";
import { describe, expect, it, vi } from "vitest";
import { assert, describe, expect, it, vi } from "vitest";
import {
type BrokerageOperation,
@@ -264,8 +264,8 @@ describe("AccountOperationsPage", () => {
</QueryClientProvider>,
);
await screen.findByLabelText("Период");
expect(searches[0].get("from")).toBeNull();
expect(searches[0].get("to")).toBeNull();
expect(searches[0]?.get("from")).toBeNull();
expect(searches[0]?.get("to")).toBeNull();
for (const expected of [
"?categories=trade",
@@ -597,6 +597,8 @@ it("recovers an invalid cursor at the first page without clearing applied filter
fireEvent.click(await screen.findByRole("button", { name: "Далее" }));
fireEvent.click(await screen.findByRole("button", { name: "Повторить" }));
await waitFor(() => expect(searches).toHaveLength(3));
assert.isDefined(searches[0]);
assert.isDefined(searches[2]);
expect(searches[2].get("cursor")).toBeNull();
for (const key of ["from", "to", "categories"])
expect(searches[2].get(key)).toBe(searches[0].get(key));