Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions browser_tests/tests/userSelectView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,25 @@ test.describe('User Select View', () => {
test('Can choose existing user', async ({ userSelectPage, page }) => {
await page.goto(userSelectPage.url)
await expect(page).toHaveURL(userSelectPage.selectionUrl)

await userSelectPage.existingUserSelect.click()
await page.locator('.p-select-list .p-select-option').first().click()

const dropdownList = page.locator('.p-select-list')
await expect(dropdownList).toBeVisible()

// Try to click first option if it exists
const firstOption = page.locator('.p-select-list .p-select-option').first()
await firstOption.waitFor({ state: 'visible', timeout: 5000 })

if ((await firstOption.count()) > 0) {
await firstOption.click()
} else {
// No options available - close dropdown and use new user input
await page.keyboard.press('Escape')
await userSelectPage.newUserInput.fill(`test-user-${Date.now()}`)
}

await userSelectPage.nextButton.click()
await expect(page).toHaveURL(userSelectPage.url)
await expect(page).toHaveURL(userSelectPage.url, { timeout: 15000 })
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ test.describe('Vue Node Link Interaction', () => {
'vue-node-input-drag-ctrl-alt.png'
)
} finally {
// Cleanup operations: silently ignore errors if state is already clean
await comfyMouse.drop().catch(() => {})
await comfyPage.page.keyboard.up('Alt').catch(() => {})
await comfyPage.page.keyboard.up('Control').catch(() => {})
Expand Down Expand Up @@ -467,6 +468,7 @@ test.describe('Vue Node Link Interaction', () => {
await comfyMouse.drop()
dropped = true
} finally {
// Cleanup: ensure mouse is released if drop failed
if (!dropped) {
await comfyMouse.drop().catch(() => {})
}
Expand Down Expand Up @@ -557,6 +559,7 @@ test.describe('Vue Node Link Interaction', () => {
await comfyMouse.drop()
dropPending = false
} finally {
// Cleanup: ensure mouse and keyboard are released if test fails
if (dropPending) await comfyMouse.drop().catch(() => {})
if (shiftHeld) await comfyPage.page.keyboard.up('Shift').catch(() => {})
}
Expand Down Expand Up @@ -689,6 +692,7 @@ test.describe('Vue Node Link Interaction', () => {
'vue-node-shift-output-multi-link.png'
)
} finally {
// Cleanup: ensure mouse and keyboard are released if test fails
if (dropPending) await comfyMouse.drop().catch(() => {})
if (shiftHeld) await comfyPage.page.keyboard.up('Shift').catch(() => {})
}
Expand Down