fix: drop UTC suffix from snapshot time labels (WealthLedger/frontend#101)
This commit is contained in:
@@ -413,7 +413,9 @@ describe("stock page", () => {
|
|||||||
expect(await screen.findByText("Продажа")).toBeVisible();
|
expect(await screen.findByText("Продажа")).toBeVisible();
|
||||||
expect(screen.getByText("2 шт.")).toBeVisible();
|
expect(screen.getByText("2 шт.")).toBeVisible();
|
||||||
expect(screen.getByText("Цена: 100 ₽")).toBeVisible();
|
expect(screen.getByText("Цена: 100 ₽")).toBeVisible();
|
||||||
expect(screen.getByText(/02.01.2022, 10:00 UTC/)).toBeVisible();
|
const snapshotTime = new Intl.DateTimeFormat("ru-RU", { dateStyle: "short", timeStyle: "short" });
|
||||||
|
const operationTime = snapshotTime.format(new Date("2022-01-02T10:00:00Z"));
|
||||||
|
expect(screen.getByText(operationTime, { exact: false })).toBeVisible();
|
||||||
expect(
|
expect(
|
||||||
requests.some(
|
requests.some(
|
||||||
url =>
|
url =>
|
||||||
|
|||||||
@@ -93,7 +93,9 @@ describe("stock search", () => {
|
|||||||
expect(
|
expect(
|
||||||
await screen.findByRole("link", { name: /Сбербанк/ }),
|
await screen.findByRole("link", { name: /Сбербанк/ }),
|
||||||
).toHaveAttribute("href", "/stocks/e6123145-9665-43e0-8413-cd61b8aa9b13");
|
).toHaveAttribute("href", "/stocks/e6123145-9665-43e0-8413-cd61b8aa9b13");
|
||||||
expect(screen.getByText("Список получен 10.10.2026, 10:00")).toBeVisible();
|
const snapshotTime = new Intl.DateTimeFormat("ru-RU", { dateStyle: "short", timeStyle: "short" });
|
||||||
|
const fetchedAt = snapshotTime.format(new Date("2026-10-10T10:00:00Z"));
|
||||||
|
expect(screen.getByText(`Список получен ${fetchedAt}`)).toBeVisible();
|
||||||
expect(screen.getByText("Лот: 10 шт.")).toBeVisible();
|
expect(screen.getByText("Лот: 10 шт.")).toBeVisible();
|
||||||
expect(screen.getByText("ISIN: RU0009029540")).toBeVisible();
|
expect(screen.getByText("ISIN: RU0009029540")).toBeVisible();
|
||||||
expect(screen.getAllByText("Мосбиржа")[0]).toBeVisible();
|
expect(screen.getAllByText("Мосбиржа")[0]).toBeVisible();
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ const ru = {
|
|||||||
next: "Далее",
|
next: "Далее",
|
||||||
noInstrument: "Без инструмента",
|
noInstrument: "Без инструмента",
|
||||||
noMoney: "Без движения денег",
|
noMoney: "Без движения денег",
|
||||||
occurredAt: "{{date}} UTC",
|
occurredAt: "{{date}}",
|
||||||
open: "Открыть журнал",
|
open: "Открыть журнал",
|
||||||
operationType: {
|
operationType: {
|
||||||
buy: "Покупка",
|
buy: "Покупка",
|
||||||
@@ -632,7 +632,7 @@ const ru = {
|
|||||||
position: "Моя позиция",
|
position: "Моя позиция",
|
||||||
previous: "Назад",
|
previous: "Назад",
|
||||||
price: "Цена",
|
price: "Цена",
|
||||||
priceAt: "Цена на {{date}} UTC",
|
priceAt: "Цена на {{date}}",
|
||||||
priceTable: "Цены в таблице",
|
priceTable: "Цены в таблице",
|
||||||
priceTableHint: "Дневные закрытия · записей: {{count}} · сначала новые",
|
priceTableHint: "Дневные закрытия · записей: {{count}} · сначала новые",
|
||||||
priceUnavailable: "Цена недоступна",
|
priceUnavailable: "Цена недоступна",
|
||||||
@@ -721,7 +721,7 @@ const ru = {
|
|||||||
SHARE_TYPE_GDR: "Депозитарная расписка",
|
SHARE_TYPE_GDR: "Депозитарная расписка",
|
||||||
SHARE_TYPE_PREFERRED: "Привилегированная акция",
|
SHARE_TYPE_PREFERRED: "Привилегированная акция",
|
||||||
},
|
},
|
||||||
snapshotAt: "Позиция на {{date}} UTC",
|
snapshotAt: "Позиция на {{date}}",
|
||||||
trading: {
|
trading: {
|
||||||
SECURITY_TRADING_STATUS_BREAK_IN_TRADING: "Перерыв в торгах",
|
SECURITY_TRADING_STATUS_BREAK_IN_TRADING: "Перерыв в торгах",
|
||||||
SECURITY_TRADING_STATUS_CLOSING_AUCTION: "Аукцион закрытия",
|
SECURITY_TRADING_STATUS_CLOSING_AUCTION: "Аукцион закрытия",
|
||||||
|
|||||||
Reference in New Issue
Block a user