fix: correct broken import paths in test files (stores-tests and index-tests)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 31s

Files in stores/__tests__/stores-tests/ and stores/__tests__/index-tests/
used relative paths (../../types or ../types) that resolved incorrectly.
Fixed all to use '../../../types' to properly reach src/lib/game/types.ts.

Also fixed mana-calculation.test.ts to import computeElementMax from
the correct location (@/lib/game/stores/index instead of @/lib/game/utils).
This commit is contained in:
2026-05-13 23:33:33 +02:00
parent 07b311bd7a
commit ba231ac9dd
8 changed files with 25 additions and 64 deletions
-33
View File
@@ -9,37 +9,18 @@ Mana-Loop/
│ │ └── generate-project-tree.js │ │ └── generate-project-tree.js
│ ├── post-merge │ ├── post-merge
│ └── pre-commit │ └── pre-commit
├── db/
│ └── custom.db
├── docs/ ├── docs/
│ ├── .workflow/
│ │ ├── TASK-001-playwright-setup.json
│ │ └── TASK-006-left-panel-redesign.json
│ ├── strategy/ │ ├── strategy/
│ │ └── overall-remediation-plan.md │ │ └── overall-remediation-plan.md
│ ├── tasks/
│ │ ├── TASK-001-playwright-setup.md
│ │ ├── TASK-005-globals-css-tokens.md
│ │ ├── TASK-006-left-panel-redesign.md
│ │ └── TASK-007-skill-system-v2.md
│ ├── GAME_BRIEFING.md │ ├── GAME_BRIEFING.md
│ ├── active-task-log.md
│ ├── circular-deps.txt │ ├── circular-deps.txt
│ ├── dependency-graph.json │ ├── dependency-graph.json
│ ├── project-structure.txt │ ├── project-structure.txt
│ └── skills.md │ └── skills.md
├── download/
│ └── README.md
├── e2e/ ├── e2e/
│ ├── combat.spec.ts │ ├── combat.spec.ts
│ ├── enchanting.spec.ts │ ├── enchanting.spec.ts
│ └── equipment.spec.ts │ └── equipment.spec.ts
├── examples/
│ └── websocket/
│ ├── frontend.tsx
│ └── server.ts
├── mini-services/
│ └── .gitkeep
├── playwright-report/ ├── playwright-report/
│ ├── data/ │ ├── data/
│ │ ├── 1513ea5b9ea5985996f67ca36f2bc4d34add51f1.webm │ │ ├── 1513ea5b9ea5985996f67ca36f2bc4d34add51f1.webm
@@ -67,8 +48,6 @@ Mana-Loop/
│ │ ├── e59720b989841926cc856d6a00be0a6f8365cf49.webm │ │ ├── e59720b989841926cc856d6a00be0a6f8365cf49.webm
│ │ └── f5ba77f8b20c452bd2c31718b44897276882a465.md │ │ └── f5ba77f8b20c452bd2c31718b44897276882a465.md
│ └── index.html │ └── index.html
├── prisma/
│ └── schema.prisma
├── public/ ├── public/
│ ├── fonts/ │ ├── fonts/
│ │ ├── GeistMonoVF.woff │ │ ├── GeistMonoVF.woff
@@ -77,8 +56,6 @@ Mana-Loop/
│ └── robots.txt │ └── robots.txt
├── src/ ├── src/
│ ├── app/ │ ├── app/
│ │ ├── api/
│ │ │ └── route.ts
│ │ ├── components/ │ │ ├── components/
│ │ │ ├── GameOverScreen.tsx │ │ │ ├── GameOverScreen.tsx
│ │ │ └── LeftPanel.tsx │ │ │ └── LeftPanel.tsx
@@ -521,36 +498,26 @@ Mana-Loop/
│ │ ├── types.ts │ │ ├── types.ts
│ │ ├── upgrade-effects.ts │ │ ├── upgrade-effects.ts
│ │ └── upgrade-effects.types.ts │ │ └── upgrade-effects.types.ts
│ ├── db.ts
│ └── utils.ts │ └── utils.ts
├── test-results/ ├── test-results/
│ └── .last-run.json │ └── .last-run.json
├── .accesslog
├── .dockerignore ├── .dockerignore
├── .gitignore ├── .gitignore
├── 3001
├── AGENTS.md ├── AGENTS.md
├── CLAUDE.md ├── CLAUDE.md
├── Caddyfile ├── Caddyfile
├── Dockerfile ├── Dockerfile
├── README.md ├── README.md
├── add_debugname.py
├── bun.lock ├── bun.lock
├── bunfig.toml ├── bunfig.toml
├── components.json ├── components.json
├── docker-compose.yml ├── docker-compose.yml
├── eslint.config.mjs ├── eslint.config.mjs
├── fix_remaining.py
├── fix_tabs.py
├── fix_tabs2.py
├── next.config.ts ├── next.config.ts
├── package-lock.json ├── package-lock.json
├── package.json ├── package.json
├── playwright.config.ts ├── playwright.config.ts
├── postcss.config.mjs ├── postcss.config.mjs
├── tailwind.config.ts ├── tailwind.config.ts
├── tsconfig-check.json
├── tsconfig-leftpanel.json
├── tsconfig-lp.json
├── tsconfig.json ├── tsconfig.json
└── vitest.config.ts └── vitest.config.ts
@@ -4,7 +4,8 @@
import { describe, it, expect } from 'vitest'; import { describe, it, expect } from 'vitest';
import { calcDamage, getFloorMaxHP, getFloorElement } from '@/lib/game/stores/index'; import { calcDamage, getFloorMaxHP, getFloorElement } from '@/lib/game/stores/index';
import type { GameState } from '../types'; import { GUARDIANS } from '@/lib/game/constants';
import type { GameState } from '../../../types';
function createMockState(overrides: Partial<GameState> = {}): GameState { function createMockState(overrides: Partial<GameState> = {}): GameState {
const elements: Record<string, { current: number; max: number; unlocked: boolean }> = {}; const elements: Record<string, { current: number; max: number; unlocked: boolean }> = {};
@@ -111,8 +112,6 @@ describe('Combat Calculations', () => {
describe('getFloorMaxHP', () => { describe('getFloorMaxHP', () => {
it('should return guardian HP for guardian floors', () => { it('should return guardian HP for guardian floors', () => {
// Import GUARDIANS from constants
import { GUARDIANS } from '@/lib/game/constants';
expect(getFloorMaxHP(10)).toBe(GUARDIANS[10].hp); expect(getFloorMaxHP(10)).toBe(GUARDIANS[10].hp);
expect(getFloorMaxHP(100)).toBe(GUARDIANS[100].hp); expect(getFloorMaxHP(100)).toBe(GUARDIANS[100].hp);
}); });
@@ -4,6 +4,7 @@
import { describe, it, expect } from 'vitest'; import { describe, it, expect } from 'vitest';
import { SKILLS_DEF, PRESTIGE_DEF, GUARDIANS } from '@/lib/game/constants'; import { SKILLS_DEF, PRESTIGE_DEF, GUARDIANS } from '@/lib/game/constants';
import type { GameState } from '../../../types';
describe('Skill Definitions', () => { describe('Skill Definitions', () => {
it('all skills should have valid categories', () => { it('all skills should have valid categories', () => {
@@ -4,7 +4,7 @@
import { describe, it, expect } from 'vitest'; import { describe, it, expect } from 'vitest';
import { computeMaxMana, computeRegen, computeClickMana, computeElementMax } from '@/lib/game/stores/index'; import { computeMaxMana, computeRegen, computeClickMana, computeElementMax } from '@/lib/game/stores/index';
import type { GameState } from '../types'; import type { GameState } from '../../../types';
import { ELEMENTS } from '@/lib/game/constants'; import { ELEMENTS } from '@/lib/game/constants';
function createMockState(overrides: Partial<GameState> = {}): GameState { function createMockState(overrides: Partial<GameState> = {}): GameState {
@@ -53,13 +53,6 @@ function createMockState(overrides: Partial<GameState> = {}): GameState {
containmentWards: 0, containmentWards: 0,
log: [], log: [],
loopInsight: 0, loopInsight: 0,
equipment: { mainHand: null, offHand: null, head: null, body: null, hands: null, accessory: null },
inventory: [],
blueprints: {},
schedule: [],
autoSchedule: false,
studyQueue: [],
craftQueue: [],
attunements: { attunements: {
enchanter: { id: 'enchanter', active: true, level: 1, experience: 0 }, enchanter: { id: 'enchanter', active: true, level: 1, experience: 0 },
invoker: { id: 'invoker', active: false, level: 1, experience: 0 }, invoker: { id: 'invoker', active: false, level: 1, experience: 0 },
@@ -5,7 +5,7 @@
import { describe, it, expect } from 'vitest'; import { describe, it, expect } from 'vitest';
import { getMeditationBonus, calcInsight, getIncursionStrength } from '@/lib/game/stores/index'; import { getMeditationBonus, calcInsight, getIncursionStrength } from '@/lib/game/stores/index';
import { MAX_DAY, INCURSION_START_DAY } from '@/lib/game/constants'; import { MAX_DAY, INCURSION_START_DAY } from '@/lib/game/constants';
import type { GameState } from '../types'; import type { GameState } from '../../../types';
function createMockState(overrides: Partial<GameState> = {}): GameState { function createMockState(overrides: Partial<GameState> = {}): GameState {
const elements: Record<string, { current: number; max: number; unlocked: boolean }> = {}; const elements: Record<string, { current: number; max: number; unlocked: boolean }> = {};
@@ -4,7 +4,7 @@
import { describe, it, expect } from 'vitest'; import { describe, it, expect } from 'vitest';
import { calcDamage } from '@/lib/game/utils'; import { calcDamage } from '@/lib/game/utils';
import type { GameState } from '../../types'; import type { GameState } from '../../../types';
import { ELEMENTS } from '@/lib/game/constants'; import { ELEMENTS } from '@/lib/game/constants';
function createMockState(overrides: Partial<GameState> = {}): GameState { function createMockState(overrides: Partial<GameState> = {}): GameState {
@@ -4,7 +4,7 @@
import { describe, it, expect } from 'vitest'; import { describe, it, expect } from 'vitest';
import { calcInsight } from '@/lib/game/utils'; import { calcInsight } from '@/lib/game/utils';
import type { GameState } from '../../types'; import type { GameState } from '../../../types';
import { ELEMENTS } from '@/lib/game/constants'; import { ELEMENTS } from '@/lib/game/constants';
function createMockState(overrides: Partial<GameState> = {}): GameState { function createMockState(overrides: Partial<GameState> = {}): GameState {
@@ -3,8 +3,9 @@
*/ */
import { describe, it, expect } from 'vitest'; import { describe, it, expect } from 'vitest';
import { computeMaxMana, computeElementMax, computeRegen, computeClickMana } from '@/lib/game/utils'; import { computeMaxMana, computeRegen, computeClickMana } from '@/lib/game/utils';
import type { GameState } from '../../types'; import { computeElementMax } from '@/lib/game/stores/index';
import type { GameState } from '../../../types';
import { ELEMENTS } from '@/lib/game/constants'; import { ELEMENTS } from '@/lib/game/constants';
function createMockState(overrides: Partial<GameState> = {}): GameState { function createMockState(overrides: Partial<GameState> = {}): GameState {