Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3c1528fd4 | ||
|
|
b037fd9cab | ||
|
|
24e53c713e |
@@ -11,7 +11,7 @@ import {
|
||||
} from "@testing-library/react";
|
||||
import { http, HttpResponse } from "msw";
|
||||
import { MemoryRouter, useLocation } from "react-router";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import type { BrokerageOperation } from "@/entities/broker-operation";
|
||||
import type { IncomeAnalytics } from "@/entities/income";
|
||||
@@ -145,7 +145,6 @@ function renderPage(path: string) {
|
||||
return client;
|
||||
}
|
||||
|
||||
afterEach(() => vi.useRealTimers());
|
||||
beforeEach(() => {
|
||||
server.use(
|
||||
http.post("*/api/v1/auth/refresh", () =>
|
||||
@@ -272,8 +271,6 @@ describe("All accounts routes", () => {
|
||||
);
|
||||
|
||||
it("restores applied dates when switching accounts in events", async () => {
|
||||
vi.useFakeTimers({ toFake: ["Date"] });
|
||||
vi.setSystemTime(new Date("2026-10-15T12:00:00Z"));
|
||||
// The events calendar blocks past dates, so pick within selectable dates.
|
||||
const search = `?from=${defaultPeriod()[0]}&to=${defaultPeriod()[1]}`;
|
||||
renderPage(`/accounts/all/events${search}`);
|
||||
|
||||
Reference in New Issue
Block a user