Alexander Brown
ccf459684e
refactor: remove ComfyPage wrapper methods, use helpers directly
...
- Remove 27 deprecated/wrapper methods from ComfyPage
- Migrate callers to use helper classes directly:
- keyboard.selectAll/bypass/undo/redo/moveUp/moveDown
- clipboard.copy/paste
- settings.setSetting/getSetting
- workflow.loadWorkflow/deleteWorkflow/setupWorkflowsDirectory
- contextMenu.clickMenuItem/clickLitegraphMenuItem
- nodeOps.resizeNode with DefaultGraphPositions
- canvasOps.clickEmptySpace with DefaultGraphPositions
- Replace deprecated node click methods with direct canvas clicks
- Replace position getter properties with DefaultGraphPositions imports
Amp-Thread-ID: https://ampcode.com/threads/T-019c15e7-2319-76ec-855e-098ec75ef18a
Co-authored-by: Amp <amp@ampcode.com >
2026-01-31 13:48:43 -08:00
Alexander Brown
7f2454efec
fix(browser_tests): replace .nth() with semantic selectors
...
- Remove unused saveButton selector from ComfyMenu
- Replace widgetTextBox .nth(1) with node-scoped selector
- Replace .nth(3) toast selector with .p-toast-message filter
- Replace .nth(1) category selector with getByTestId
- Replace .nth(1) node selector with getNodeInFolder() helper
- Add nodeSelector(), folderSelector(), getNodeInFolder() methods
- Add saveButton and nodeLibrary TestIds to selectors.ts
Amp-Thread-ID: https://ampcode.com/threads/T-019c155c-92e1-76f3-b6ce-7fc3ffa11582
Co-authored-by: Amp <amp@ampcode.com >
2026-01-31 10:52:41 -08:00
Alexander Brown
82bacb82a7
test: add Playwright test tags for filtering (@smoke, @slow, @screenshot, domains) ( #8441 )
...
## Summary
Adds structured test tags to all 54 Playwright test files to enable
flexible test filtering during development and CI.
## Tags Added
| Tag | Count | Purpose |
|-----|-------|---------|
| `@screenshot` | 32 files | Tests with visual assertions
(`toHaveScreenshot`) |
| `@smoke` | 5 files | Quick essential tests for fast validation |
| `@slow` | 5 files | Long-running tests (templates, subgraph,
featureFlags) |
| `@canvas` | 15 files | Canvas/graph rendering tests |
| `@node` | 10 files | Node behavior tests |
| `@ui` | 8 files | UI component tests |
| `@widget` | 5 files | Widget-specific tests |
| `@workflow` | 3 files | Workflow operations |
| `@subgraph` | 1 file | Subgraph functionality |
| `@keyboard` | 2 files | Keyboard shortcuts |
| `@settings` | 2 files | Settings/preferences |
## Usage Examples
```bash
# Quick validation (~16 tests, ~30s)
pnpm test:browser -- --grep @smoke
# Skip slow tests for faster CI feedback
pnpm test:browser -- --grep-invert @slow
# Skip visual tests (useful for local development without snapshots)
pnpm test:browser -- --grep-invert @screenshot
# Run only canvas-related tests
pnpm test:browser -- --grep @canvas
# Combine filters
pnpm test:browser -- --grep @smoke --grep-invert @screenshot
```
## Implementation Details
- Uses Playwright's native tag syntax: `test.describe('Name', { tag:
'@tag' }, ...)`
- Tags inherit from describe blocks to child tests
- Preserves existing project-level tags: `@mobile`, `@2x`, `@0.5x`
- Multiple tags supported: `{ tag: ['@screenshot', '@smoke'] }`
## Test Plan
- [x] All existing tests pass unchanged
- [x] Tag filtering works with `--grep` and `--grep-invert`
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8441-test-add-Playwright-test-tags-for-filtering-smoke-slow-screenshot-domains-2f76d73d36508184990ec859c8fd7629 )
by [Unito](https://www.unito.io )
---------
Co-authored-by: Amp <amp@ampcode.com >
Co-authored-by: GitHub Action <action@github.com >
2026-01-29 16:34:56 -08:00
Alexander Brown
14369c08a3
refactor: parallelize bootstrap and simplify lifecycle with VueUse ( #8307 )
...
## Summary
Refactors bootstrap and lifecycle management to parallelize
initialization, use Vue best practices, and fix a logout state bug.
## Changes
### Bootstrap Store (`bootstrapStore.ts`)
- Extract early bootstrap logic into a dedicated store using
`useAsyncState`
- Parallelize settings, i18n, and workflow sync loading (previously
sequential)
- Handle multi-user login scenarios by deferring settings/workflows
until authenticated
### GraphCanvas Refactoring
- Move non-DOM composables (`useGlobalLitegraph`, `useCopy`, `usePaste`,
etc.) to script setup level for earlier initialization
- Move `watch` and `whenever` declarations outside `onMounted` (Vue best
practice)
- Use `until()` from VueUse to await bootstrap store readiness instead
of direct async calls
### GraphView Simplification
- Replace manual `addEventListener`/`removeEventListener` with
`useEventListener`
- Replace `setInterval` with `useIntervalFn` for automatic cleanup
- Move core command registration to script setup level
### Bug Fix
Using `router.push()` for logout caused `isSettingsReady` to persist as
`true`, making new users inherit the previous user's cached settings.
Reverted to `window.location.reload()` with TODOs for future store reset
implementation.
## Testing
- Verified login/logout cycle clears settings correctly
- Verified bootstrap sequence completes without errors
---------
Co-authored-by: Amp <amp@ampcode.com >
2026-01-27 12:50:13 -08:00
Alexander Brown
d444b2c285
Test: Double timeout for Version Mismatch Warnings ( #5814 )
...
## Summary
`should persist dismissed state across sessions`
https://ccfbaff5.comfyui-playwright-chromium.pages.dev/#?testId=b07187838e41a32597d7-951ff47f196f7f22f516
https://7bf44be0.comfyui-playwright-chromium.pages.dev/#?testId=b07187838e41a32597d7-951ff47f196f7f22f516
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5814-Test-Double-timeout-for-Version-Mismatch-Warnings-27b6d73d365081be8c73c9a12759f83e )
by [Unito](https://www.unito.io )
2025-09-27 20:08:00 +10:00
Christian Byrne
3ee0d394ca
fix flaky version mismatch warning browser test ( #5792 )
...
Adds a wait to ensure the dismissed state is saved to localstorage
properly before `setup` (page reload).
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5792-fix-broken-test-27a6d73d365081e69c1febbc246448fa )
by [Unito](https://www.unito.io )
2025-09-25 21:15:03 -07:00
Alexander Brown
b264685052
lint: add tsconfig for browser_tests, fix existing violations ( #5633 )
...
## Summary
See https://typescript-eslint.io/blog/project-service/ for context.
Creates a browser_tests specific tsconfig so that they can be linted.
Does not add a package.json script to do the linting yet, but `pnpm exec
eslint browser_tests` should work for now.
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5633-lint-add-tsconfig-for-browser_tests-fix-existing-violations-2726d73d3650819d8ef2c4b0abc31e14 )
by [Unito](https://www.unito.io )
2025-09-18 11:35:44 -07:00
SHIVANSH GUPTA
577cd23c3e
Feature Implemented: Warning displayed when frontend version mismatches ( #4363 )
...
Co-authored-by: bymyself <cbyrne@comfy.org >
Co-authored-by: Claude <noreply@anthropic.com >
2025-07-28 18:23:49 -07:00