docs: add Vue Nodes vs LiteGraph API decision tree to SKILL.md

Amp-Thread-ID: https://ampcode.com/threads/T-019c1640-f128-732b-b621-2621ce8b48d1
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
bymyself
2026-01-31 15:19:28 -08:00
parent 764f1292b6
commit 5dca3c31d6

View File

@@ -15,6 +15,32 @@ description: 'Writes Playwright e2e tests for ComfyUI_frontend. Use when creatin
- More stable, faster, easier to debug
- See [testing/assets.md](testing/assets.md) for details
## Vue Nodes vs LiteGraph: Which API?
**Choose your approach based on what you're testing:**
| Rendering Mode | When to Use | API Style |
|----------------|-------------|-----------|
| **Vue Nodes 2.0** | Testing Vue-rendered node UI, DOM widgets, CSS states | `comfyPage.vueNodes.*`, Playwright locators (`getByText`, `getByRole`) |
| **LiteGraph (Canvas)** | Testing canvas interactions, connections, legacy behavior | `comfyPage.getNodeRefByTitle()`, `NodeReference` methods |
### Vue Nodes 2.0
```typescript
await comfyPage.setSetting('Comfy.VueNodes.Enabled', true)
await comfyPage.vueNodes.waitForNodes()
const node = comfyPage.vueNodes.getNodeByTitle('KSampler') // Returns Locator
await comfyPage.page.getByText('Load Checkpoint').click()
```
→ See [features/vue-nodes.md](features/vue-nodes.md)
### LiteGraph (Canvas)
```typescript
const node = comfyPage.getNodeRefByTitle('KSampler') // Returns NodeReference
await node.click()
const slot = node.getOutputSlot('MODEL')
```
→ See [core/nodes.md](core/nodes.md) and [core/canvas.md](core/canvas.md)
## Quick Reference
| Task | Load This File |