feat: polish bank operation cards and dates

This commit is contained in:
2026-09-12 19:56:12 +03:00
parent dedfec10d1
commit 6b310db0b8
20 changed files with 382 additions and 26 deletions
@@ -67,7 +67,7 @@ describe("BankCardForm", () => {
it("retains an invalid opening date draft and explains conflict with saved history", async () => {
const close = setup(card);
fireEvent.change(screen.getByLabelText(/Дата начала/), {
target: { value: "2026-08-01" },
target: { value: "01.08.2026" },
});
server.use(
http.patch("*/api/v1/bank-cards/a", () =>
@@ -81,7 +81,7 @@ describe("BankCardForm", () => {
await screen.findByText(
"Дата начала противоречит сохранённой истории карты.",
);
expect(screen.getByLabelText(/Дата начала/)).toHaveValue("2026-08-01");
expect(screen.getByLabelText(/Дата начала/)).toHaveValue("01.08.2026");
expect(close).not.toHaveBeenCalled();
});
it("keeps card edit version until explicit refresh adoption", async () => {