diff --git a/browser_tests/dialog.spec.ts b/browser_tests/dialog.spec.ts index 7b46f9525..5e2d601f2 100644 --- a/browser_tests/dialog.spec.ts +++ b/browser_tests/dialog.spec.ts @@ -95,3 +95,34 @@ test.describe('Missing models warning', () => { await expect(folderSelect).not.toBeVisible() }) }) + +test.describe('Settings', () => { + test.afterEach(async ({ comfyPage }) => { + // Restore default setting value + await comfyPage.setSetting('Comfy.Graph.ZoomSpeed', 1.1) + }) + + test('@mobile Should be visible on mobile', async ({ comfyPage }) => { + await comfyPage.page.keyboard.press('Control+,') + const searchBox = comfyPage.page.locator('.settings-content') + await expect(searchBox).toBeVisible() + }) + + test('Can open settings with hotkey', async ({ comfyPage }) => { + await comfyPage.page.keyboard.down('ControlOrMeta') + await comfyPage.page.keyboard.press(',') + await comfyPage.page.keyboard.up('ControlOrMeta') + const settingsLocator = comfyPage.page.locator('.settings-container') + await expect(settingsLocator).toBeVisible() + await comfyPage.page.keyboard.press('Escape') + await expect(settingsLocator).not.toBeVisible() + }) + + test('Can change canvas zoom speed setting', async ({ comfyPage }) => { + const maxSpeed = 2.5 + await comfyPage.setSetting('Comfy.Graph.ZoomSpeed', maxSpeed) + test.step('Setting should persist', async () => { + expect(await comfyPage.getSetting('Comfy.Graph.ZoomSpeed')).toBe(maxSpeed) + }) + }) +}) diff --git a/browser_tests/interaction.spec.ts b/browser_tests/interaction.spec.ts index dd19d3e1d..d542e117c 100644 --- a/browser_tests/interaction.spec.ts +++ b/browser_tests/interaction.spec.ts @@ -507,15 +507,3 @@ test.describe('Load duplicate workflow', () => { expect(await comfyPage.getGraphNodesCount()).toBe(1) }) }) - -test.describe('Menu interactions', () => { - test('Can open settings with hotkey', async ({ comfyPage }) => { - await comfyPage.page.keyboard.down('ControlOrMeta') - await comfyPage.page.keyboard.press(',') - await comfyPage.page.keyboard.up('ControlOrMeta') - const settingsLocator = comfyPage.page.locator('.settings-container') - await expect(settingsLocator).toBeVisible() - await comfyPage.page.keyboard.press('Escape') - await expect(settingsLocator).not.toBeVisible() - }) -}) diff --git a/browser_tests/menu.spec.ts b/browser_tests/menu.spec.ts index 2f1cf0eb3..f55f16257 100644 --- a/browser_tests/menu.spec.ts +++ b/browser_tests/menu.spec.ts @@ -524,17 +524,4 @@ test.describe('Menu', () => { expect(await comfyPage.getSetting('Comfy.UseNewMenu')).toBe('Top') }) }) - - test('Can change canvas zoom speed setting', async ({ comfyPage }) => { - const [defaultSpeed, maxSpeed] = [1.1, 2.5] - expect(await comfyPage.getSetting('Comfy.Graph.ZoomSpeed')).toBe( - defaultSpeed - ) - await comfyPage.setSetting('Comfy.Graph.ZoomSpeed', maxSpeed) - expect(await comfyPage.getSetting('Comfy.Graph.ZoomSpeed')).toBe(maxSpeed) - await comfyPage.page.reload() - await comfyPage.setup() - expect(await comfyPage.getSetting('Comfy.Graph.ZoomSpeed')).toBe(maxSpeed) - await comfyPage.setSetting('Comfy.Graph.ZoomSpeed', defaultSpeed) - }) })