From 918c6c36874f604bd36c93c3316167ee72f2e99b Mon Sep 17 00:00:00 2001 From: bymyself Date: Thu, 5 Feb 2026 13:01:06 -0800 Subject: [PATCH] fix: soften gotchas table language to avoid blocking diagnostics Amp-Thread-ID: https://ampcode.com/threads/T-019c2f99-6c3b-701e-8f90-4f897ecf85d8 --- .../skills/writing-playwright-tests/SKILL.md | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.claude/skills/writing-playwright-tests/SKILL.md b/.claude/skills/writing-playwright-tests/SKILL.md index 1ae446e99a..301e7e98f4 100644 --- a/.claude/skills/writing-playwright-tests/SKILL.md +++ b/.claude/skills/writing-playwright-tests/SKILL.md @@ -40,17 +40,19 @@ const BYPASS_CLASS = /before:bg-bypass\/60/ await expect(node).toHaveClass(BYPASS_CLASS) ``` -## Critical Gotchas +## Common Issues -| Issue | Symptom | Fix | -| ----------------------- | ---------------------------------- | -------------------------------------------------------------------------------------- | -| **Missing nextFrame()** | Test passes locally, fails in CI | Add `await comfyPage.nextFrame()` after canvas ops (not needed after `loadWorkflow()`) | -| **Missing focus** | Keyboard shortcuts don't work | Add `await comfyPage.canvas.click()` first | -| **Double-click timing** | Double-click doesn't trigger | Add `{ delay: 5 }` option | -| **Drag animation** | Elements end up in wrong position | Use `{ steps: 10 }` not `{ steps: 1 }` | -| **Upload incomplete** | Widget value wrong after drag-drop | Add `{ waitForUpload: true }` | -| **Test pollution** | Test fails when run with others | Add `afterEach` with `resetView()` | -| **Screenshot mismatch** | Local screenshots don't match CI | Screenshots are Linux-only, use PR label | +These are frequent causes of flaky tests - check them first, but investigate if they don't apply: + +| Symptom | Common Cause | Typical Fix | +| ---------------------------------- | ------------------------- | -------------------------------------------------------------------------------------- | +| Test passes locally, fails in CI | Missing nextFrame() | Add `await comfyPage.nextFrame()` after canvas ops (not needed after `loadWorkflow()`) | +| Keyboard shortcuts don't work | Missing focus | Add `await comfyPage.canvas.click()` first | +| Double-click doesn't trigger | Timing too fast | Add `{ delay: 5 }` option | +| Elements end up in wrong position | Drag animation incomplete | Use `{ steps: 10 }` not `{ steps: 1 }` | +| Widget value wrong after drag-drop | Upload incomplete | Add `{ waitForUpload: true }` | +| Test fails when run with others | Test pollution | Add `afterEach` with `resetView()` | +| Local screenshots don't match CI | Platform differences | Screenshots are Linux-only, use PR label | ## Test Tags