Skip to content
Merged
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
9 changes: 6 additions & 3 deletions apps/mapgen-studio/test/runInGame/AppFooter.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it, vi } from "vitest";

import { AppFooter } from "../../src/ui/components/AppFooter";
import { TooltipProvider } from "../../src/components/ui/tooltip";
import type { RecipeSettings, WorldSettings } from "../../src/ui/types";
import type { RunInGameOperationStatus } from "../../src/features/runInGame/status";

Expand All @@ -19,8 +20,9 @@ const worldSettings: WorldSettings = {

function renderFooter(status: RunInGameOperationStatus, relation: "current" | "stale" | "unknown" = "unknown") {
return renderToStaticMarkup(
<AppFooter
status="ready"
<TooltipProvider>
<AppFooter
status="ready"
lastRunSettings={recipeSettings}
lastGlobalSettings={worldSettings}
currentSettings={recipeSettings}
Expand All @@ -39,7 +41,8 @@ function renderFooter(status: RunInGameOperationStatus, relation: "current" | "s
liveRuntime={{ status: "ok", readiness: "shell" }}
autoRunEnabled={false}
onAutoRunEnabledChange={vi.fn()}
/>
/>
</TooltipProvider>
);
}

Expand Down
3 changes: 3 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export default defineConfig({
{
extends: true,
root: r('apps/mapgen-studio'),
// Mirror the app's `@/*` -> src alias (tsconfig + vite) so vitest resolves
// the shadcn `components/ui` -> `@/lib/utils` import chain.
resolve: { alias: { '@': r('apps/mapgen-studio/src') } },
test: { name: 'mapgen-studio' }
},
{
Expand Down