Skip to content

Commit c1ed780

Browse files
committed
Experiment: See what happens when we just remove the existing fixed timeouts.
1 parent 6081404 commit c1ed780

21 files changed

+5
-91
lines changed

browser_tests/fixtures/ComfyPage.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,9 +1272,6 @@ export class ComfyPage {
12721272
}, 'image/png')
12731273
})
12741274
}, filename)
1275-
1276-
// Wait a bit for the download to process
1277-
await this.page.waitForTimeout(500)
12781275
}
12791276

12801277
/**

browser_tests/fixtures/components/ComfyNodeSearchBox.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ export class ComfyNodeSearchBox {
6060
await this.input.waitFor({ state: 'visible' })
6161
await this.input.fill(nodeName)
6262
await this.dropdown.waitFor({ state: 'visible' })
63-
// Wait for some time for the auto complete list to update.
64-
// The auto complete list is debounced and may take some time to update.
65-
await this.page.waitForTimeout(500)
6663
await this.dropdown
6764
.locator('li')
6865
.nth(options?.suggestionIndex || 0)

browser_tests/fixtures/components/SidebarTab.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ export class WorkflowsSidebarTab extends SidebarTab {
116116
async switchToWorkflow(workflowName: string) {
117117
const workflowLocator = this.getOpenedItem(workflowName)
118118
await workflowLocator.click()
119-
await this.page.waitForTimeout(300)
120119
}
121120

122121
getOpenedItem(name: string) {
@@ -138,7 +137,6 @@ export class WorkflowsSidebarTab extends SidebarTab {
138137
.click()
139138
await this.page.keyboard.type(newName)
140139
await this.page.keyboard.press('Enter')
141-
await this.page.waitForTimeout(300)
142140
}
143141

144142
async insertWorkflow(locator: Locator) {

browser_tests/fixtures/components/Topbar.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export class Topbar {
9595
}
9696

9797
async openTopbarMenu() {
98-
await this.page.waitForTimeout(1000)
9998
await this.menuTrigger.click()
10099
await this.menuLocator.waitFor({ state: 'visible' })
101100
return this.menuLocator

browser_tests/fixtures/utils/litegraphUtils.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ export class NodeReference {
462462
async convertToSubgraph() {
463463
await this.clickContextMenuOption('Convert to Subgraph')
464464
await this.comfyPage.nextFrame()
465-
await this.comfyPage.page.waitForTimeout(256)
466465
const nodes = await this.comfyPage.getNodeRefsByTitle('New Subgraph')
467466
if (nodes.length !== 1) {
468467
throw new Error(
@@ -511,7 +510,6 @@ export class NodeReference {
511510
// Double-click to enter subgraph
512511
await this.comfyPage.canvas.dblclick({ position, force: true })
513512
await this.comfyPage.nextFrame()
514-
await this.comfyPage.page.waitForTimeout(500)
515513

516514
// Check if we successfully entered the subgraph
517515
isInSubgraph = await this.comfyPage.page.evaluate(() => {

browser_tests/tests/backgroundImageUpload.spec.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ test.describe('Background Image Upload', () => {
7575
// Upload the test image
7676
await fileChooser.setFiles(comfyPage.assetPath('image32x32.webp'))
7777

78-
// Wait for upload to complete and verify the setting was updated
79-
await comfyPage.page.waitForTimeout(500) // Give time for file reading
80-
8178
// Verify the URL input now has an API URL
8279
const urlInput = backgroundImageSetting.locator('input[type="text"]')
8380
const inputValue = await urlInput.inputValue()
@@ -191,14 +188,11 @@ test.describe('Background Image Upload', () => {
191188
)
192189
await uploadButton.hover()
193190

194-
// Wait for tooltip to appear and verify it exists
195-
await comfyPage.page.waitForTimeout(700) // Tooltip delay
196191
const uploadTooltip = comfyPage.page.locator('.p-tooltip:visible')
197192
await expect(uploadTooltip).toBeVisible()
198193

199194
// Move away to hide tooltip
200195
await comfyPage.page.locator('body').hover()
201-
await comfyPage.page.waitForTimeout(100)
202196

203197
// Set a background to enable clear button
204198
const urlInput = backgroundImageSetting.locator('input[type="text"]')
@@ -209,8 +203,6 @@ test.describe('Background Image Upload', () => {
209203
const clearButton = backgroundImageSetting.locator('button:has(.pi-trash)')
210204
await clearButton.hover()
211205

212-
// Wait for tooltip to appear and verify it exists
213-
await comfyPage.page.waitForTimeout(700) // Tooltip delay
214206
const clearTooltip = comfyPage.page.locator('.p-tooltip:visible')
215207
await expect(clearTooltip).toBeVisible()
216208
})

browser_tests/tests/colorPalette.spec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,13 @@ test.describe('Node Color Adjustments', () => {
203203
comfyPage
204204
}) => {
205205
await comfyPage.setSetting('Comfy.Node.Opacity', 0.5)
206-
await comfyPage.page.waitForTimeout(128)
207206

208207
// Drag mouse to force canvas to redraw
209208
await comfyPage.page.mouse.move(0, 0)
210209

211210
await expect(comfyPage.canvas).toHaveScreenshot('node-opacity-0.5.png')
212211

213212
await comfyPage.setSetting('Comfy.Node.Opacity', 1.0)
214-
await comfyPage.page.waitForTimeout(128)
215213

216214
await comfyPage.page.mouse.move(8, 8)
217215
await expect(comfyPage.canvas).toHaveScreenshot('node-opacity-1.png')
@@ -235,7 +233,6 @@ test.describe('Node Color Adjustments', () => {
235233
await comfyPage.setSetting('Comfy.Node.Opacity', 0.5)
236234
await comfyPage.setSetting('Comfy.ColorPalette', 'light')
237235
const saveWorkflowInterval = 1000
238-
await comfyPage.page.waitForTimeout(saveWorkflowInterval)
239236
const workflow = await comfyPage.page.evaluate(() => {
240237
return localStorage.getItem('workflow')
241238
})

browser_tests/tests/dialog.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ test('Does not report warning on undo/redo', async ({ comfyPage }) => {
4343

4444
// Wait for any async operations to complete after dialog closes
4545
await comfyPage.nextFrame()
46-
await comfyPage.page.waitForTimeout(100)
4746

4847
// Make a change to the graph
4948
await comfyPage.doubleClickCanvas()

browser_tests/tests/featureFlags.spec.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ test.describe('Feature Flags', () => {
9494
test('Server feature flags are received and accessible', async ({
9595
comfyPage
9696
}) => {
97-
// Wait for connection to establish
98-
await comfyPage.page.waitForTimeout(1000)
99-
10097
// Get the actual server feature flags from the backend
10198
const serverFlags = await comfyPage.page.evaluate(() => {
10299
return window['app'].api.serverFeatureFlags
@@ -116,9 +113,6 @@ test.describe('Feature Flags', () => {
116113
test('serverSupportsFeature method works with real backend flags', async ({
117114
comfyPage
118115
}) => {
119-
// Wait for connection
120-
await comfyPage.page.waitForTimeout(1000)
121-
122116
// Test serverSupportsFeature with real backend flags
123117
const supportsPreviewMetadata = await comfyPage.page.evaluate(() => {
124118
return window['app'].api.serverSupportsFeature(
@@ -170,9 +164,6 @@ test.describe('Feature Flags', () => {
170164
test('getServerFeature method works with real backend data', async ({
171165
comfyPage
172166
}) => {
173-
// Wait for connection
174-
await comfyPage.page.waitForTimeout(1000)
175-
176167
// Test getServerFeature method
177168
const previewMetadataValue = await comfyPage.page.evaluate(() => {
178169
return window['app'].api.getServerFeature('supports_preview_metadata')
@@ -199,9 +190,6 @@ test.describe('Feature Flags', () => {
199190
test('getServerFeatures returns all backend feature flags', async ({
200191
comfyPage
201192
}) => {
202-
// Wait for connection
203-
await comfyPage.page.waitForTimeout(1000)
204-
205193
// Test getServerFeatures returns all flags
206194
const allFeatures = await comfyPage.page.evaluate(() => {
207195
return window['app'].api.getServerFeatures()
@@ -248,9 +236,6 @@ test.describe('Feature Flags', () => {
248236
test('Server features are immutable when accessed via getServerFeatures', async ({
249237
comfyPage
250238
}) => {
251-
// Wait for connection to establish
252-
await comfyPage.page.waitForTimeout(1000)
253-
254239
const immutabilityTest = await comfyPage.page.evaluate(() => {
255240
// Get a copy of server features
256241
const features1 = window['app'].api.getServerFeatures()

browser_tests/tests/groupNode.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,12 @@ test.describe('Group Node', () => {
320320
test('Convert to group node, no selection', async ({ comfyPage }) => {
321321
expect(await comfyPage.getVisibleToastCount()).toBe(0)
322322
await comfyPage.page.keyboard.press('Alt+g')
323-
await comfyPage.page.waitForTimeout(300)
324323
expect(await comfyPage.getVisibleToastCount()).toBe(1)
325324
})
326325
test('Convert to group node, selected 1 node', async ({ comfyPage }) => {
327326
expect(await comfyPage.getVisibleToastCount()).toBe(0)
328327
await comfyPage.clickTextEncodeNode1()
329328
await comfyPage.page.keyboard.press('Alt+g')
330-
await comfyPage.page.waitForTimeout(300)
331329
expect(await comfyPage.getVisibleToastCount()).toBe(1)
332330
})
333331
})

0 commit comments

Comments
 (0)