mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 10:12:11 +00:00
[Test] Fix flaky playwright tests (#3170)
This commit is contained in:
@@ -5,8 +5,8 @@ import { comfyPageFixture as test } from '../fixtures/ComfyPage'
|
|||||||
test.describe('DOM Widget', () => {
|
test.describe('DOM Widget', () => {
|
||||||
test('Collapsed multiline textarea is not visible', async ({ comfyPage }) => {
|
test('Collapsed multiline textarea is not visible', async ({ comfyPage }) => {
|
||||||
await comfyPage.loadWorkflow('collapsed_multiline')
|
await comfyPage.loadWorkflow('collapsed_multiline')
|
||||||
|
const textareaWidget = comfyPage.page.locator('.comfy-multiline-input')
|
||||||
expect(comfyPage.page.locator('.comfy-multiline-input')).not.toBeVisible()
|
await expect(textareaWidget).not.toBeVisible()
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Multiline textarea correctly collapses', async ({ comfyPage }) => {
|
test('Multiline textarea correctly collapses', async ({ comfyPage }) => {
|
||||||
|
|||||||
@@ -321,6 +321,7 @@ test.describe('Remote COMBO Widget', () => {
|
|||||||
|
|
||||||
// Click refresh button
|
// Click refresh button
|
||||||
await clickRefreshButton(comfyPage, nodeName)
|
await clickRefreshButton(comfyPage, nodeName)
|
||||||
|
await comfyPage.page.waitForTimeout(200)
|
||||||
|
|
||||||
// Verify the selected value of the widget is the first option in the refreshed list
|
// Verify the selected value of the widget is the first option in the refreshed list
|
||||||
const refreshedValue = await getWidgetValue(comfyPage, nodeName)
|
const refreshedValue = await getWidgetValue(comfyPage, nodeName)
|
||||||
|
|||||||
@@ -227,6 +227,7 @@ test.describe('Workflows sidebar', () => {
|
|||||||
|
|
||||||
await topbar.saveWorkflowAs('workflow1.json')
|
await topbar.saveWorkflowAs('workflow1.json')
|
||||||
await comfyPage.confirmDialog.click('overwrite')
|
await comfyPage.confirmDialog.click('overwrite')
|
||||||
|
await comfyPage.page.waitForTimeout(200)
|
||||||
// The old workflow1.json should be deleted and the new one should be saved.
|
// The old workflow1.json should be deleted and the new one should be saved.
|
||||||
expect(await comfyPage.menu.workflowsTab.getOpenedWorkflowNames()).toEqual([
|
expect(await comfyPage.menu.workflowsTab.getOpenedWorkflowNames()).toEqual([
|
||||||
'workflow2.json',
|
'workflow2.json',
|
||||||
|
|||||||
Reference in New Issue
Block a user