refactor: clarify frontend model ownership
Frontend verify / commits (pull_request) Successful in 27s
Frontend verify / security (pull_request) Successful in 9s
Frontend verify / verify (pull_request) Successful in 8m20s

This commit is contained in:
2026-09-28 21:44:53 +03:00
parent 7e976c330c
commit 0865b35f93
44 changed files with 685 additions and 710 deletions
@@ -24,8 +24,8 @@ import type {
AccountPageRecentOperations,
} from "./AccountPage.vm";
import { toAccountPagePositionSections } from "../../model/positions";
import { AccountPage } from "./AccountPage";
import { toAccountPagePositionSections } from "./AccountPage.vm";
import { AccountPageEmpty } from "./components/AccountPageEmpty.view";
import { AccountPageError } from "./components/AccountPageError.view";
import { AccountPageLoaded } from "./components/AccountPageLoaded.view";
@@ -39,13 +39,13 @@ function configureTestAuth() {
});
}
function renderAccountRoute(queryClient: QueryClient) {
function renderAccountRoute(queryClient: QueryClient, accountId = "account-1") {
configureTestAuth();
return render(
<QueryClientProvider client={queryClient}>
<MantineProvider>
<MemoryRouter initialEntries={["/accounts/account-1"]}>
<MemoryRouter initialEntries={[`/accounts/${accountId}`]}>
<Routes>
<Route element={<AccountPage />} path="/accounts/:accountId" />
</Routes>
@@ -202,7 +202,7 @@ describe("AccountPage states", () => {
}),
);
configureTestAuth();
renderPage(<AccountPage accountId={accountId} />);
renderAccountRoute(createTestQueryClient(), accountId);
await waitFor(() => {
const links = screen.getAllByRole("link", {
name: position.displayName,