mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
Three integrated systems for AI-assisted browser test creation:
1. comfy-test CLI (tools/test-recorder/)
- Interactive 7-step recording flow for QA testers and non-developers
- Environment checks with platform-specific install guidance
- Codegen-to-convention transform engine
- PR creation via gh CLI or manual GitHub web UI instructions
- Commands: record, transform, check, list
2. Playwright AI agents (.claude/agents/)
- Planner, generator, and healer agents patched with ComfyUI context
- Regeneration scripts for Playwright updates (scripts/update-playwright-agents.sh)
- MCP server config (.mcp.json) for agent browser interaction
- Seed test and specs directory for agent-generated tests
3. Codegen transform skill (.claude/skills/codegen-transform/)
- Transform rules: @playwright/test → comfyPageFixture, page → comfyPage,
remove goto, canvas locators, waitForTimeout → nextFrame
- Structural transforms: wrap in describe with tags, add afterEach cleanup
- Fixture API reference and before/after examples
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import { execSync } from 'node:child_process'
|
|
import { detectPlatform } from './platform'
|
|
import { pass, fail, info } from '../ui/logger'
|
|
import type { CheckResult } from './types'
|
|
|
|
export async function checkGit(): Promise<CheckResult> {
|
|
try {
|
|
const version = execSync('git --version', { encoding: 'utf-8' }).trim()
|
|
const v = version.replace('git version ', '')
|
|
pass('Git', v)
|
|
return { name: 'Git', ok: true, version: v }
|
|
} catch {
|
|
fail('Git', 'not installed')
|
|
const platform = detectPlatform()
|
|
const instructions =
|
|
platform === 'macos'
|
|
? [
|
|
'Git is included with Xcode CLI Tools. Install them first:',
|
|
'',
|
|
' xcode-select --install'
|
|
]
|
|
: platform === 'windows'
|
|
? [
|
|
'Download Git from: https://git-scm.com/download/win',
|
|
'Run the installer with default settings.'
|
|
]
|
|
: [
|
|
'Install git using your package manager:',
|
|
'',
|
|
' sudo apt install git # Debian/Ubuntu',
|
|
' sudo dnf install git # Fedora',
|
|
' sudo pacman -S git # Arch'
|
|
]
|
|
info(instructions)
|
|
return { name: 'Git', ok: false, installInstructions: instructions }
|
|
}
|
|
}
|