mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-01 19:20:10 +00:00
fix: use specific role selectors to avoid strict mode violations
Section headers in Global Settings are uppercase buttons (NODES, CANVAS, CONNECTION LINKS), not plain text. Using getByRole with exact name avoids matching tabs and setting labels with similar text. Amp-Thread-ID: https://ampcode.com/threads/T-019c16eb-8621-7473-9062-a57b0a1e782a
This commit is contained in:
@@ -13,20 +13,24 @@ test.describe('Properties panel global settings', { tag: ['@ui'] }, () => {
|
||||
test('displays Nodes section', async ({ comfyPage }) => {
|
||||
const { propertiesPanel } = comfyPage
|
||||
|
||||
await expect(propertiesPanel.root.getByText('Nodes')).toBeVisible()
|
||||
await expect(
|
||||
propertiesPanel.root.getByRole('button', { name: 'NODES' })
|
||||
).toBeVisible()
|
||||
})
|
||||
|
||||
test('displays Canvas section', async ({ comfyPage }) => {
|
||||
const { propertiesPanel } = comfyPage
|
||||
|
||||
await expect(propertiesPanel.root.getByText('Canvas')).toBeVisible()
|
||||
await expect(
|
||||
propertiesPanel.root.getByRole('button', { name: 'CANVAS' })
|
||||
).toBeVisible()
|
||||
})
|
||||
|
||||
test('displays Connection Links section', async ({ comfyPage }) => {
|
||||
const { propertiesPanel } = comfyPage
|
||||
|
||||
await expect(
|
||||
propertiesPanel.root.getByText('Connection Links')
|
||||
propertiesPanel.root.getByRole('button', { name: 'CONNECTION LINKS' })
|
||||
).toBeVisible()
|
||||
})
|
||||
|
||||
|
||||
@@ -20,8 +20,12 @@ test.describe('Properties panel tab navigation', { tag: ['@ui'] }, () => {
|
||||
await expect(propertiesPanel.root.getByText('KSampler')).toBeVisible()
|
||||
|
||||
await propertiesPanel.clickTab('Global Settings')
|
||||
await expect(propertiesPanel.root.getByText('Nodes')).toBeVisible()
|
||||
await expect(propertiesPanel.root.getByText('Canvas')).toBeVisible()
|
||||
await expect(
|
||||
propertiesPanel.root.getByRole('button', { name: 'NODES' })
|
||||
).toBeVisible()
|
||||
await expect(
|
||||
propertiesPanel.root.getByRole('button', { name: 'CANVAS' })
|
||||
).toBeVisible()
|
||||
})
|
||||
|
||||
test('switches between tabs in single node mode', async ({ comfyPage }) => {
|
||||
|
||||
Reference in New Issue
Block a user