refactor: address frontend review feedback
Frontend verify / commits (pull_request) Successful in 29s
Frontend verify / security (pull_request) Successful in 9s
Frontend verify / verify (pull_request) Successful in 8m54s
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 12s
Frontend verify / verify (push) Successful in 9m59s

This commit was merged in pull request #43.
This commit is contained in:
2026-09-28 19:20:32 +03:00
parent ca0ad4f824
commit a4046dbe87
139 changed files with 1549 additions and 941 deletions
@@ -33,7 +33,7 @@ function renderCards(isFail = false, hasCategoryFailure = false) {
isFail ? HttpResponse.error() : HttpResponse.json([]),
),
http.get("*/api/v1/bank-cards/summary", () =>
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
HttpResponse.json(
{
cardId: null,
@@ -43,7 +43,6 @@ function renderCards(isFail = false, hasCategoryFailure = false) {
net: money("0"),
refunds: money("0"),
},
/* eslint-enable unicorn/no-null */
),
),
);
@@ -119,7 +118,7 @@ describe("CardsPage", () => {
expect(screen.queryByRole("dialog")).not.toBeInTheDocument(),
);
expect(submitted[0]).toEqual(submitted[1]);
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
expect(submitted[0]).toMatchObject(
{
bankName: null,
@@ -127,7 +126,6 @@ describe("CardsPage", () => {
name: "Повседневная",
openingBalance: money("-92233720368547758.08"),
},
/* eslint-enable unicorn/no-null */
);
});
it("uses archive only for card list and keeps all-card summary including negative net", async () => {
@@ -137,8 +135,6 @@ describe("CardsPage", () => {
http.get("*/api/v1/bank-cards", ({ request }) => {
requests.push(new URL(request.url).search);
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
return HttpResponse.json([
{
archivedAt: "2026-09-01",
@@ -151,7 +147,7 @@ describe("CardsPage", () => {
openingDate: "2026-01-01",
version: 1,
},
/* eslint-enable unicorn/no-null */
]);
}),
);
@@ -175,8 +171,6 @@ describe("CardsPage", () => {
http.get("*/api/v1/bank-cards/summary", ({ request }) => {
requests.push(new URL(request.url).search);
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
return HttpResponse.json(
{
cardId: null,
@@ -185,7 +179,6 @@ describe("CardsPage", () => {
net: money("0"),
refunds: money("0"),
},
/* eslint-enable unicorn/no-null */
);
}),
);
@@ -125,9 +125,7 @@ const CardsPageView: FC<CardsPageViewProps> = (props) => {
</Group>
)}
{vm.cards.data && vm.cards.isFetching && (
<Text role="status">{t("bank.refreshing")}</Text>
)}
{vm.cards.data && vm.cards.isFetching && <Text role="status">{t("bank.refreshing")}</Text>}
<Group align="flex-end" justify="space-between">
<BankPeriodPicker onChange={vm.setPeriod} period={vm.period} />