refactor: share instrument search presentation
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 05:14:28 +03:00
parent 0865b35f93
commit 32a77860c8
18 changed files with 489 additions and 551 deletions
@@ -349,6 +349,12 @@ describe("CardPage", () => {
it("archives without deleting history and restores financial actions", async () => {
setup();
await screen.findByText("Перевод на «Запасная»");
server.use(http.patch("*/api/v1/bank-cards/a", () =>
HttpResponse.json({ code: "BANK_WRITE_CONFLICT" }, { status: 409 }),
));
fireEvent.click(screen.getByRole("button", { name: "Убрать в архив" }));
await screen.findByRole("alert");
expect(screen.getByRole("button", { name: "Добавить операцию" })).toBeEnabled();
let current = card;
const bodies: unknown[] = [];
server.use(
@@ -376,6 +382,7 @@ describe("CardPage", () => {
);
fireEvent.click(screen.getByRole("button", { name: "Убрать в архив" }));
await screen.findByRole("button", { name: "Вернуть из архива" });
expect(screen.queryByRole("alert")).not.toBeInTheDocument();
expect(
screen.getByRole("button", { name: "Добавить операцию" }),
).toBeDisabled();