修正运行页刷新用例的 preview 类型:改用 GameCreationAppPreviewState
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m59s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m13s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m20s
Project CI / Backend tests (pull_request) Successful in 6m36s
Project CI / Frontend tests (pull_request) Successful in 3m15s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m16s
Project CI / Native shell tests (pull_request) Successful in 7m14s
Project CI / Repository checks (pull_request) Successful in 6m4s

- runPreviewRefresh 的 preview 形参从自造字面量类型改为契约类型,避免 status 被放宽成 string 与 view 的 props 冲突(tsconfig.tests.json 才会覆盖 tests/ 目录,此前只跑 tsc -p tsconfig.json 漏检)
- 已跑 npm run ai-game-creator-shell:typecheck(含 check:tests:types)与定向用例确认通过
This commit is contained in:
2026-10-04 14:48:28 +08:00
parent 2bfc62f695
commit 0e75d132a7
@@ -2,7 +2,10 @@
import { cleanup, fireEvent, render, screen } from '@testing-library/react';
import { afterEach, describe, expect, it, vi } from 'vitest';
import { createGameCreationAppManifest } from '../../../packages/shared/src/contracts/gameCreationApp';
import {
createGameCreationAppManifest,
type GameCreationAppPreviewState,
} from '../../../packages/shared/src/contracts/gameCreationApp';
import ProjectDevelopmentView from '../src/view/project-development';
import { installTauriRuntime } from './tauriRuntimeFake';
@@ -38,7 +41,7 @@ function installInvoke() {
}
function renderRunView(
preview: { status: string; url: string | null; port: number | null } = {
preview: GameCreationAppPreviewState = {
status: 'running',
url: PREVIEW_URL,
port: 4173,