-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix collapsed node textarea causes UI inconsistency (#2267)
- Loading branch information
1 parent
edd58cd
commit 79fee6a
Showing
3 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"last_node_id": 1, | ||
"last_link_id": 0, | ||
"nodes": [ | ||
{ | ||
"id": 1, | ||
"type": "CLIPTextEncode", | ||
"pos": [20, 50], | ||
"size": [400, 200], | ||
"flags": { "collapsed": true }, | ||
"order": 0, | ||
"mode": 0, | ||
"inputs": [ | ||
{ | ||
"name": "clip", | ||
"type": "CLIP", | ||
"link": null, | ||
"localized_name": "clip" | ||
} | ||
], | ||
"outputs": [ | ||
{ | ||
"name": "CONDITIONING", | ||
"type": "CONDITIONING", | ||
"links": null, | ||
"localized_name": "CONDITIONING" | ||
} | ||
], | ||
"properties": {}, | ||
"widgets_values": ["Should not be displayed."] | ||
} | ||
], | ||
"links": [], | ||
"groups": [], | ||
"config": {}, | ||
"version": 0.4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { expect } from '@playwright/test' | ||
|
||
import { comfyPageFixture as test } from './fixtures/ComfyPage' | ||
|
||
test.describe('DOM Widget', () => { | ||
test('Collapsed multiline textarea is not visible', async ({ comfyPage }) => { | ||
await comfyPage.loadWorkflow('collapsed_multiline') | ||
|
||
expect(comfyPage.page.locator('.comfy-multiline-input')).not.toBeVisible() | ||
}) | ||
|
||
test('Multiline textarea correctly collapses', async ({ comfyPage }) => { | ||
const multilineTextAreas = comfyPage.page.locator('.comfy-multiline-input') | ||
const firstMultiline = multilineTextAreas.first() | ||
const lastMultiline = multilineTextAreas.last() | ||
|
||
await expect(firstMultiline).toBeVisible() | ||
await expect(lastMultiline).toBeVisible() | ||
|
||
const nodes = await comfyPage.getNodeRefsByType('CLIPTextEncode') | ||
for (const node of nodes) { | ||
await node.click('collapse') | ||
} | ||
await expect(firstMultiline).not.toBeVisible() | ||
await expect(lastMultiline).not.toBeVisible() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters