fix: resolve frontend audit findings
Frontend security / security (push) Successful in 10s
Frontend verify / verify (push) Successful in 4m57s
Conventional commits / commits (pull_request) Successful in 28s
Frontend security / security (pull_request) Successful in 10s
Frontend verify / verify (pull_request) Successful in 5m10s
Frontend security / security (push) Successful in 10s
Frontend verify / verify (push) Successful in 4m57s
Conventional commits / commits (pull_request) Successful in 28s
Frontend security / security (pull_request) Successful in 10s
Frontend verify / verify (pull_request) Successful in 5m10s
Repair investment recovery, draft preservation, date validation, currency presentation, accessibility, and route error recovery. Correct Docker and dependency checks and consume explicit income roles.
This commit is contained in:
@@ -46,6 +46,7 @@ const operation = {
|
||||
};
|
||||
function setup(
|
||||
options: {
|
||||
month?: string;
|
||||
missing?: boolean;
|
||||
summaryError?: boolean;
|
||||
cardsError?: boolean;
|
||||
@@ -101,7 +102,9 @@ function setup(
|
||||
render(
|
||||
<QueryClientProvider client={client}>
|
||||
<MantineProvider env="test">
|
||||
<MemoryRouter initialEntries={["/cards/a?month=2026-08"]}>
|
||||
<MemoryRouter
|
||||
initialEntries={[`/cards/a?month=${options.month ?? "2026-08"}`]}
|
||||
>
|
||||
<Routes>
|
||||
<Route path="/cards/:cardId" element={<CardPage />} />
|
||||
</Routes>
|
||||
@@ -112,6 +115,26 @@ function setup(
|
||||
return { requests, summaryRequests, client };
|
||||
}
|
||||
describe("CardPage", () => {
|
||||
it.each([
|
||||
["0001-01", "0001-01-31"],
|
||||
["0099-12", "0099-12-31"],
|
||||
["2026-09", "2026-09-30"],
|
||||
["2024-02", "2024-02-29"],
|
||||
])(
|
||||
"sends the same legacy month %s range to history and summary",
|
||||
async (month, to) => {
|
||||
const { requests, summaryRequests } = setup({ month });
|
||||
await screen.findByText("Перевод на «Запасная»");
|
||||
await waitFor(() => expect(summaryRequests).toHaveLength(1));
|
||||
for (const request of [requests[0], summaryRequests[0]]) {
|
||||
const query = new URLSearchParams(request);
|
||||
expect(query.get("from")).toBe(`${month}-01`);
|
||||
expect(query.get("to")).toBe(to);
|
||||
expect(query.has("month")).toBe(false);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
it("shares date range with history, pages the journal and keeps current balance", async () => {
|
||||
const { requests, summaryRequests } = setup();
|
||||
await screen.findByRole("heading", { name: "Повседневная" });
|
||||
|
||||
Reference in New Issue
Block a user