Files
ComfyUI_frontend/browser_tests/tests/recordAudio.spec.ts
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

30 lines
1.0 KiB
TypeScript

import { expect } from '@playwright/test'
import { comfyPageFixture as test } from '../fixtures/ComfyPage'
test.beforeEach(async ({ comfyPage }) => {
await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Disabled')
})
test.describe('Record Audio Node', { tag: '@screenshot' }, () => {
test('should add a record audio node and take a screenshot', async ({
comfyPage
}) => {
// Open the search box by double clicking on the canvas
await comfyPage.canvasOps.doubleClick()
await expect(comfyPage.searchBox.input).toHaveCount(1)
// Search for and add the RecordAudio node
await comfyPage.searchBox.fillAndSelectFirstNode('RecordAudio')
await comfyPage.nextFrame()
// Verify the RecordAudio node was added
const recordAudioNodes =
await comfyPage.nodeOps.getNodeRefsByType('RecordAudio')
expect(recordAudioNodes.length).toBe(1)
// Take a screenshot of the canvas with the RecordAudio node
await expect(comfyPage.canvas).toHaveScreenshot('record_audio_node.png')
})
})