Repository navigation
Conversation
Adds `await expect(locator).toBeVisible()` before `.click()` calls across 104 test and fixture files (431 assertions). Gives immediate, descriptive failures instead of generic actionability timeouts. Skips force clicks, canvas/mouse coordinate clicks, custom click methods, catch chains, and toPass retry blocks. Updates FLAKE_PREVENTION_RULES.md with the new rule.
📝 WalkthroughWalkthroughThis PR adds explicit Playwright visibility assertions ( Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎭 Playwright: ✅ 992 passed, 0 failed · 2 flaky📊 Browser Reports
|
🎨 Storybook: ✅ Built — View Storybook |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (9)
browser_tests/fixtures/VueNodeHelpers.ts (1)
185-193:⚠️ Potential issue | 🟡 MinorMove the visibility assertion before
boundingBox()inenterSubgraph.Line 185 computes the box before the visibility wait, so Line 186 can fail early and bypass the intended retrying assertion. Put
await expect(editButton).toBeVisible()first, then readboundingBox().🔧 Proposed fix
- const box = await editButton.boundingBox() - if (!box) { - throw new Error( - 'subgraph-enter-button has no bounding box: element may be hidden or not in DOM' - ) - } - await expect(editButton).toBeVisible() + await expect(editButton).toBeVisible() + const box = await editButton.boundingBox() + if (!box) { + throw new Error( + 'subgraph-enter-button has no bounding box: element may be hidden or not in DOM' + ) + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/VueNodeHelpers.ts` around lines 185 - 193, In enterSubgraph, move the visibility assertion so it runs before calling editButton.boundingBox(): call await expect(editButton).toBeVisible() first, then call const box = await editButton.boundingBox() and keep the existing null check and click using box; this ensures the toBeVisible retry happens before computing the bounding box for editButton.browser_tests/tests/minimap.spec.ts (1)
55-62:⚠️ Potential issue | 🟡 MinorAdd the same visibility guard before the second toggle click
The first click is guarded, but the second click at Line 61 isn’t. Mirror the same precondition there for consistency and better failure diagnostics.
Suggested fix
await expect(minimapContainer).not.toBeVisible() + await expect(toggleButton).toBeVisible() await toggleButton.click() await comfyPage.nextFrame()🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/minimap.spec.ts` around lines 55 - 62, The second toggle click lacks the visibility precondition; before calling toggleButton.click() the second time, add the same guard used earlier—await expect(toggleButton).toBeVisible()—so the test asserts the button is visible (using the same toggleButton and comfyPage.nextFrame() context) prior to clicking and improves failure diagnostics of minimapContainer visibility toggling.browser_tests/fixtures/helpers/ToastHelper.ts (1)
29-35:⚠️ Potential issue | 🟠 MajorAvoid iterating a static
.all()snapshot while removing toast items
locator.all()+ per-item click on a shrinking list can skip buttons or hit a missing index. Iterate the first visible close button until none remain.Suggested fix
- const toastCloseButtons = await this.page - .locator('.p-toast-close-button') - .all() - for (const button of toastCloseButtons) { - await expect(button).toBeVisible() - await button.click() - } + const toastCloseButtons = this.page.locator('.p-toast-close-button') + while ((await toastCloseButtons.count()) > 0) { + const button = toastCloseButtons.first() + await expect(button).toBeVisible() + await button.click() + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/helpers/ToastHelper.ts` around lines 29 - 35, The current code captures a static snapshot via toastCloseButtons = this.page.locator('.p-toast-close-button').all() and then clicks each item, which can fail as the DOM shrinks; change to repeatedly query the live locator for '.p-toast-close-button' (use this.page.locator('.p-toast-close-button').first() or .nth(0)) and loop: while a close button exists/ is visible, click that first button and continue until count is zero. Replace use of toastCloseButtons and .all() with a live-loop that checks locator.count() or locator.first().isVisible() each iteration to safely remove toasts.browser_tests/tests/queue/queueOverlay.spec.ts (1)
91-110:⚠️ Potential issue | 🟡 MinorAdd missing visibility checks before the remaining click calls.
Line 93 and Line 110 still click without an immediate
toBeVisible()guard, so this file is not fully consistent with the new rule.Suggested patch
- await comfyPage.page - .getByRole('button', { name: 'Completed', exact: true }) - .click() + const completedTab = comfyPage.page.getByRole('button', { + name: 'Completed', + exact: true + }) + await expect(completedTab).toBeVisible() + await completedTab.click() @@ - await toggle.click() + await expect(toggle).toBeVisible() + await toggle.click()As per coding guidelines
browser_tests/tests/**/*.spec.ts: “Refer tobrowser_tests/FLAKE_PREVENTION_RULES.mdwhen triaging or editing flaky browser tests.”🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/queue/queueOverlay.spec.ts` around lines 91 - 110, The test clicks elements without asserting visibility first; add explicit visibility guards before each click: for the "Completed" button call use await expect(comfyPage.page.getByRole('button', { name: 'Completed', exact: true })).toBeVisible() immediately before the .click(), and for the overlay toggle use await expect(toggle).toBeVisible() before both toggle.click() calls (the initial click and the final click) where toggle is assigned from comfyPage.page.getByTestId(TestIds.queue.overlayToggle); this follows the FLAKE_PREVENTION_RULES for flaky browser tests.browser_tests/fixtures/components/ComfyNodeSearchBox.ts (1)
25-34:⚠️ Potential issue | 🟠 MajorThe filter option click should also be visibility-guarded.
p-select-dropdownis guarded, but the subsequent option click is still unguarded in this flow.Suggested patch
async selectFilterValue(filterValue: string) { await expect( this.page.locator('.filter-value-select .p-select-dropdown') ).toBeVisible() await this.page.locator('.filter-value-select .p-select-dropdown').click() + const option = this.page.locator( + `.p-select-overlay .p-select-list .p-select-option-label:text-is("${filterValue}")` + ) + await expect(option).toBeVisible() - await this.page - .locator( - `.p-select-overlay .p-select-list .p-select-option-label:text-is("${filterValue}")` - ) - .click() + await option.click() }As per coding guidelines:
browser_tests/tests/**/*.spec.ts: Refer to@browser_tests/FLAKE_PREVENTION_RULES.mdwhen triaging or editing flaky browser tests.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/components/ComfyNodeSearchBox.ts` around lines 25 - 34, The option click in selectFilterValue is not guarded for visibility; update the method (selectFilterValue) to wait/assert that the option locator `.p-select-overlay .p-select-list .p-select-option-label:text-is("${filterValue}")` is visible before calling click (e.g., use expect(...).toBeVisible() or a locator.waitFor({ state: 'visible' })), ensuring the option is ready and preventing flaky failures after the `.p-select-dropdown` guard.browser_tests/tests/selectionToolbox.spec.ts (1)
209-223:⚠️ Potential issue | 🟠 MajorSeveral swatch clicks are still unguarded by visibility assertions.
colorBlue/colorRedoption clicks in these flows still bypass the new visibility-before-click rule, so these paths remain more brittle than intended.Suggested patch
await getColorPickerButton(comfyPage).click() - await getColorPickerGroup(comfyPage) - .getByTestId(TestIds.selectionToolbox.colorBlue) - .click() + const blueOption = getColorPickerGroup(comfyPage).getByTestId( + TestIds.selectionToolbox.colorBlue + ) + await expect(blueOption).toBeVisible() + await blueOption.click() @@ await getColorPickerButton(comfyPage).click() - await getColorPickerGroup(comfyPage) - .getByTestId(TestIds.selectionToolbox.colorRed) - .click() + const redOption = getColorPickerGroup(comfyPage).getByTestId( + TestIds.selectionToolbox.colorRed + ) + await expect(redOption).toBeVisible() + await redOption.click() @@ await getColorPickerButton(comfyPage).click() - await getColorPickerGroup(comfyPage) - .getByTestId(TestIds.selectionToolbox.colorBlue) - .click() + const blueOption = getColorPickerGroup(comfyPage).getByTestId( + TestIds.selectionToolbox.colorBlue + ) + await expect(blueOption).toBeVisible() + await blueOption.click() @@ await getColorPickerButton(comfyPage).click() - await getColorPickerGroup(comfyPage) - .getByTestId(TestIds.selectionToolbox.colorBlue) - .click() + const blueOption = getColorPickerGroup(comfyPage).getByTestId( + TestIds.selectionToolbox.colorBlue + ) + await expect(blueOption).toBeVisible() + await blueOption.click()As per coding guidelines:
browser_tests/tests/**/*.spec.ts: Refer to@browser_tests/FLAKE_PREVENTION_RULES.mdwhen triaging or editing flaky browser tests.Also applies to: 240-266
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/selectionToolbox.spec.ts` around lines 209 - 223, The color swatch clicks for TestIds.selectionToolbox.colorBlue and TestIds.selectionToolbox.colorRed are not guarded by visibility assertions, making the test brittle; before calling getColorPickerGroup(...).getByTestId(...).click() insert await expect(getColorPickerGroup(comfyPage).getByTestId(TestIds.selectionToolbox.colorBlue|colorRed)).toBeVisible() (and ensure getColorPickerButton(comfyPage) is visible/clicked as already done) so each swatch click is preceded by an explicit visibility check; apply the same visibility-guard pattern to the similar blocks referenced around the 240-266 range and keep using comfyPage.nodeOps.selectNodes(...) as the selection step.browser_tests/tests/propertiesPanel/nodeSettings.spec.ts (1)
111-113:⚠️ Potential issue | 🟠 MajorPinned toggle still has unguarded clicks.
panel.pinnedSwitch.click()at Line 112 and Line 125 should also be preceded bytoBeVisible()to stay consistent with the new anti-flake rule.Suggested patch
test('should toggle pinned state', async ({ comfyPage }) => { + await expect(panel.pinnedSwitch).toBeVisible() await panel.pinnedSwitch.click() @@ - await panel.pinnedSwitch.click() + await expect(panel.pinnedSwitch).toBeVisible() + await panel.pinnedSwitch.click()As per coding guidelines: “
browser_tests/tests/**/*.spec.ts: Refer to@browser_tests/FLAKE_PREVENTION_RULES.mdwhen triaging or editing flaky browser tests.”Also applies to: 125-125
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/propertiesPanel/nodeSettings.spec.ts` around lines 111 - 113, The test currently performs unguarded clicks on panel.pinnedSwitch (panel.pinnedSwitch.click()) which violates the FLAKE_PREVENTION_RULES; before each click (the occurrences in the test around the pinned toggle) add an await panel.pinnedSwitch.toBeVisible() to ensure the element is visible before clicking, i.e., locate the two occurrences of panel.pinnedSwitch.click() and insert the visibility check immediately prior to each click to prevent flakiness.browser_tests/tests/bottomPanelShortcuts.spec.ts (1)
13-18:⚠️ Potential issue | 🟠 MajorRepeated shortcut-button clicks still miss visibility guards.
The second
bottomPanel.keyboardShortcutsButton.click()calls (Line 17 and Line 197) are still unguarded, so this file is only partially aligned with the new rule.Suggested patch
await bottomPanel.keyboardShortcutsButton.click() await expect(bottomPanel.root).toBeVisible() + await expect(bottomPanel.keyboardShortcutsButton).toBeVisible() await bottomPanel.keyboardShortcutsButton.click() @@ await bottomPanel.keyboardShortcutsButton.click() await expect(bottomPanel.root).toBeVisible() + await expect(bottomPanel.keyboardShortcutsButton).toBeVisible() await bottomPanel.keyboardShortcutsButton.click() await expect(bottomPanel.root).not.toBeVisible()As per coding guidelines: “
browser_tests/tests/**/*.spec.ts: Refer to@browser_tests/FLAKE_PREVENTION_RULES.mdwhen triaging or editing flaky browser tests.”Also applies to: 193-198
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/bottomPanelShortcuts.spec.ts` around lines 13 - 18, The second unguarded clicks on bottomPanel.keyboardShortcutsButton are flaky because they lack visibility/assertion guards; update both occurrences (the one after the first click and the one near lines ~193-198) to assert the expected state of bottomPanel.root or the button before clicking (e.g., await expect(bottomPanel.root).toBeVisible() or await expect(bottomPanel.keyboardShortcutsButton).toBeVisible()/not.toBeVisible() as appropriate), ensuring each click is preceded by a corresponding await expect(...) visibility check so the test follows the FLAKE_PREVENTION_RULES for bottomPanel.keyboardShortcutsButton and bottomPanel.root.browser_tests/tests/sidebar/nodeLibrary.spec.ts (1)
182-184:⚠️ Potential issue | 🟠 MajorMissing visibility guards on several remaining
click()calls.A few
locator.click()calls are still unguarded (for example Line 184, Line 242, Line 327, Line 373), so this file doesn’t yet fully match the new “visible-before-click” rule introduced by this PR.Suggested patch
await comfyPage.page .locator('.p-contextmenu-item-label:has-text("Rename")') + .waitFor({ state: 'visible' }) + await expect( + comfyPage.page.locator('.p-contextmenu-item-label:has-text("Rename")') + ).toBeVisible() + await comfyPage.page + .locator('.p-contextmenu-item-label:has-text("Rename")') .click() @@ await tab .getNodeInFolder('KSampler (Advanced)', 'sampling') .locator('.bookmark-button') + .waitFor({ state: 'visible' }) + await expect( + tab.getNodeInFolder('KSampler (Advanced)', 'sampling').locator('.bookmark-button') + ).toBeVisible() + await tab + .getNodeInFolder('KSampler (Advanced)', 'sampling') + .locator('.bookmark-button') .click() @@ + await expect( + comfyPage.page.getByLabel('Customize Folder').getByRole('textbox') + ).toBeVisible() await comfyPage.page .getByLabel('Customize Folder') .getByRole('textbox') .click() @@ await comfyPage.page .locator('.p-contextmenu-item-label:has-text("Rename")') + .waitFor({ state: 'visible' }) + await expect( + comfyPage.page.locator('.p-contextmenu-item-label:has-text("Rename")') + ).toBeVisible() + await comfyPage.page + .locator('.p-contextmenu-item-label:has-text("Rename")') .click()As per coding guidelines: “
browser_tests/tests/**/*.spec.ts: Refer to@browser_tests/FLAKE_PREVENTION_RULES.mdwhen triaging or editing flaky browser tests.”Also applies to: 239-242, 324-327, 371-373
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/sidebar/nodeLibrary.spec.ts` around lines 182 - 184, Several click() calls are missing visibility guards — locate every occurrence of comfyPage.page.locator(...).click() in nodeLibrary.spec.ts (for example the locator '.p-contextmenu-item-label:has-text("Rename")' and the other unguarded locator calls) and change each to first await the locator.waitFor({ state: 'visible' }) (or await locator.isVisible() check) before calling await locator.click(); ensure you update all comfyPage.page.locator(...).click() usages in the file to follow this visible-before-click pattern to satisfy the flake-prevention rule.
🧹 Nitpick comments (8)
browser_tests/tests/propertiesPanel/errorsTabMissingModels.spec.ts (1)
62-64: Remove duplicatedtoBeVisible()checks on the same locator.Line 63 duplicates Line 62, and Line 77 duplicates Line 76. Keeping one assertion right before each click is sufficient.
♻️ Suggested cleanup
await expect(expandButton.first()).toBeVisible() - await expect(expandButton.first()).toBeVisible() await expandButton.first().click() @@ await expect(copyButton.first()).toBeVisible() - await expect(copyButton.first()).toBeVisible() await copyButton.first().click()Also applies to: 76-78
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/propertiesPanel/errorsTabMissingModels.spec.ts` around lines 62 - 64, The test duplicates visibility assertions for the same locator; remove the redundant await expect(expandButton.first()).toBeVisible() calls so there is only a single visibility check immediately before each await expandButton.first().click() (references: expandButton.first(), .toBeVisible(), .click() in errorsTabMissingModels.spec.ts).browser_tests/tests/selectionToolboxSubmenus.spec.ts (1)
101-109: Trim redundant visibility assertions for submenu targets.Line 106-108 duplicates the existing visibility wait for
Box(Line 101-105), and Line 134 duplicates the existing wait forblueSwatch(Line 133). One assertion per target before click is enough.♻️ Suggested cleanup
await expect( comfyPage.page.getByText('Box', { exact: true }) ).toBeVisible({ timeout: 5000 }) - await expect( - comfyPage.page.getByText('Box', { exact: true }) - ).toBeVisible() await comfyPage.page.getByText('Box', { exact: true }).click() @@ const blueSwatch = comfyPage.page.locator('[title="Blue"]') await expect(blueSwatch.first()).toBeVisible({ timeout: 5000 }) - await expect(blueSwatch.first()).toBeVisible() await blueSwatch.first().click()Also applies to: 133-135
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/selectionToolboxSubmenus.spec.ts` around lines 101 - 109, Remove the redundant visibility assertions so each submenu target is awaited only once before clicking: keep a single expect(comfyPage.page.getByText('Box', { exact: true })).toBeVisible({ timeout: 5000 }) before calling comfyPage.page.getByText('Box', { exact: true }).click(), and likewise keep only one visibility wait for the blueSwatch target (the getBy... for blueSwatch) before interacting with it; delete the duplicated expect(...).toBeVisible() calls.browser_tests/tests/bottomPanelLogs.spec.ts (1)
33-41: Add a visibility guard before the second toggle click.The close click is still unguarded, so this block is only partially aligned with the new click precondition pattern.
Suggested patch
test('should close bottom panel via toggle button', async ({ comfyPage }) => { const { bottomPanel } = comfyPage await expect(bottomPanel.toggleButton).toBeVisible() await bottomPanel.toggleButton.click() await expect(bottomPanel.root).toBeVisible() + await expect(bottomPanel.toggleButton).toBeVisible() await bottomPanel.toggleButton.click() await expect(bottomPanel.root).not.toBeVisible() })As per coding guidelines, flaky browser tests should be updated with
browser_tests/FLAKE_PREVENTION_RULES.mdin mind.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/bottomPanelLogs.spec.ts` around lines 33 - 41, Test "should close bottom panel via toggle button" currently clicks the toggle a second time without a precondition; add a visibility guard for bottomPanel.toggleButton before the second click. Specifically, after asserting await expect(bottomPanel.root).toBeVisible(), insert an await expect(bottomPanel.toggleButton).toBeVisible() (and optionally toBeEnabled()) before calling bottomPanel.toggleButton.click() so the close click follows the project's click precondition pattern.browser_tests/tests/zoomControls.spec.ts (1)
127-141: Guard the second zoom button click as well.This test now guards the first toggle click but not the second one, so it is not fully consistent with the new rule.
Suggested patch
test('Clicking zoom button toggles zoom controls visibility', async ({ comfyPage }) => { @@ const zoomToFit = comfyPage.page.getByTestId(TestIds.canvas.zoomToFitAction) await expect(zoomToFit).toBeVisible() + await expect(zoomButton).toBeVisible() await zoomButton.click() await comfyPage.nextFrame()As per coding guidelines, when triaging flaky tests under
browser_tests/tests/**/*.spec.ts, followbrowser_tests/FLAKE_PREVENTION_RULES.md.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/zoomControls.spec.ts` around lines 127 - 141, The second click on the zoom toggle isn't guarded which risks flakiness; in the test "Clicking zoom button toggles zoom controls visibility" wrap the second await zoomButton.click() with the same guard used for the first click (i.e., wait for the page/frame to settle using comfyPage.nextFrame() or an explicit expect before/after the click) so the sequence around zoomButton.click(), comfyPage.nextFrame(), and the visibility checks for TestIds.canvas.zoomToFitAction is consistent; update the test to await the guard after the second click (refer to zoomButton, comfyPage.nextFrame, and TestIds.canvas.zoomToFitAction).browser_tests/tests/propertiesPanel/openClose.spec.ts (1)
20-25: Add a visibility assertion before opening the panel in this test.The close-button click is guarded, but the preceding properties-button click is still unguarded.
Suggested patch
test('should close via panel close button', async ({ comfyPage }) => { + await expect(comfyPage.actionbar.propertiesButton).toBeVisible() await comfyPage.actionbar.propertiesButton.click() await expect(panel.root).toBeVisible() await expect(panel.closeButton).toBeVisible() await panel.closeButton.click() await expect(panel.root).not.toBeVisible() })As per coding guidelines,
browser_tests/tests/**/*.spec.tschanges should followbrowser_tests/FLAKE_PREVENTION_RULES.md.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/propertiesPanel/openClose.spec.ts` around lines 20 - 25, The test "should close via panel close button" currently clicks comfyPage.actionbar.propertiesButton without guarding it; add a pre-click visibility assertion for the opener (e.g., await expect(comfyPage.actionbar.propertiesButton).toBeVisible() or toBeEnabled()) immediately before the click so the click is guarded, and optionally assert panel.root is not visible before opening; update the test around the comfyPage.actionbar.propertiesButton click and panel.root checks accordingly.browser_tests/tests/subgraphPromotedWidgetPanel.spec.ts (1)
138-140: Remove duplicate visibility assertion before the same click.
moreButtons.first()is asserted visible twice consecutively before a single click; keeping one assertion is sufficient.♻️ Proposed cleanup
const moreButtons = panel.getByTestId( TestIds.subgraphEditor.widgetActionsMenuButton ) await expect(moreButtons.first()).toBeVisible() - await expect(moreButtons.first()).toBeVisible() await moreButtons.first().click()🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/subgraphPromotedWidgetPanel.spec.ts` around lines 138 - 140, The test contains a duplicate visibility assertion for moreButtons.first() before clicking; remove one of the consecutive await expect(moreButtons.first()).toBeVisible() lines so there is only a single visibility assertion prior to await moreButtons.first().click(), leaving the rest of the test unchanged.browser_tests/fixtures/components/Topbar.ts (1)
236-237: The post-loop click path is unreachable and should be removed.
triggerTopbarCommand()already returns on the last loop iteration, so this tail block never executes.Suggested cleanup
- await expect(currentMenu).toBeVisible() - await currentMenu.click() + // no-op: loop returns on the final command segment🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/components/Topbar.ts` around lines 236 - 237, The final await currentMenu.click() after the loop is unreachable because triggerTopbarCommand() returns inside the last loop iteration; remove this dead post-loop click (the await expect(currentMenu).toBeVisible() / await currentMenu.click() tail) and any related unreachable code in the Topbar test so control flows only through triggerTopbarCommand()'s return path.browser_tests/tests/sidebar/nodeLibrary.spec.ts (1)
145-148: Redundant consecutivetoBeVisible()checks can be collapsed.Several blocks assert the same locator visibility twice immediately before one click. Keeping one assertion is enough and makes the tests easier to maintain.
As per coding guidelines: “
browser_tests/tests/**/*.spec.ts: Refer to@browser_tests/FLAKE_PREVENTION_RULES.mdwhen triaging or editing flaky browser tests.”Also applies to: 165-168, 178-181, 248-250, 281-283, 309-311, 368-370, 407-409
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/sidebar/nodeLibrary.spec.ts` around lines 145 - 148, The test contains redundant consecutive assertions calling tab.getFolder('foo')).toBeVisible() before interacting; remove the duplicate immediate repeats (keep a single await expect(tab.getFolder('foo')).toBeVisible() immediately prior to actions like tab.getFolder('foo').click({ button: 'right' })), and apply the same collapse to the other occurrences mentioned (lines around the other tab.getFolder(...) checks) so each locator visibility is asserted only once before the click per the FLake prevention guidelines.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@browser_tests/fixtures/components/ContextMenu.ts`:
- Around line 69-71: In openForVueNode, the helper performs two clicks on header
but only the first is guarded; add a visibility/assertion check for the header
immediately before the second click (the right-click) so the sequence becomes:
await expect(header).toBeVisible(), await header.click(), await
expect(header).toBeVisible(), await header.click({ button: 'right' }). Update
the openForVueNode helper to include that extra visibility assertion using the
existing header locator to match the new click rule.
In `@browser_tests/fixtures/components/SidebarTab.ts`:
- Around line 31-35: The visibility guards in the close() methods use
this.tabButton.isVisible() (and another isVisible() at the second close) without
awaiting the promise, so the if checks a promise object and never short-circuit;
update both checks to await the promises (e.g., change if
(!this.tabButton.isVisible()) and the similar check at the other close() to if
(!(await this.tabButton.isVisible()))), mirroring the correct pattern used for
this.selectedTabButton.isVisible(), before calling expect(...).toBeVisible() and
this.tabButton.click().
In `@browser_tests/tests/topbar/workflowTabs.spec.ts`:
- Around line 146-150: The second click on topbar.newWorkflowButton is performed
without re-checking visibility; update the test to assert visibility before the
second click by calling expect(topbar.newWorkflowButton).toBeVisible() (and keep
the existing expect.poll(() => topbar.getTabNames()).toHaveLength(3) afterwards)
so the test verifies the button is interactable before the second invocation;
locate usages of topbar.newWorkflowButton and topbar.getTabNames() in the
snippet to add this assertion.
In `@browser_tests/tests/workflowPersistence.spec.ts`:
- Around line 525-527: The middle-click close path still omits the visibility
guard: before calling comfyPage.menu.topbar.getWorkflowTab('Unsaved
Workflow').click({ button: 'middle' }) add an explicit await
expect(comfyPage.menu.topbar.getWorkflowTab('Unsaved Workflow')).toBeVisible()
(mirroring the existing pattern around
comfyPage.menu.topbar.getWorkflowTab(nameA) and followed by the existing
comfyPage.workflow.waitForWorkflowIdle() to keep timing consistent with
FLAKE_PREVENTION_RULES.md).
---
Outside diff comments:
In `@browser_tests/fixtures/components/ComfyNodeSearchBox.ts`:
- Around line 25-34: The option click in selectFilterValue is not guarded for
visibility; update the method (selectFilterValue) to wait/assert that the option
locator `.p-select-overlay .p-select-list
.p-select-option-label:text-is("${filterValue}")` is visible before calling
click (e.g., use expect(...).toBeVisible() or a locator.waitFor({ state:
'visible' })), ensuring the option is ready and preventing flaky failures after
the `.p-select-dropdown` guard.
In `@browser_tests/fixtures/helpers/ToastHelper.ts`:
- Around line 29-35: The current code captures a static snapshot via
toastCloseButtons = this.page.locator('.p-toast-close-button').all() and then
clicks each item, which can fail as the DOM shrinks; change to repeatedly query
the live locator for '.p-toast-close-button' (use
this.page.locator('.p-toast-close-button').first() or .nth(0)) and loop: while a
close button exists/ is visible, click that first button and continue until
count is zero. Replace use of toastCloseButtons and .all() with a live-loop that
checks locator.count() or locator.first().isVisible() each iteration to safely
remove toasts.
In `@browser_tests/fixtures/VueNodeHelpers.ts`:
- Around line 185-193: In enterSubgraph, move the visibility assertion so it
runs before calling editButton.boundingBox(): call await
expect(editButton).toBeVisible() first, then call const box = await
editButton.boundingBox() and keep the existing null check and click using box;
this ensures the toBeVisible retry happens before computing the bounding box for
editButton.
In `@browser_tests/tests/bottomPanelShortcuts.spec.ts`:
- Around line 13-18: The second unguarded clicks on
bottomPanel.keyboardShortcutsButton are flaky because they lack
visibility/assertion guards; update both occurrences (the one after the first
click and the one near lines ~193-198) to assert the expected state of
bottomPanel.root or the button before clicking (e.g., await
expect(bottomPanel.root).toBeVisible() or await
expect(bottomPanel.keyboardShortcutsButton).toBeVisible()/not.toBeVisible() as
appropriate), ensuring each click is preceded by a corresponding await
expect(...) visibility check so the test follows the FLAKE_PREVENTION_RULES for
bottomPanel.keyboardShortcutsButton and bottomPanel.root.
In `@browser_tests/tests/minimap.spec.ts`:
- Around line 55-62: The second toggle click lacks the visibility precondition;
before calling toggleButton.click() the second time, add the same guard used
earlier—await expect(toggleButton).toBeVisible()—so the test asserts the button
is visible (using the same toggleButton and comfyPage.nextFrame() context) prior
to clicking and improves failure diagnostics of minimapContainer visibility
toggling.
In `@browser_tests/tests/propertiesPanel/nodeSettings.spec.ts`:
- Around line 111-113: The test currently performs unguarded clicks on
panel.pinnedSwitch (panel.pinnedSwitch.click()) which violates the
FLAKE_PREVENTION_RULES; before each click (the occurrences in the test around
the pinned toggle) add an await panel.pinnedSwitch.toBeVisible() to ensure the
element is visible before clicking, i.e., locate the two occurrences of
panel.pinnedSwitch.click() and insert the visibility check immediately prior to
each click to prevent flakiness.
In `@browser_tests/tests/queue/queueOverlay.spec.ts`:
- Around line 91-110: The test clicks elements without asserting visibility
first; add explicit visibility guards before each click: for the "Completed"
button call use await expect(comfyPage.page.getByRole('button', { name:
'Completed', exact: true })).toBeVisible() immediately before the .click(), and
for the overlay toggle use await expect(toggle).toBeVisible() before both
toggle.click() calls (the initial click and the final click) where toggle is
assigned from comfyPage.page.getByTestId(TestIds.queue.overlayToggle); this
follows the FLAKE_PREVENTION_RULES for flaky browser tests.
In `@browser_tests/tests/selectionToolbox.spec.ts`:
- Around line 209-223: The color swatch clicks for
TestIds.selectionToolbox.colorBlue and TestIds.selectionToolbox.colorRed are not
guarded by visibility assertions, making the test brittle; before calling
getColorPickerGroup(...).getByTestId(...).click() insert await
expect(getColorPickerGroup(comfyPage).getByTestId(TestIds.selectionToolbox.colorBlue|colorRed)).toBeVisible()
(and ensure getColorPickerButton(comfyPage) is visible/clicked as already done)
so each swatch click is preceded by an explicit visibility check; apply the same
visibility-guard pattern to the similar blocks referenced around the 240-266
range and keep using comfyPage.nodeOps.selectNodes(...) as the selection step.
In `@browser_tests/tests/sidebar/nodeLibrary.spec.ts`:
- Around line 182-184: Several click() calls are missing visibility guards —
locate every occurrence of comfyPage.page.locator(...).click() in
nodeLibrary.spec.ts (for example the locator
'.p-contextmenu-item-label:has-text("Rename")' and the other unguarded locator
calls) and change each to first await the locator.waitFor({ state: 'visible' })
(or await locator.isVisible() check) before calling await locator.click();
ensure you update all comfyPage.page.locator(...).click() usages in the file to
follow this visible-before-click pattern to satisfy the flake-prevention rule.
---
Nitpick comments:
In `@browser_tests/fixtures/components/Topbar.ts`:
- Around line 236-237: The final await currentMenu.click() after the loop is
unreachable because triggerTopbarCommand() returns inside the last loop
iteration; remove this dead post-loop click (the await
expect(currentMenu).toBeVisible() / await currentMenu.click() tail) and any
related unreachable code in the Topbar test so control flows only through
triggerTopbarCommand()'s return path.
In `@browser_tests/tests/bottomPanelLogs.spec.ts`:
- Around line 33-41: Test "should close bottom panel via toggle button"
currently clicks the toggle a second time without a precondition; add a
visibility guard for bottomPanel.toggleButton before the second click.
Specifically, after asserting await expect(bottomPanel.root).toBeVisible(),
insert an await expect(bottomPanel.toggleButton).toBeVisible() (and optionally
toBeEnabled()) before calling bottomPanel.toggleButton.click() so the close
click follows the project's click precondition pattern.
In `@browser_tests/tests/propertiesPanel/errorsTabMissingModels.spec.ts`:
- Around line 62-64: The test duplicates visibility assertions for the same
locator; remove the redundant await expect(expandButton.first()).toBeVisible()
calls so there is only a single visibility check immediately before each await
expandButton.first().click() (references: expandButton.first(), .toBeVisible(),
.click() in errorsTabMissingModels.spec.ts).
In `@browser_tests/tests/propertiesPanel/openClose.spec.ts`:
- Around line 20-25: The test "should close via panel close button" currently
clicks comfyPage.actionbar.propertiesButton without guarding it; add a pre-click
visibility assertion for the opener (e.g., await
expect(comfyPage.actionbar.propertiesButton).toBeVisible() or toBeEnabled())
immediately before the click so the click is guarded, and optionally assert
panel.root is not visible before opening; update the test around the
comfyPage.actionbar.propertiesButton click and panel.root checks accordingly.
In `@browser_tests/tests/selectionToolboxSubmenus.spec.ts`:
- Around line 101-109: Remove the redundant visibility assertions so each
submenu target is awaited only once before clicking: keep a single
expect(comfyPage.page.getByText('Box', { exact: true })).toBeVisible({ timeout:
5000 }) before calling comfyPage.page.getByText('Box', { exact: true }).click(),
and likewise keep only one visibility wait for the blueSwatch target (the
getBy... for blueSwatch) before interacting with it; delete the duplicated
expect(...).toBeVisible() calls.
In `@browser_tests/tests/sidebar/nodeLibrary.spec.ts`:
- Around line 145-148: The test contains redundant consecutive assertions
calling tab.getFolder('foo')).toBeVisible() before interacting; remove the
duplicate immediate repeats (keep a single await
expect(tab.getFolder('foo')).toBeVisible() immediately prior to actions like
tab.getFolder('foo').click({ button: 'right' })), and apply the same collapse to
the other occurrences mentioned (lines around the other tab.getFolder(...)
checks) so each locator visibility is asserted only once before the click per
the FLake prevention guidelines.
In `@browser_tests/tests/subgraphPromotedWidgetPanel.spec.ts`:
- Around line 138-140: The test contains a duplicate visibility assertion for
moreButtons.first() before clicking; remove one of the consecutive await
expect(moreButtons.first()).toBeVisible() lines so there is only a single
visibility assertion prior to await moreButtons.first().click(), leaving the
rest of the test unchanged.
In `@browser_tests/tests/zoomControls.spec.ts`:
- Around line 127-141: The second click on the zoom toggle isn't guarded which
risks flakiness; in the test "Clicking zoom button toggles zoom controls
visibility" wrap the second await zoomButton.click() with the same guard used
for the first click (i.e., wait for the page/frame to settle using
comfyPage.nextFrame() or an explicit expect before/after the click) so the
sequence around zoomButton.click(), comfyPage.nextFrame(), and the visibility
checks for TestIds.canvas.zoomToFitAction is consistent; update the test to
await the guard after the second click (refer to zoomButton,
comfyPage.nextFrame, and TestIds.canvas.zoomToFitAction).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 63b66b2d-b03e-4f8e-9118-958f403f50f2
📒 Files selected for processing (105)
browser_tests/FLAKE_PREVENTION_RULES.mdbrowser_tests/fixtures/ComfyPage.tsbrowser_tests/fixtures/VueNodeHelpers.tsbrowser_tests/fixtures/components/ComfyNodeSearchBox.tsbrowser_tests/fixtures/components/ContextMenu.tsbrowser_tests/fixtures/components/QueuePanel.tsbrowser_tests/fixtures/components/SettingDialog.tsbrowser_tests/fixtures/components/SidebarTab.tsbrowser_tests/fixtures/components/Topbar.tsbrowser_tests/fixtures/helpers/AppModeHelper.tsbrowser_tests/fixtures/helpers/AppModeWidgetHelper.tsbrowser_tests/fixtures/helpers/BuilderFooterHelper.tsbrowser_tests/fixtures/helpers/BuilderSaveAsHelper.tsbrowser_tests/fixtures/helpers/BuilderSelectHelper.tsbrowser_tests/fixtures/helpers/BuilderStepsHelper.tsbrowser_tests/fixtures/helpers/CanvasHelper.tsbrowser_tests/fixtures/helpers/NodeOperationsHelper.tsbrowser_tests/fixtures/helpers/SubgraphHelper.tsbrowser_tests/fixtures/helpers/ToastHelper.tsbrowser_tests/fixtures/helpers/WorkflowHelper.tsbrowser_tests/fixtures/utils/litegraphUtils.tsbrowser_tests/fixtures/utils/vueNodeFixtures.tsbrowser_tests/tests/appModeDropdownClipping.spec.tsbrowser_tests/tests/backgroundImageUpload.spec.tsbrowser_tests/tests/bottomPanelLogs.spec.tsbrowser_tests/tests/bottomPanelShortcuts.spec.tsbrowser_tests/tests/builderReorder.spec.tsbrowser_tests/tests/builderSaveFlow.spec.tsbrowser_tests/tests/changeTrackerLoadGuard.spec.tsbrowser_tests/tests/copyPaste.spec.tsbrowser_tests/tests/dialog.spec.tsbrowser_tests/tests/dialogs/queueClearHistory.spec.tsbrowser_tests/tests/dialogs/signInDialog.spec.tsbrowser_tests/tests/errorDialog.spec.tsbrowser_tests/tests/errorOverlay.spec.tsbrowser_tests/tests/extensionAPI.spec.tsbrowser_tests/tests/graphCanvasMenu.spec.tsbrowser_tests/tests/groupNode.spec.tsbrowser_tests/tests/interaction.spec.tsbrowser_tests/tests/jobHistoryActions.spec.tsbrowser_tests/tests/keybindingPresets.spec.tsbrowser_tests/tests/keybindings.spec.tsbrowser_tests/tests/load3d/Load3DHelper.tsbrowser_tests/tests/maskEditor.spec.tsbrowser_tests/tests/menu.spec.tsbrowser_tests/tests/minimap.spec.tsbrowser_tests/tests/nodeHelp.spec.tsbrowser_tests/tests/nodeLibraryEssentials.spec.tsbrowser_tests/tests/nodeSearchBox.spec.tsbrowser_tests/tests/nodeSearchBoxV2.spec.tsbrowser_tests/tests/nodeSearchBoxV2Extended.spec.tsbrowser_tests/tests/pasteImageContextMenu.spec.tsbrowser_tests/tests/propertiesPanel/ErrorsTabHelper.tsbrowser_tests/tests/propertiesPanel/PropertiesPanelHelper.tsbrowser_tests/tests/propertiesPanel/errorsTab.spec.tsbrowser_tests/tests/propertiesPanel/errorsTabMissingMedia.spec.tsbrowser_tests/tests/propertiesPanel/errorsTabMissingModels.spec.tsbrowser_tests/tests/propertiesPanel/infoTab.spec.tsbrowser_tests/tests/propertiesPanel/nodeSelection.spec.tsbrowser_tests/tests/propertiesPanel/nodeSettings.spec.tsbrowser_tests/tests/propertiesPanel/openClose.spec.tsbrowser_tests/tests/propertiesPanel/propertiesPanelPosition.spec.tsbrowser_tests/tests/propertiesPanel/searchFiltering.spec.tsbrowser_tests/tests/propertiesPanel/titleEditing.spec.tsbrowser_tests/tests/propertiesPanel/workflowOverview.spec.tsbrowser_tests/tests/queue/queueOverlay.spec.tsbrowser_tests/tests/releaseNotifications.spec.tsbrowser_tests/tests/remoteWidgets.spec.tsbrowser_tests/tests/rerouteNode.spec.tsbrowser_tests/tests/resultGallery.spec.tsbrowser_tests/tests/rightClickMenu.spec.tsbrowser_tests/tests/rightSidePanelTabs.spec.tsbrowser_tests/tests/saveImageAndWebp.spec.tsbrowser_tests/tests/selectionRectangle.spec.tsbrowser_tests/tests/selectionToolbox.spec.tsbrowser_tests/tests/selectionToolboxSubmenus.spec.tsbrowser_tests/tests/sidebar/assets.spec.tsbrowser_tests/tests/sidebar/modelLibrary.spec.tsbrowser_tests/tests/sidebar/nodeLibrary.spec.tsbrowser_tests/tests/sidebar/nodeLibraryV2.spec.tsbrowser_tests/tests/sidebar/workflows.spec.tsbrowser_tests/tests/subgraphPromotedWidgetPanel.spec.tsbrowser_tests/tests/toastNotifications.spec.tsbrowser_tests/tests/topbar/workflowTabs.spec.tsbrowser_tests/tests/useSettingSearch.spec.tsbrowser_tests/tests/userSelectView.spec.tsbrowser_tests/tests/versionMismatchWarnings.spec.tsbrowser_tests/tests/vueNodes/groups/groups.spec.tsbrowser_tests/tests/vueNodes/interactions/node/contextMenu.spec.tsbrowser_tests/tests/vueNodes/interactions/node/imagePreview.spec.tsbrowser_tests/tests/vueNodes/interactions/node/remove.spec.tsbrowser_tests/tests/vueNodes/interactions/node/resize.spec.tsbrowser_tests/tests/vueNodes/interactions/node/select.spec.tsbrowser_tests/tests/vueNodes/nodeStates/bypass.spec.tsbrowser_tests/tests/vueNodes/nodeStates/colors.spec.tsbrowser_tests/tests/vueNodes/nodeStates/error.spec.tsbrowser_tests/tests/vueNodes/nodeStates/mute.spec.tsbrowser_tests/tests/vueNodes/nodeStates/pin.spec.tsbrowser_tests/tests/vueNodes/widgets/advancedWidgets.spec.tsbrowser_tests/tests/vueNodes/widgets/int/integerWidget.spec.tsbrowser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.tsbrowser_tests/tests/widget.spec.tsbrowser_tests/tests/workflowPersistence.spec.tsbrowser_tests/tests/workflowTabThumbnail.spec.tsbrowser_tests/tests/zoomControls.spec.ts
| await expect(header).toBeVisible() | ||
| await header.click() | ||
| await header.click({ button: 'right' }) |
There was a problem hiding this comment.
Guard the second click in openForVueNode as well.
Line 71 performs another click after Line 70; add a second visibility assertion immediately before the right-click to keep the helper fully consistent with the new click rule.
Suggested patch
await expect(header).toBeVisible()
await header.click()
+ await expect(header).toBeVisible()
await header.click({ button: 'right' })📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| await expect(header).toBeVisible() | |
| await header.click() | |
| await header.click({ button: 'right' }) | |
| await expect(header).toBeVisible() | |
| await header.click() | |
| await expect(header).toBeVisible() | |
| await header.click({ button: 'right' }) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@browser_tests/fixtures/components/ContextMenu.ts` around lines 69 - 71, In
openForVueNode, the helper performs two clicks on header but only the first is
guarded; add a visibility/assertion check for the header immediately before the
second click (the right-click) so the sequence becomes: await
expect(header).toBeVisible(), await header.click(), await
expect(header).toBeVisible(), await header.click({ button: 'right' }). Update
the openForVueNode helper to include that extra visibility assertion using the
existing header locator to match the new click rule.
| if (!this.tabButton.isVisible()) { | ||
| return | ||
| } | ||
| await expect(this.tabButton).toBeVisible() | ||
| await this.tabButton.click() |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify promise-as-boolean usage in SidebarTab close guards
rg -n "if \(!this\.tabButton\.isVisible\(\)\)" browser_tests/fixtures/components/SidebarTab.ts -C2Repository: Comfy-Org/ComfyUI_frontend
Length of output: 268
🏁 Script executed:
cat -n browser_tests/fixtures/components/SidebarTab.ts | head -80Repository: Comfy-Org/ComfyUI_frontend
Length of output: 2494
🏁 Script executed:
# Check TypeScript version and configuration for browser tests
cd browser_tests && head -20 tsconfig.json || echo "No tsconfig.json found in browser_tests"Repository: Comfy-Org/ComfyUI_frontend
Length of output: 426
🏁 Script executed:
# Run the TypeScript type check for browser tests as recommended in coding guidelines
cd browser_tests && pnpm typecheck:browser 2>&1 | grep -A5 -B5 "SidebarTab" || echo "No errors found for SidebarTab"Repository: Comfy-Org/ComfyUI_frontend
Length of output: 100
🏁 Script executed:
# Check the type of tabButton and isVisible return type by looking at Locator usage
rg -A3 "tabButton\s*[:=]" browser_tests/fixtures/components/SidebarTab.ts | head -20Repository: Comfy-Org/ComfyUI_frontend
Length of output: 52
Missing await in visibility guards breaks the close-path logic.
In both close() methods (lines 31 and 70), if (!this.tabButton.isVisible()) checks a promise object rather than a boolean. The guard never activates as intended, and the method can attempt clicks against hidden/missing buttons. Line 24 in the same file shows the correct pattern: if (await this.selectedTabButton.isVisible()).
Suggested patch
async close() {
- if (!this.tabButton.isVisible()) {
+ if (!(await this.tabButton.isVisible())) {
return
}
@@
override async close() {
- if (!this.tabButton.isVisible()) {
+ if (!(await this.tabButton.isVisible())) {
return
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@browser_tests/fixtures/components/SidebarTab.ts` around lines 31 - 35, The
visibility guards in the close() methods use this.tabButton.isVisible() (and
another isVisible() at the second close) without awaiting the promise, so the if
checks a promise object and never short-circuit; update both checks to await the
promises (e.g., change if (!this.tabButton.isVisible()) and the similar check at
the other close() to if (!(await this.tabButton.isVisible()))), mirroring the
correct pattern used for this.selectedTabButton.isVisible(), before calling
expect(...).toBeVisible() and this.tabButton.click().
| await expect(topbar.newWorkflowButton).toBeVisible() | ||
| await topbar.newWorkflowButton.click() | ||
| await expect.poll(() => topbar.getTabNames()).toHaveLength(2) | ||
| await topbar.newWorkflowButton.click() | ||
| await expect.poll(() => topbar.getTabNames()).toHaveLength(3) |
There was a problem hiding this comment.
Add a visibility assertion before the second new-tab click.
Line 149 re-clicks newWorkflowButton without a fresh toBeVisible() check.
Suggested patch
await expect(topbar.newWorkflowButton).toBeVisible()
await topbar.newWorkflowButton.click()
await expect.poll(() => topbar.getTabNames()).toHaveLength(2)
+ await expect(topbar.newWorkflowButton).toBeVisible()
await topbar.newWorkflowButton.click()
await expect.poll(() => topbar.getTabNames()).toHaveLength(3)As per coding guidelines browser_tests/tests/**/*.spec.ts: “Refer to browser_tests/FLAKE_PREVENTION_RULES.md when triaging or editing flaky browser tests.”
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@browser_tests/tests/topbar/workflowTabs.spec.ts` around lines 146 - 150, The
second click on topbar.newWorkflowButton is performed without re-checking
visibility; update the test to assert visibility before the second click by
calling expect(topbar.newWorkflowButton).toBeVisible() (and keep the existing
expect.poll(() => topbar.getTabNames()).toHaveLength(3) afterwards) so the test
verifies the button is interactable before the second invocation; locate usages
of topbar.newWorkflowButton and topbar.getTabNames() in the snippet to add this
assertion.
| await expect(comfyPage.menu.topbar.getWorkflowTab(nameA)).toBeVisible() | ||
| await comfyPage.menu.topbar.getWorkflowTab(nameA).click() | ||
| await comfyPage.workflow.waitForWorkflowIdle() |
There was a problem hiding this comment.
Add the same visibility guard for the remaining middle-click tab close path.
In this same test, the click at Line 533 (getWorkflowTab('Unsaved Workflow').click({ button: 'middle' })) still bypasses the new pre-click visibility pattern. Please add an explicit visibility assertion there as well for consistency.
Suggested patch
- await comfyPage.menu.topbar
- .getWorkflowTab('Unsaved Workflow')
- .click({ button: 'middle' })
+ const unsavedTab = comfyPage.menu.topbar.getWorkflowTab('Unsaved Workflow')
+ await expect(unsavedTab).toBeVisible()
+ await unsavedTab.click({ button: 'middle' })As per coding guidelines, refer to browser_tests/FLAKE_PREVENTION_RULES.md when triaging or editing flaky browser tests.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@browser_tests/tests/workflowPersistence.spec.ts` around lines 525 - 527, The
middle-click close path still omits the visibility guard: before calling
comfyPage.menu.topbar.getWorkflowTab('Unsaved Workflow').click({ button:
'middle' }) add an explicit await
expect(comfyPage.menu.topbar.getWorkflowTab('Unsaved Workflow')).toBeVisible()
(mirroring the existing pattern around
comfyPage.menu.topbar.getWorkflowTab(nameA) and followed by the existing
comfyPage.workflow.waitForWorkflowIdle() to keep timing consistent with
FLAKE_PREVENTION_RULES.md).
📦 Bundle: 5.12 MB gzip 🔴 +55 BDetailsSummary
Category Glance App Entry Points — 22.3 kB (baseline 22.3 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.2 MB (baseline 1.2 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 76.6 kB (baseline 76.6 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed / 2 unchanged Panels & Settings — 484 kB (baseline 484 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 12 unchanged User & Accounts — 17.1 kB (baseline 17.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed / 2 unchanged Editors & Dialogs — 109 kB (baseline 109 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 60.3 kB (baseline 60.3 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed / 8 unchanged Data & Services — 2.98 MB (baseline 2.98 MB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 4 unchanged Utilities & Hooks — 338 kB (baseline 338 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 13 added / 13 removed / 13 unchanged Vendor & Third-Party — 9.8 MB (baseline 9.8 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 8.53 MB (baseline 8.53 MB) • ⚪ 0 BBundles that do not match a named category
Status: 55 added / 55 removed / 79 unchanged ⚡ Performance
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #10976 +/- ##
==========================================
+ Coverage 43.12% 43.13% +0.01%
==========================================
Files 1332 1332
Lines 68184 68184
Branches 18821 17962 -859
==========================================
+ Hits 29402 29413 +11
+ Misses 38190 38179 -11
Partials 592 592 see 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
browser_tests/tests/groupNode.spec.ts (2)
56-75:⚠️ Potential issue | 🟡 MinorAdd visibility assertions before bookmark button clicks too.
This block now guards the folder click, but the
.bookmark-buttonclicks (Line 61 and Line 75) still lack the same precondition used elsewhere in this PR.Suggested patch
test('Can be bookmarked and unbookmarked', async ({ comfyPage }) => { await expect(libraryTab.getFolder(groupNodeCategory)).toBeVisible() await libraryTab.getFolder(groupNodeCategory).click() + const bookmarkButton = libraryTab + .getNode(groupNodeName) + .locator('.bookmark-button') + await expect(bookmarkButton).toBeVisible() await libraryTab .getNode(groupNodeName) .locator('.bookmark-button') .click() @@ + await expect(bookmarkButton.first()).toBeVisible() await libraryTab .getNode(groupNodeName) .locator('.bookmark-button') .first() .click()As per coding guidelines, refer to
@browser_tests/FLAKE_PREVENTION_RULES.mdwhen triaging or editing flaky browser tests.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/groupNode.spec.ts` around lines 56 - 75, The test clicks bookmark buttons without asserting visibility first; before each .locator('.bookmark-button').click() (the clicks on libraryTab.getNode(groupNodeName).locator('.bookmark-button') and the subsequent .first().click()), add an await expect(...).toBeVisible() assertion targeting the same element (use libraryTab.getNode(groupNodeName).locator('.bookmark-button') and for the second click target the .first() locator) to match the existing flake-prevention pattern used elsewhere; keep the rest of the flow (checking comfyPage.settings.getSetting('Comfy.NodeLibrary.Bookmarks.V2') and node count) unchanged.
84-98:⚠️ Potential issue | 🟡 MinorMirror the same pre-click visibility check for bookmark hover setup/cleanup clicks.
Same gap here: folder click is guarded, but
.bookmark-buttonclicks (Line 89 and Line 98) are not.Suggested patch
test('Displays preview on bookmark hover', async ({ comfyPage }) => { await expect(libraryTab.getFolder(groupNodeCategory)).toBeVisible() await libraryTab.getFolder(groupNodeCategory).click() + const bookmarkButton = libraryTab + .getNode(groupNodeName) + .locator('.bookmark-button') + await expect(bookmarkButton).toBeVisible() await libraryTab .getNode(groupNodeName) .locator('.bookmark-button') .click() @@ + await expect(bookmarkButton.first()).toBeVisible() await libraryTab .getNode(groupNodeName) .locator('.bookmark-button') .first() .click()As per coding guidelines, refer to
@browser_tests/FLAKE_PREVENTION_RULES.mdwhen triaging or editing flaky browser tests.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/groupNode.spec.ts` around lines 84 - 98, The two clicks on the bookmark button need visibility guards to prevent flakiness: before the first bookmark click on libraryTab.getNode(groupNodeName).locator('.bookmark-button').click() add an await expect(...locator('.bookmark-button')).toBeVisible() (or check the node label/preview is visible) and likewise before the second .first().click() add another await expect(...locator('.bookmark-button').first()).toBeVisible(); ensure you reference libraryTab.getNode(groupNodeName), the '.bookmark-button' locator, and the existing comfyPage.page hover/preview checks so the test waits for the bookmark button to be visible before each click.browser_tests/fixtures/helpers/AppModeHelper.ts (1)
45-51:⚠️ Potential issue | 🟡 MinorAdd a visibility assertion before the “Workflow actions” click too.
enterBuilder()now guards the menuitem click, but the preceding click on the “Workflow actions” trigger (Line 45-48) is still unguarded, which makes this flow only partially aligned with the new rule.Suggested patch
async enterBuilder() { - await this.page - .getByRole('button', { name: 'Workflow actions' }) - .first() - .click() + const workflowActionsButton = this.page + .getByRole('button', { name: 'Workflow actions' }) + .first() + await expect(workflowActionsButton).toBeVisible() + await workflowActionsButton.click() await expect( this.page.getByRole('menuitem', { name: /Build app|Edit app/ }) ).toBeVisible()🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/helpers/AppModeHelper.ts` around lines 45 - 51, The click on the "Workflow actions" trigger is unguarded; before calling this.page.getByRole('button', { name: 'Workflow actions' }).first().click() add an assertion that the button is visible/attached (e.g., await expect(this.page.getByRole('button', { name: 'Workflow actions' }).first()).toBeVisible()) so the flow is fully guarded like enterBuilder() guards the menuitem click; update AppModeHelper.ts to assert visibility on the "Workflow actions" button prior to clicking it.
♻️ Duplicate comments (1)
browser_tests/tests/workflowPersistence.spec.ts (1)
533-535:⚠️ Potential issue | 🟡 MinorPlease add the same visibility guard before the unsaved-tab middle-click.
Line 533–535 still clicks without a preceding visibility assertion, unlike the other updated tab-click paths in this test.
Suggested patch
- await comfyPage.menu.topbar - .getWorkflowTab('Unsaved Workflow') - .click({ button: 'middle' }) + const unsavedTab = comfyPage.menu.topbar.getWorkflowTab('Unsaved Workflow') + await expect(unsavedTab).toBeVisible() + await unsavedTab.click({ button: 'middle' })As per coding guidelines,
browser_tests/tests/**/*.spec.ts: “Refer to@browser_tests/FLAKE_PREVENTION_RULES.mdwhen triaging or editing flaky browser tests.”🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/workflowPersistence.spec.ts` around lines 533 - 535, Add the same visibility guard used for the other tab-clicks before calling comfyPage.menu.topbar.getWorkflowTab('Unsaved Workflow').click({ button: 'middle' }); specifically, ensure the "Unsaved Workflow" tab element is visible (using the test's existing visibility check/wait helper applied to other tab clicks) immediately prior to the middle-click so the click follows the same visibility assertion pattern as the other updated tab-click paths.
🧹 Nitpick comments (3)
browser_tests/fixtures/helpers/BuilderStepsHelper.ts (1)
17-23: Optional: cache each button locator per method for readability and selector consistency.This is not blocking, but using a local
constavoids repeating the same query expression in each method.♻️ Suggested refactor
async goToInputs() { - await expect( - this.toolbar.getByRole('button', { name: 'Inputs' }) - ).toBeVisible() - await this.toolbar.getByRole('button', { name: 'Inputs' }).click() + const inputsButton = this.toolbar.getByRole('button', { name: 'Inputs' }) + await expect(inputsButton).toBeVisible() + await inputsButton.click() await this.comfyPage.nextFrame() } async goToOutputs() { - await expect( - this.toolbar.getByRole('button', { name: 'Outputs' }) - ).toBeVisible() - await this.toolbar.getByRole('button', { name: 'Outputs' }).click() + const outputsButton = this.toolbar.getByRole('button', { name: 'Outputs' }) + await expect(outputsButton).toBeVisible() + await outputsButton.click() await this.comfyPage.nextFrame() } async goToPreview() { - await expect( - this.toolbar.getByRole('button', { name: 'Preview' }) - ).toBeVisible() - await this.toolbar.getByRole('button', { name: 'Preview' }).click() + const previewButton = this.toolbar.getByRole('button', { name: 'Preview' }) + await expect(previewButton).toBeVisible() + await previewButton.click() await this.comfyPage.nextFrame() }Also applies to: 25-31, 33-39
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/helpers/BuilderStepsHelper.ts` around lines 17 - 23, Cache the repeated locator expressions into a local const at the start of each helper method (e.g., in goToInputs, set const inputsBtn = this.toolbar.getByRole('button', { name: 'Inputs' })) and then use inputsBtn in the subsequent expect and click calls; apply the same pattern to the other methods mentioned (the methods covering lines 25-31 and 33-39) to improve readability and ensure selector consistency.browser_tests/fixtures/components/Topbar.ts (1)
219-238: Tail click path appears unreachable; consider removing dead code.Given the
returnon the last loop iteration and the earlierpath.length === 1return, the finalcurrentMenuclick block is not exercised. Trimming it would simplify control flow.♻️ Suggested simplification
for (let i = 1; i < path.length; i++) { const commandName = path[i] const menuItem = submenu .locator(`.p-tieredmenu-item:has-text("${commandName}")`) .first() await menuItem.waitFor({ state: 'visible' }) // For the last item, click it if (i === path.length - 1) { await menuItem.click() return } // Otherwise, hover to open nested submenu await menuItem.hover() currentMenu = menuItem } - await expect(currentMenu).toBeVisible() - await currentMenu.click()🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/components/Topbar.ts` around lines 219 - 238, The final click block after the for-loop is unreachable because the function already returns when path.length === 1 and the loop returns when i === path.length - 1; remove the trailing lines "await expect(currentMenu).toBeVisible()" and "await currentMenu.click()" (the code around the for (let i = 1; i < path.length; i++) loop that uses commandName, menuItem, and currentMenu) to simplify control flow, or alternatively change the loop so it does not return on the last iteration and instead lets the existing post-loop click handle the final menu selection—pick one approach and apply it consistently.browser_tests/fixtures/helpers/CanvasHelper.ts (1)
20-27: Visibility assertion successfully added before click.The addition of
await expect(this.resetViewButton).toBeVisible()aligns with the PR objective of improving failure diagnostics. The pattern combines a quickisVisible()check with a retrying assertion, which is safe and provides clear error messages if the button becomes unavailable.Optional refinement: The
isVisible()check on line 21 is now somewhat redundant, since Playwright assertions already retry. You could simplify this to:async resetView(): Promise<void> { try { await expect(this.resetViewButton).toBeVisible({ timeout: 1000 }) await this.resetViewButton.click() } catch { // Reset button not visible, skip } await this.page.mouse.move(10, 10) await this.nextFrame() }However, the current pattern is correct and achieves the diagnostic improvement goal.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/helpers/CanvasHelper.ts` around lines 20 - 27, Replace the redundant isVisible() check in the resetView() method by relying on Playwright's retrying assertion: wrap await expect(this.resetViewButton).toBeVisible({ timeout: 1000 }) and await this.resetViewButton.click() in a try/catch so the reset is skipped if the button never appears; keep the subsequent await this.page.mouse.move(10, 10) and await this.nextFrame() calls unchanged and reference the same resetViewButton and resetView() symbols when applying the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@browser_tests/fixtures/helpers/AppModeHelper.ts`:
- Around line 45-51: The click on the "Workflow actions" trigger is unguarded;
before calling this.page.getByRole('button', { name: 'Workflow actions'
}).first().click() add an assertion that the button is visible/attached (e.g.,
await expect(this.page.getByRole('button', { name: 'Workflow actions'
}).first()).toBeVisible()) so the flow is fully guarded like enterBuilder()
guards the menuitem click; update AppModeHelper.ts to assert visibility on the
"Workflow actions" button prior to clicking it.
In `@browser_tests/tests/groupNode.spec.ts`:
- Around line 56-75: The test clicks bookmark buttons without asserting
visibility first; before each .locator('.bookmark-button').click() (the clicks
on libraryTab.getNode(groupNodeName).locator('.bookmark-button') and the
subsequent .first().click()), add an await expect(...).toBeVisible() assertion
targeting the same element (use
libraryTab.getNode(groupNodeName).locator('.bookmark-button') and for the second
click target the .first() locator) to match the existing flake-prevention
pattern used elsewhere; keep the rest of the flow (checking
comfyPage.settings.getSetting('Comfy.NodeLibrary.Bookmarks.V2') and node count)
unchanged.
- Around line 84-98: The two clicks on the bookmark button need visibility
guards to prevent flakiness: before the first bookmark click on
libraryTab.getNode(groupNodeName).locator('.bookmark-button').click() add an
await expect(...locator('.bookmark-button')).toBeVisible() (or check the node
label/preview is visible) and likewise before the second .first().click() add
another await expect(...locator('.bookmark-button').first()).toBeVisible();
ensure you reference libraryTab.getNode(groupNodeName), the '.bookmark-button'
locator, and the existing comfyPage.page hover/preview checks so the test waits
for the bookmark button to be visible before each click.
---
Duplicate comments:
In `@browser_tests/tests/workflowPersistence.spec.ts`:
- Around line 533-535: Add the same visibility guard used for the other
tab-clicks before calling comfyPage.menu.topbar.getWorkflowTab('Unsaved
Workflow').click({ button: 'middle' }); specifically, ensure the "Unsaved
Workflow" tab element is visible (using the test's existing visibility
check/wait helper applied to other tab clicks) immediately prior to the
middle-click so the click follows the same visibility assertion pattern as the
other updated tab-click paths.
---
Nitpick comments:
In `@browser_tests/fixtures/components/Topbar.ts`:
- Around line 219-238: The final click block after the for-loop is unreachable
because the function already returns when path.length === 1 and the loop returns
when i === path.length - 1; remove the trailing lines "await
expect(currentMenu).toBeVisible()" and "await currentMenu.click()" (the code
around the for (let i = 1; i < path.length; i++) loop that uses commandName,
menuItem, and currentMenu) to simplify control flow, or alternatively change the
loop so it does not return on the last iteration and instead lets the existing
post-loop click handle the final menu selection—pick one approach and apply it
consistently.
In `@browser_tests/fixtures/helpers/BuilderStepsHelper.ts`:
- Around line 17-23: Cache the repeated locator expressions into a local const
at the start of each helper method (e.g., in goToInputs, set const inputsBtn =
this.toolbar.getByRole('button', { name: 'Inputs' })) and then use inputsBtn in
the subsequent expect and click calls; apply the same pattern to the other
methods mentioned (the methods covering lines 25-31 and 33-39) to improve
readability and ensure selector consistency.
In `@browser_tests/fixtures/helpers/CanvasHelper.ts`:
- Around line 20-27: Replace the redundant isVisible() check in the resetView()
method by relying on Playwright's retrying assertion: wrap await
expect(this.resetViewButton).toBeVisible({ timeout: 1000 }) and await
this.resetViewButton.click() in a try/catch so the reset is skipped if the
button never appears; keep the subsequent await this.page.mouse.move(10, 10) and
await this.nextFrame() calls unchanged and reference the same resetViewButton
and resetView() symbols when applying the change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 919a5772-14ff-403d-8e14-342b7098d574
📒 Files selected for processing (99)
browser_tests/fixtures/ComfyPage.tsbrowser_tests/fixtures/VueNodeHelpers.tsbrowser_tests/fixtures/components/QueuePanel.tsbrowser_tests/fixtures/components/SettingDialog.tsbrowser_tests/fixtures/components/SidebarTab.tsbrowser_tests/fixtures/components/Topbar.tsbrowser_tests/fixtures/helpers/AppModeHelper.tsbrowser_tests/fixtures/helpers/AppModeWidgetHelper.tsbrowser_tests/fixtures/helpers/BuilderFooterHelper.tsbrowser_tests/fixtures/helpers/BuilderSaveAsHelper.tsbrowser_tests/fixtures/helpers/BuilderSelectHelper.tsbrowser_tests/fixtures/helpers/BuilderStepsHelper.tsbrowser_tests/fixtures/helpers/CanvasHelper.tsbrowser_tests/fixtures/helpers/NodeOperationsHelper.tsbrowser_tests/fixtures/helpers/SubgraphHelper.tsbrowser_tests/fixtures/helpers/WorkflowHelper.tsbrowser_tests/fixtures/utils/litegraphUtils.tsbrowser_tests/fixtures/utils/vueNodeFixtures.tsbrowser_tests/tests/appModeDropdownClipping.spec.tsbrowser_tests/tests/backgroundImageUpload.spec.tsbrowser_tests/tests/bottomPanelLogs.spec.tsbrowser_tests/tests/bottomPanelShortcuts.spec.tsbrowser_tests/tests/builderReorder.spec.tsbrowser_tests/tests/builderSaveFlow.spec.tsbrowser_tests/tests/changeTrackerLoadGuard.spec.tsbrowser_tests/tests/copyPaste.spec.tsbrowser_tests/tests/dialog.spec.tsbrowser_tests/tests/dialogs/queueClearHistory.spec.tsbrowser_tests/tests/dialogs/signInDialog.spec.tsbrowser_tests/tests/errorDialog.spec.tsbrowser_tests/tests/errorOverlay.spec.tsbrowser_tests/tests/extensionAPI.spec.tsbrowser_tests/tests/graphCanvasMenu.spec.tsbrowser_tests/tests/groupNode.spec.tsbrowser_tests/tests/interaction.spec.tsbrowser_tests/tests/jobHistoryActions.spec.tsbrowser_tests/tests/keybindingPresets.spec.tsbrowser_tests/tests/keybindings.spec.tsbrowser_tests/tests/maskEditor.spec.tsbrowser_tests/tests/menu.spec.tsbrowser_tests/tests/minimap.spec.tsbrowser_tests/tests/nodeHelp.spec.tsbrowser_tests/tests/nodeLibraryEssentials.spec.tsbrowser_tests/tests/nodeSearchBox.spec.tsbrowser_tests/tests/nodeSearchBoxV2.spec.tsbrowser_tests/tests/nodeSearchBoxV2Extended.spec.tsbrowser_tests/tests/pasteImageContextMenu.spec.tsbrowser_tests/tests/propertiesPanel/ErrorsTabHelper.tsbrowser_tests/tests/propertiesPanel/PropertiesPanelHelper.tsbrowser_tests/tests/propertiesPanel/errorsTab.spec.tsbrowser_tests/tests/propertiesPanel/errorsTabMissingMedia.spec.tsbrowser_tests/tests/propertiesPanel/errorsTabMissingModels.spec.tsbrowser_tests/tests/propertiesPanel/infoTab.spec.tsbrowser_tests/tests/propertiesPanel/nodeSelection.spec.tsbrowser_tests/tests/propertiesPanel/nodeSettings.spec.tsbrowser_tests/tests/propertiesPanel/openClose.spec.tsbrowser_tests/tests/propertiesPanel/propertiesPanelPosition.spec.tsbrowser_tests/tests/propertiesPanel/searchFiltering.spec.tsbrowser_tests/tests/propertiesPanel/titleEditing.spec.tsbrowser_tests/tests/propertiesPanel/workflowOverview.spec.tsbrowser_tests/tests/releaseNotifications.spec.tsbrowser_tests/tests/remoteWidgets.spec.tsbrowser_tests/tests/rerouteNode.spec.tsbrowser_tests/tests/resultGallery.spec.tsbrowser_tests/tests/rightClickMenu.spec.tsbrowser_tests/tests/rightSidePanelTabs.spec.tsbrowser_tests/tests/saveImageAndWebp.spec.tsbrowser_tests/tests/selectionRectangle.spec.tsbrowser_tests/tests/selectionToolbox.spec.tsbrowser_tests/tests/selectionToolboxSubmenus.spec.tsbrowser_tests/tests/sidebar/assets.spec.tsbrowser_tests/tests/sidebar/modelLibrary.spec.tsbrowser_tests/tests/sidebar/nodeLibrary.spec.tsbrowser_tests/tests/sidebar/nodeLibraryV2.spec.tsbrowser_tests/tests/sidebar/workflows.spec.tsbrowser_tests/tests/subgraphPromotedWidgetPanel.spec.tsbrowser_tests/tests/toastNotifications.spec.tsbrowser_tests/tests/topbar/workflowTabs.spec.tsbrowser_tests/tests/useSettingSearch.spec.tsbrowser_tests/tests/userSelectView.spec.tsbrowser_tests/tests/versionMismatchWarnings.spec.tsbrowser_tests/tests/vueNodes/groups/groups.spec.tsbrowser_tests/tests/vueNodes/interactions/node/contextMenu.spec.tsbrowser_tests/tests/vueNodes/interactions/node/imagePreview.spec.tsbrowser_tests/tests/vueNodes/interactions/node/remove.spec.tsbrowser_tests/tests/vueNodes/interactions/node/resize.spec.tsbrowser_tests/tests/vueNodes/interactions/node/select.spec.tsbrowser_tests/tests/vueNodes/nodeStates/bypass.spec.tsbrowser_tests/tests/vueNodes/nodeStates/colors.spec.tsbrowser_tests/tests/vueNodes/nodeStates/error.spec.tsbrowser_tests/tests/vueNodes/nodeStates/mute.spec.tsbrowser_tests/tests/vueNodes/nodeStates/pin.spec.tsbrowser_tests/tests/vueNodes/widgets/advancedWidgets.spec.tsbrowser_tests/tests/vueNodes/widgets/int/integerWidget.spec.tsbrowser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.tsbrowser_tests/tests/widget.spec.tsbrowser_tests/tests/workflowPersistence.spec.tsbrowser_tests/tests/workflowTabThumbnail.spec.tsbrowser_tests/tests/zoomControls.spec.ts
✅ Files skipped from review due to trivial changes (51)
- browser_tests/tests/propertiesPanel/ErrorsTabHelper.ts
- browser_tests/tests/selectionToolbox.spec.ts
- browser_tests/fixtures/utils/litegraphUtils.ts
- browser_tests/tests/vueNodes/interactions/node/remove.spec.ts
- browser_tests/tests/propertiesPanel/propertiesPanelPosition.spec.ts
- browser_tests/tests/copyPaste.spec.ts
- browser_tests/tests/propertiesPanel/nodeSelection.spec.ts
- browser_tests/tests/graphCanvasMenu.spec.ts
- browser_tests/tests/extensionAPI.spec.ts
- browser_tests/tests/useSettingSearch.spec.ts
- browser_tests/tests/nodeSearchBox.spec.ts
- browser_tests/tests/pasteImageContextMenu.spec.ts
- browser_tests/tests/vueNodes/nodeStates/error.spec.ts
- browser_tests/tests/propertiesPanel/titleEditing.spec.ts
- browser_tests/tests/vueNodes/nodeStates/colors.spec.ts
- browser_tests/tests/propertiesPanel/errorsTab.spec.ts
- browser_tests/tests/nodeSearchBoxV2.spec.ts
- browser_tests/tests/dialogs/queueClearHistory.spec.ts
- browser_tests/tests/releaseNotifications.spec.ts
- browser_tests/tests/vueNodes/widgets/int/integerWidget.spec.ts
- browser_tests/tests/zoomControls.spec.ts
- browser_tests/tests/vueNodes/interactions/node/resize.spec.ts
- browser_tests/tests/changeTrackerLoadGuard.spec.ts
- browser_tests/tests/widget.spec.ts
- browser_tests/tests/propertiesPanel/searchFiltering.spec.ts
- browser_tests/tests/toastNotifications.spec.ts
- browser_tests/tests/saveImageAndWebp.spec.ts
- browser_tests/tests/menu.spec.ts
- browser_tests/tests/backgroundImageUpload.spec.ts
- browser_tests/tests/jobHistoryActions.spec.ts
- browser_tests/tests/propertiesPanel/errorsTabMissingModels.spec.ts
- browser_tests/tests/versionMismatchWarnings.spec.ts
- browser_tests/tests/vueNodes/widgets/advancedWidgets.spec.ts
- browser_tests/tests/maskEditor.spec.ts
- browser_tests/tests/vueNodes/interactions/node/select.spec.ts
- browser_tests/tests/keybindings.spec.ts
- browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts
- browser_tests/tests/interaction.spec.ts
- browser_tests/tests/topbar/workflowTabs.spec.ts
- browser_tests/tests/vueNodes/nodeStates/mute.spec.ts
- browser_tests/tests/errorOverlay.spec.ts
- browser_tests/tests/propertiesPanel/nodeSettings.spec.ts
- browser_tests/tests/rightSidePanelTabs.spec.ts
- browser_tests/tests/keybindingPresets.spec.ts
- browser_tests/tests/vueNodes/nodeStates/pin.spec.ts
- browser_tests/fixtures/components/SidebarTab.ts
- browser_tests/tests/sidebar/assets.spec.ts
- browser_tests/tests/bottomPanelLogs.spec.ts
- browser_tests/tests/nodeSearchBoxV2Extended.spec.ts
- browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts
- browser_tests/tests/selectionRectangle.spec.ts
🚧 Files skipped from review as they are similar to previous changes (29)
- browser_tests/fixtures/components/QueuePanel.ts
- browser_tests/tests/errorDialog.spec.ts
- browser_tests/tests/rerouteNode.spec.ts
- browser_tests/tests/builderReorder.spec.ts
- browser_tests/tests/propertiesPanel/openClose.spec.ts
- browser_tests/tests/minimap.spec.ts
- browser_tests/tests/dialogs/signInDialog.spec.ts
- browser_tests/tests/vueNodes/interactions/node/imagePreview.spec.ts
- browser_tests/tests/propertiesPanel/workflowOverview.spec.ts
- browser_tests/tests/propertiesPanel/infoTab.spec.ts
- browser_tests/tests/sidebar/nodeLibraryV2.spec.ts
- browser_tests/tests/vueNodes/groups/groups.spec.ts
- browser_tests/tests/sidebar/modelLibrary.spec.ts
- browser_tests/tests/nodeHelp.spec.ts
- browser_tests/tests/subgraphPromotedWidgetPanel.spec.ts
- browser_tests/tests/propertiesPanel/errorsTabMissingMedia.spec.ts
- browser_tests/tests/sidebar/workflows.spec.ts
- browser_tests/tests/nodeLibraryEssentials.spec.ts
- browser_tests/tests/userSelectView.spec.ts
- browser_tests/tests/propertiesPanel/PropertiesPanelHelper.ts
- browser_tests/tests/selectionToolboxSubmenus.spec.ts
- browser_tests/tests/rightClickMenu.spec.ts
- browser_tests/tests/workflowTabThumbnail.spec.ts
- browser_tests/tests/resultGallery.spec.ts
- browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts
- browser_tests/tests/sidebar/nodeLibrary.spec.ts
- browser_tests/tests/appModeDropdownClipping.spec.ts
- browser_tests/tests/bottomPanelShortcuts.spec.ts
- browser_tests/tests/remoteWidgets.spec.ts
Summary
Add
await expect(locator).toBeVisible()before every.click()call in Playwright E2E tests for better failure diagnostics.Changes
Review Focus
Skip rules applied to avoid false positives:
click({ force: true })— intentionally bypasses actionability.click(stringArg)— NodeReference.click('title'), confirmDialog.click('save'), page.click(selector).click().catch()— fire-and-forget cleanuptoPass()retry blockstoBeVisible()/waitFor({ state: 'visible' })NodeWidgetReference.click()— canvas coordinate-basedSpot-check a few fixture files (ContextMenu.ts, SidebarTab.ts, Topbar.ts) to verify the assertions are placed correctly.
┆Issue is synchronized with this Notion page by Unito