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
@@ -29,8 +29,6 @@ const LocationProbe = () => {
const uid = "e6123145-9665-43e0-8413-cd61b8aa9b13";
const money = (value: string) => ({ currency: "RUB", value });
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
const stock
= {
currency: "RUB",
@@ -44,7 +42,6 @@ const stock
ticker: "TEST",
};
/* eslint-enable unicorn/no-null */
const position = {
absoluteReturn: money("1000"),
accounts: [
@@ -124,7 +121,7 @@ function setup(
);
if (params.section === "candles")
return HttpResponse.json(
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
resource(
{
candles: [],
@@ -132,14 +129,13 @@ function setup(
historyFrom: null,
observedAt: quote.observedAt,
},
/* eslint-enable unicorn/no-null */
),
);
if (params.section === "company")
return options.failCompany
? HttpResponse.json({ code: "TBANK_UNAVAILABLE" }, { status: 503 })
: HttpResponse.json(
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
resource(
{
description: "Описание компании",
@@ -155,12 +151,11 @@ function setup(
observedAt: quote.observedAt,
unavailable: [],
},
/* eslint-enable unicorn/no-null */
),
);
return HttpResponse.json(
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
resource(
{
dividends: [
@@ -188,7 +183,6 @@ function setup(
positionIsStale: false,
to: "2027-09-10",
},
/* eslint-enable unicorn/no-null */
),
);
}),
@@ -200,7 +194,7 @@ function setup(
return HttpResponse.json({ code: cursorError }, { status: 400 });
return HttpResponse.json(
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
resource(
{
accountId: "all",
@@ -225,7 +219,6 @@ function setup(
nextCursor: isNext ? null : "next",
observedAt: quote.observedAt,
},
/* eslint-enable unicorn/no-null */
),
);
}),
@@ -264,7 +257,6 @@ function setup(
describe("stock page", () => {
it("preserves unknown and unambiguous currencies with compact, ratio and percent formatting", async () => {
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
setup(
{
metrics: [
@@ -312,7 +304,6 @@ describe("stock page", () => {
},
],
},
/* eslint-enable unicorn/no-null */
);
expect(await screen.findByText("1,23 млн валюта неизвестна")).toBeVisible();
for (const value of [
@@ -468,9 +459,8 @@ describe("stock page", () => {
it.each([
[
"INVALID_OPERATIONS_CURSOR",
// eslint-disable-next-line unicorn/no-null -- Exercise the explicit null returned by the production API/DOM contract.
null,
null, // eslint-disable-line unicorn/no-null -- Preserve explicit null in the API fixture.
null,
],
["TBANK_UNAVAILABLE", "next", "observe"],
])(