Skip to content
Merged
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
14 changes: 6 additions & 8 deletions browser_tests/fixtures/components/ComfyNodeSearchBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@ class ComfyNodeSearchFilterSelectionPanel {
}

async selectFilterType(filterType: string) {
await this.page
.locator(
`.filter-type-select .p-togglebutton-label:has-text("${filterType}")`
)
await this.root
.getByRole('button', { name: filterType, exact: true })
.click()
}

async selectFilterValue(filterValue: string) {
await this.page.locator('.filter-value-select .p-select-dropdown').click()
await this.root
.getByRole('button', { name: 'Single-select dropdown' })
.click()
await this.page
.locator(
`.p-select-overlay .p-select-list .p-select-option-label:text-is("${filterValue}")`
)
.getByRole('option', { name: filterValue, exact: true })
.click()
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion browser_tests/tests/authAccountSwitch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ test.describe('Cloud account switch', { tag: '@cloud' }, () => {
await expect(page).toHaveURL(/\/cloud\/login\?switchAccount=true$/)
await page.getByRole('button', { name: 'Use email instead' }).click()
await page.getByLabel('Email').fill(ACCOUNT_B.email)
await page.getByLabel('Password').fill('password')
await page
.getByRole('textbox', { name: 'Password', exact: true })
.fill('password')
await page.getByRole('button', { name: 'Sign in' }).click()

await expect(
Expand Down
2 changes: 2 additions & 0 deletions browser_tests/tests/cloudWorkspaceDeepLink.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ async function gotoAndWaitThroughSwitch(comfyPage: ComfyPage, path: string) {

test.describe('Cloud workspace deep link', { tag: '@cloud' }, () => {
test('switches into the workspace the link names', async ({ comfyPage }) => {
test.slow()
const page = comfyPage.page

await gotoAndWaitThroughSwitch(comfyPage, '/?workspace=ws-team')
Expand Down Expand Up @@ -99,6 +100,7 @@ test.describe('Cloud workspace deep link', { tag: '@cloud' }, () => {
test('opens Settings on the requested workspace from a combined deep link', async ({
comfyPage
}) => {
test.slow()
const page = comfyPage.page

await gotoAndWaitThroughSwitch(
Expand Down
2 changes: 1 addition & 1 deletion browser_tests/tests/dialogs/billingSessionSdkRail.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ async function signInWithEmail(page: Page) {
)
await page.getByRole('button', { name: 'Use email instead' }).click()
await page.getByLabel('Email').fill(CLOUD_SELF_EMAIL)
await page.getByLabel('Password').fill('password')
await page.getByLabel('Password', { exact: true }).fill('password')
await page.getByRole('button', { name: 'Sign in' }).click()
await expect(page.getByTestId(TestIds.user.currentUserButton)).toBeVisible()
}
Expand Down
22 changes: 7 additions & 15 deletions browser_tests/tests/dialogs/settingsDialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,6 @@ test.describe('Settings dialog', { tag: '@ui' }, () => {
const settingRow = dialog.root.locator(`[data-setting-id="${settingId}"]`)
await expect(settingRow).toBeVisible()

// Wait for the search filter to fully settle — PrimeVue re-renders
// the entire settings list after typing, and the combobox element is
// replaced during re-render. Wait until the filtered list stabilises
// before interacting with the combobox.
const settingItems = dialog.root.locator('[data-setting-id]')
await expect
.poll(() => settingItems.count(), { timeout: 5000 })
Expand All @@ -193,20 +189,16 @@ test.describe('Settings dialog', { tag: '@ui' }, () => {
await expect(select).toBeVisible()
await expect(select).toBeEnabled()

// Open the dropdown via its combobox role and verify it expanded.
// Retry because the PrimeVue Select may still re-render after the
// filter settles, causing the first click to land on a stale element.
await expect(async () => {
const expanded = await select.getAttribute('aria-expanded')
if (expanded !== 'true') await select.click()
await expect(select).toHaveAttribute('aria-expanded', 'true')
}).toPass({ timeout: 10_000 })
await select.click()

// Pick the option that is not the current value
const targetValue = initialValue === 'Top' ? 'Disabled' : 'Top'
await comfyPage.page
.getByRole('option', { name: targetValue, exact: true })
.click()
const targetOption = comfyPage.page.getByRole('option', {
name: targetValue,
exact: true
})
await expect(targetOption).toBeVisible()
await targetOption.click()

await expect
.poll(() => comfyPage.settings.getSetting<string>(settingId))
Expand Down
17 changes: 16 additions & 1 deletion browser_tests/tests/dialogs/signInDialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,23 @@ test.describe('Sign In dialog', { tag: '@ui' }, () => {
await expect(dialog.apiKeyButton).toBeVisible()
})

test('Should show forgot password link on sign-in form', async () => {
test('Should show forgot password as a keyboard-focusable text action', async () => {
await expect(dialog.forgotPasswordLink).toBeVisible()
await expect(dialog.forgotPasswordLink).toHaveCSS(
'background-color',
'rgba(0, 0, 0, 0)'
)
await expect(dialog.forgotPasswordLink).toHaveCSS('border-width', '0px')
await expect(dialog.forgotPasswordLink).toHaveCSS('padding', '0px')
const buttonFont = await dialog.signInButton.evaluate(
(button) => getComputedStyle(button).fontFamily
)
await expect(dialog.forgotPasswordLink).toHaveCSS('font-family', buttonFont)

await dialog.emailInput.focus()
await dialog.emailInput.press('Tab')
await expect(dialog.forgotPasswordLink).toBeFocused()
await expect(dialog.forgotPasswordLink).not.toHaveCSS('box-shadow', 'none')
})

test('Should close dialog via close button', async () => {
Expand Down
23 changes: 9 additions & 14 deletions browser_tests/tests/extensionAPI.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,29 +177,29 @@ test.describe('Topbar commands', () => {
type: 'number',
defaultValue: 10
},
selector: '.p-inputnumber input'
selector: 'input[inputmode="decimal"]'
},
{
config: {
type: 'slider',
defaultValue: 10
},
selector: '.p-slider.p-component'
selector: '[data-slot="slider"]'
},
{
config: {
type: 'combo',
defaultValue: 'foo',
options: ['foo', 'bar', 'baz']
},
selector: '.p-select.p-component'
selector: '[role="combobox"]'
},
{
config: {
type: 'text',
defaultValue: 'Hello'
},
selector: '.p-inputtext'
selector: 'input'
},
{
config: {
Expand Down Expand Up @@ -234,16 +234,11 @@ test.describe('Topbar commands', () => {
.getByText('TestSetting Test')
.locator(selector)

await expect
.poll(() =>
component.evaluate((el) =>
el instanceof HTMLInputElement ||
el instanceof HTMLButtonElement
? el.disabled
: el.classList.contains('p-disabled')
)
)
.toBe(true)
if (config.type === 'slider') {
await expect(component).toHaveAttribute('aria-disabled', 'true')
} else {
await expect(component).toBeDisabled()
}
})
}
})
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions browser_tests/tests/nodeSearchBox.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,34 @@ test.describe('Node search box', { tag: '@node' }, () => {
await expectFilterChips(comfyPage, ['MODEL'])
})

for (const { key, target } of [
{ key: 'Tab', target: 'Add' },
{ key: 'Shift+Tab', target: 'Input Type' }
]) {
test(`${key} leaves the filter dropdown for ${target}`, async ({
comfyPage
}) => {
await comfyPage.searchBox.filterButton.click()
const panel = comfyPage.searchBox.filterSelectionPanel
await panel.selectFilterType('Input Type')
await panel.root
.getByRole('button', { name: 'Single-select dropdown' })
.click()
const search = comfyPage.page.getByRole('combobox', {
name: 'Search',
exact: true
})
await expect(search).toBeFocused()

await search.press(key)

await expect(search).toBeHidden()
await expect(
panel.root.getByRole('button', { name: target, exact: true })
).toBeFocused()
})
}

test('Outer click dismisses filter panel but keeps search box visible', async ({
comfyPage
}) => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions browser_tests/tests/sidebar/nodeLibrary.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ test.describe('Node library sidebar', () => {

await tab.getFolder('foo').click({ button: 'right' })
await comfyPage.page
.locator('.p-contextmenu-item-label:has-text("Rename")')
.getByRole('menuitem', { name: 'Rename', exact: true })
.click()
await renameInlineFolder(comfyPage, 'bar')

Expand Down Expand Up @@ -293,9 +293,10 @@ test.describe('Node library sidebar', () => {
await comfyPage.page.getByLabel('Customize').click()

// Click a color option multiple times
const customColorOption = comfyPage.page.locator(
'.p-togglebutton-content > .pi-palette'
)
const customColorOption = comfyPage.page.getByRole('button', {
name: 'Custom',
exact: true
})
await customColorOption.click()
await customColorOption.click()

Expand Down Expand Up @@ -342,7 +343,7 @@ test.describe('Node library sidebar', () => {
await expect(tab.getFolder('foo')).toBeVisible()
await tab.getFolder('foo').click({ button: 'right' })
await comfyPage.page
.locator('.p-contextmenu-item-label:has-text("Rename")')
.getByRole('menuitem', { name: 'Rename', exact: true })
.click()
await renameInlineFolder(comfyPage, 'bar')
await comfyPage.nextFrame()
Expand Down
2 changes: 1 addition & 1 deletion browser_tests/tests/userSelectView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test.describe('User Select View', { tag: '@settings' }, () => {
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()
await page.getByRole('option').first().click()
await userSelectPage.nextButton.click()
await expect(page).toHaveURL(userSelectPage.url)
})
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
"@iconify/json": "catalog:",
"@primeuix/utils": "catalog:",
"@primevue/core": "catalog:",
"@primevue/forms": "catalog:",
"@primevue/themes": "catalog:",
"@sentry/vue": "catalog:",
"@sparkjsdev/spark": "catalog:",
Expand Down Expand Up @@ -236,7 +235,7 @@
"tsx": "catalog:",
"typescript": "catalog:",
"typescript-eslint": "catalog:",
"typescript-native-bridge": "catalog:",

Check warning on line 238 in package.json

View workflow job for this annotation

GitHub Actions / fallow

Unused devDependency

Package 'typescript-native-bridge' is listed in devDependencies but never imported by this package. Run: pnpm remove typescript-native-bridge Caveat: incomplete import graph. A file this run did not fully read can hide the reference that would credit this, so verify before removing.
"unplugin-icons": "catalog:",
"unplugin-typegpu": "catalog:",
"unplugin-vue-components": "catalog:",
Expand Down
26 changes: 0 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ catalog:
'@playwright/test': ^1.63.0
'@primeuix/utils': ^0.3.2
'@primevue/core': 4.2.5
'@primevue/forms': 4.2.5
'@primevue/themes': 4.2.5
'@sentry/vite-plugin': ^4.6.0
'@sentry/vue': ^10.32.1
Expand Down
Loading
Loading