feat: rewrite fabricator e2e test with debug bridge for store access
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
- Rewrite e2e/fabricator-happy-path.spec.ts from scratch: craft 8 gear pieces (1 per slot) via Fabricator UI, equip all via store bridge, verify equipment effects - Add debugBridge.ts: exposes Zustand stores on window.__TEST__ so Playwright can call store actions via page.evaluate() - Import debugBridge in page.tsx as side-effect - Uses Debug tab UI for attunement/element unlocking - Uses store bridge for discipline XP, mana capacity, materials, recipe unlocking, and equipment slot assignment - Test passes in ~3.5 minutes (155s craft time + setup)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// ─── Debug Bridge for E2E Testing ──────────────────────────────────────────────
|
||||
// Exposes Zustand stores on window.__TEST__ so Playwright can call
|
||||
// store actions via page.evaluate(). This file is a side-effect import;
|
||||
// it runs once at module load time.
|
||||
|
||||
import { useGameStore } from './gameStore';
|
||||
import { useManaStore } from './manaStore';
|
||||
import { useCombatStore } from './combatStore';
|
||||
import { useCraftingStore } from './craftingStore';
|
||||
import { useAttunementStore } from './attunementStore';
|
||||
import { usePrestigeStore } from './prestigeStore';
|
||||
import { useDisciplineStore } from './discipline-slice';
|
||||
import { useUIStore } from './uiStore';
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
(window as any).__TEST__ = {
|
||||
useGameStore,
|
||||
useManaStore,
|
||||
useCombatStore,
|
||||
useCraftingStore,
|
||||
useAttunementStore,
|
||||
usePrestigeStore,
|
||||
useDisciplineStore,
|
||||
useUIStore,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user