Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: "3.13"
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
cache-suffix: backend
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: "3.13"
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
cache-suffix: integration
Expand Down
1,260 changes: 438 additions & 822 deletions frontend/package-lock.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,29 @@
"typecheck": "tsc -b --pretty false && tsc -p tsconfig.e2e.json --pretty false"
},
"dependencies": {
"@tanstack/react-query": "5.101.2",
"react": "19.2.7",
"react-dom": "19.2.7",
"react-router-dom": "7.18.1"
"@tanstack/react-query": "5.101.4",
"react": "19.2.8",
"react-dom": "19.2.8",
"react-router-dom": "7.18.2"
},
"devDependencies": {
"@axe-core/playwright": "4.12.1",
"@eslint/js": "10.0.1",
"@playwright/test": "^1.61.1",
"@testing-library/jest-dom": "6.9.1",
"@playwright/test": "^1.62.1",
"@testing-library/jest-dom": "7.0.1",
"@testing-library/react": "16.3.2",
"@testing-library/user-event": "14.6.1",
"@types/node": "26.1.1",
"@types/react": "19.2.17",
"@types/react-dom": "19.2.3",
"@vitejs/plugin-react": "6.0.3",
"eslint": "10.7.0",
"@testing-library/user-event": "14.6.6",
"@types/node": "26.2.0",
"@types/react": "19.2.18",
"@types/react-dom": "19.2.4",
"@vitejs/plugin-react": "6.1.0",
"eslint": "10.9.0",
"eslint-plugin-react-hooks": "7.1.1",
"eslint-plugin-react-refresh": "0.5.3",
"jsdom": "29.1.1",
"eslint-plugin-react-refresh": "0.5.4",
"jsdom": "30.0.1",
"typescript": "6.0.3",
"typescript-eslint": "8.64.0",
"vite": "8.1.4",
"vitest": "4.1.10"
"typescript-eslint": "8.67.0",
"vite": "8.2.2",
"vitest": "4.1.11"
}
}
2 changes: 1 addition & 1 deletion frontend/src/components/OledLoginDisplay.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("OLED login display", () => {
});

it("disables pointer animation for reduced motion", () => {
vi.mocked(window.matchMedia).mockImplementation((query: string) => ({
vi.spyOn(window, "matchMedia").mockImplementation((query: string) => ({
matches: query.includes("reduced-motion"), media: query, onchange: null,
addEventListener: vi.fn(), removeEventListener: vi.fn(), addListener: vi.fn(),
removeListener: vi.fn(), dispatchEvent: vi.fn(),
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/pages/UserManagementPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ describe("temporary editor management", () => {
throw new Error(`Unexpected request: ${url}`);
});
vi.stubGlobal("fetch", fetchMock);
vi.stubGlobal("confirm", vi.fn(() => true));
const confirmMock = vi.fn(() => true);
vi.stubGlobal("confirm", confirmMock);
const client = createQueryClient();
client.setDefaultOptions({ queries: { retry: false }, mutations: { retry: false } });
const user = userEvent.setup();
Expand Down Expand Up @@ -211,7 +212,9 @@ describe("temporary editor management", () => {
}),
);
expect(await screen.findByText("Учётная запись заблокирована.")).toBeVisible();
expect(window.confirm).toHaveBeenCalledWith("Заблокировать пользователя «Активный редактор»?");
expect(confirmMock.mock.calls).toContainEqual([
"Заблокировать пользователя «Активный редактор»?",
]);
expect(
fetchMock.mock.calls.some(
([request, options]) =>
Expand Down
16 changes: 16 additions & 0 deletions frontend/src/test/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,23 @@ import "@testing-library/jest-dom/vitest";
import { cleanup } from "@testing-library/react";
import { afterEach, beforeEach, vi } from "vitest";

function memoryStorage(): Storage {
const values = new Map<string, string>();
return {
clear: () => { values.clear(); },
getItem: (key) => values.get(key) ?? null,
key: (index) => Array.from(values.keys())[index] ?? null,
get length() { return values.size; },
removeItem: (key) => { values.delete(key); },
setItem: (key, value) => { values.set(key, value); },
};
}

beforeEach(() => {
Object.defineProperty(window, "localStorage", {
configurable: true,
value: memoryStorage(),
});
Object.defineProperty(window, "matchMedia", {
configurable: true,
value: vi.fn((query: string) => ({
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/theme/ThemeProvider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe("theme provider", () => {
window.localStorage.setItem("ackb-theme", "system");
let dark = true;
let changeListener: (() => void) | undefined;
vi.mocked(window.matchMedia).mockImplementation((query: string) => ({
vi.spyOn(window, "matchMedia").mockImplementation((query: string) => ({
get matches() { return query.includes("dark") && dark; },
media: query,
onchange: null,
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools==80.9.0"]
requires = ["setuptools==84.0.0"]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -42,10 +42,10 @@ dev = [
"bandit>=1.9,<2",
"build>=1.2,<2",
"hypothesis>=6.100,<7",
"mypy>=1.11,<2",
"mypy>=1.11,<3",
"pip-audit>=2.9,<3",
"pytest>=8.3,<9",
"pytest-asyncio>=0.25,<1",
"pytest>=8.3,<10",
"pytest-asyncio>=0.25,<2",
"ruff>=0.9,<1",
]

Expand Down
6 changes: 3 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading