From e193924a36396cb01e238eec09485310e2894b0c Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Sat, 31 Jan 2026 01:24:24 -0800 Subject: [PATCH] refactor: replace fragile CSS selectors with data-testid in ComfyPage.ts Amp-Thread-ID: https://ampcode.com/threads/T-019c1359-48cc-7676-abc8-2de8c57b52cf Co-authored-by: Amp --- browser_tests/fixtures/ComfyPage.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/browser_tests/fixtures/ComfyPage.ts b/browser_tests/fixtures/ComfyPage.ts index 054698f03..7fb860435 100644 --- a/browser_tests/fixtures/ComfyPage.ts +++ b/browser_tests/fixtures/ComfyPage.ts @@ -4,6 +4,7 @@ import dotenv from 'dotenv' import * as fs from 'fs' import type { KeyCombo } from '../../src/platform/keybindings' +import { TestIds } from './selectors' import type { useWorkspaceStore } from '../../src/stores/workspaceStore' import { NodeBadgeMode } from '../../src/types/nodeSource' import { ComfyActionbar } from '../helpers/actionbar' @@ -52,8 +53,8 @@ class ComfyMenu { public readonly saveButton: Locator constructor(public readonly page: Page) { - this.sideToolbar = page.locator('.side-tool-bar-container') - this.themeToggleButton = page.locator('.comfy-vue-theme-toggle') + this.sideToolbar = page.getByTestId(TestIds.sidebar.toolbar) + this.themeToggleButton = page.getByTestId(TestIds.sidebar.themeToggle) this.propertiesPanel = new ComfyPropertiesPanel(page) this.saveButton = page .locator('button[title="Save the current workflow"]')