test(ptica): use tracked mock fixtures instead of git-excluded __preview (CI fix)
CI frontend-tests упал: honesty-тест импортировал фикстуры из
src/app/%5F%5Fpreview/ptica/__fixtures__/ — эта dev-only директория в
.git/info/exclude, поэтому отсутствует в Linux CI checkout (vite:import-analysis
'Failed to resolve import'). Локально (macOS) резолвилось т.к. файлы на диске.
Переключил импорт на tracked src/lib/mocks/parcel-{forecast,analyze}.json
(NEXT_PUBLIC_USE_MOCKS source, в git) — report.exec_summary.key_numbers.
deficit_index присутствует, shape совместим. 138/138 vitest passed.
Refs #1871
This commit is contained in:
parent
2303207629
commit
389bdd3306
1 changed files with 5 additions and 2 deletions
|
|
@ -24,8 +24,11 @@ import {
|
||||||
import type { ParcelAnalysis } from "@/types/site-finder";
|
import type { ParcelAnalysis } from "@/types/site-finder";
|
||||||
import type { ForecastReport } from "@/types/forecast";
|
import type { ForecastReport } from "@/types/forecast";
|
||||||
|
|
||||||
import forecastFixture from "@/app/%5F%5Fpreview/ptica/__fixtures__/forecast.json";
|
// Tracked mock fixtures (NEXT_PUBLIC_USE_MOCKS source). The dev-only
|
||||||
import analyzeFixture from "@/app/%5F%5Fpreview/ptica/__fixtures__/analyze.json";
|
// __preview/ptica/__fixtures__ dir is git-excluded, so it is absent in CI —
|
||||||
|
// these committed mocks keep the suite reproducible on the Linux runner.
|
||||||
|
import forecastFixture from "@/lib/mocks/parcel-forecast.json";
|
||||||
|
import analyzeFixture from "@/lib/mocks/parcel-analyze.json";
|
||||||
|
|
||||||
const analysis = analyzeFixture as unknown as ParcelAnalysis;
|
const analysis = analyzeFixture as unknown as ParcelAnalysis;
|
||||||
const baseReport = (forecastFixture as { report: unknown })
|
const baseReport = (forecastFixture as { report: unknown })
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue