mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-06 08:00:05 +00:00
fix: flaky test 'Can choose existing user' in userSelectView.spec.ts
This commit is contained in:
@@ -35,9 +35,27 @@ 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()
|
||||
|
||||
// Wait for dropdown to populate
|
||||
await page.waitForTimeout(500)
|
||||
|
||||
// Try to click first option if it exists
|
||||
const firstOption = page.locator('.p-select-list .p-select-option').first()
|
||||
|
||||
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 })
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user