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
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:
@@ -18,8 +18,6 @@ import {
|
||||
useAccountPageViewModel,
|
||||
} from "./AccountPage.vm";
|
||||
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
const portfolio: Portfolio
|
||||
= {
|
||||
cashBalances: [{ currency: "USD", value: "1" }],
|
||||
@@ -66,7 +64,6 @@ const portfolio: Portfolio
|
||||
structure: { currencies: [], unvaluedCategories: [] },
|
||||
totalsByCurrency: [{ currency: "RUB", value: "150" }],
|
||||
};
|
||||
/* eslint-enable unicorn/no-null */
|
||||
|
||||
function configureTestAuth() {
|
||||
configureAuthClient({
|
||||
@@ -101,7 +98,7 @@ function mockLoadedAccountPage() {
|
||||
),
|
||||
http.get("*/api/v1/brokerage-accounts/:accountId/operations", () =>
|
||||
HttpResponse.json(
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
resource(
|
||||
{
|
||||
accountId: "account-1",
|
||||
@@ -127,7 +124,6 @@ function mockLoadedAccountPage() {
|
||||
nextCursor: null,
|
||||
observedAt: "2026-08-13T10:00:00Z",
|
||||
},
|
||||
/* eslint-enable unicorn/no-null */
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -138,7 +134,7 @@ function mockLoadedAccountPage() {
|
||||
calculatedAt: "2026-08-13T10:00:00Z",
|
||||
events: Array.from(
|
||||
{ length: 6 },
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
(_, index) =>
|
||||
({
|
||||
date: `2026-09-${String(index + 1).padStart(2, "0")}`,
|
||||
@@ -150,7 +146,6 @@ function mockLoadedAccountPage() {
|
||||
ticker: `BND${index}`,
|
||||
type: "coupon",
|
||||
}),
|
||||
/* eslint-enable unicorn/no-null */
|
||||
),
|
||||
}),
|
||||
),
|
||||
@@ -181,7 +176,7 @@ describe("useAccountPageViewModel", () => {
|
||||
type: "CURRENCY",
|
||||
},
|
||||
...otherTypes.map(
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
type =>
|
||||
({
|
||||
...portfolio.positions[2],
|
||||
@@ -190,7 +185,6 @@ describe("useAccountPageViewModel", () => {
|
||||
figi: `FIGI-${type}-NEXT`,
|
||||
type,
|
||||
}),
|
||||
/* eslint-enable unicorn/no-null */
|
||||
),
|
||||
],
|
||||
structure: { currencies: [], unvaluedCategories: [] },
|
||||
@@ -248,7 +242,7 @@ describe("useAccountPageViewModel", () => {
|
||||
shareText: "66,7 %",
|
||||
},
|
||||
],
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
},
|
||||
{
|
||||
kind: "bonds",
|
||||
@@ -262,15 +256,15 @@ describe("useAccountPageViewModel", () => {
|
||||
},
|
||||
],
|
||||
},
|
||||
/* eslint-enable unicorn/no-null */ {
|
||||
{
|
||||
kind: "other",
|
||||
positions: [
|
||||
{
|
||||
displayName: "Фонд",
|
||||
logoSrc: null, // eslint-disable-line unicorn/no-null -- Preserve explicit null in the API fixture.
|
||||
returnText: null, // eslint-disable-line unicorn/no-null -- Preserve explicit null in the API fixture.
|
||||
logoSrc: null,
|
||||
returnText: null,
|
||||
returnTone: undefined,
|
||||
shareText: null, // eslint-disable-line unicorn/no-null -- Preserve explicit null in the API fixture.
|
||||
shareText: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -351,10 +345,10 @@ it("keeps overview sections independent when their source data is incomplete", a
|
||||
),
|
||||
http.get("*/api/v1/brokerage-accounts/:accountId/operations", () =>
|
||||
HttpResponse.json(
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
resource(
|
||||
{ hasNext: false, items: [], nextCursor: null },
|
||||
/* eslint-enable unicorn/no-null */ { availability: "partial" },
|
||||
{ availability: "partial" },
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -385,8 +379,6 @@ it("keeps overview sections independent when their source data is incomplete", a
|
||||
it("refreshes every overview section through one account descriptor and observational reads", async () => {
|
||||
configureTestAuth();
|
||||
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
const sections: Record<string, unknown>
|
||||
= {
|
||||
"events": { events: [], incomeTotalsByCurrency: [] },
|
||||
@@ -395,7 +387,6 @@ it("refreshes every overview section through one account descriptor and observat
|
||||
portfolio,
|
||||
};
|
||||
|
||||
/* eslint-enable unicorn/no-null */
|
||||
const observed: string[] = [];
|
||||
const scopes: unknown[] = [];
|
||||
let version = "1";
|
||||
@@ -427,7 +418,7 @@ it("refreshes every overview section through one account descriptor and observat
|
||||
);
|
||||
}),
|
||||
http.get("*/api/v1/tbank-sync/:id", () =>
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
HttpResponse.json(
|
||||
{
|
||||
errorCode: null,
|
||||
@@ -441,7 +432,6 @@ it("refreshes every overview section through one account descriptor and observat
|
||||
scope: null,
|
||||
state: "succeeded",
|
||||
},
|
||||
/* eslint-enable unicorn/no-null */
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user