From 293eea446f8895288e85de684e8a477d145aab88 Mon Sep 17 00:00:00 2001 From: DrJKL Date: Wed, 13 May 2026 16:34:24 -0700 Subject: [PATCH] test(appMode): match widget key by nodeId:name suffix of canonical entityId Amp-Thread-ID: https://ampcode.com/threads/T-019e2260-c2ba-70b4-9962-1638be4bf645 Co-authored-by: Amp --- browser_tests/fixtures/helpers/AppModeWidgetHelper.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/browser_tests/fixtures/helpers/AppModeWidgetHelper.ts b/browser_tests/fixtures/helpers/AppModeWidgetHelper.ts index 0271a92f3c..85574f4226 100644 --- a/browser_tests/fixtures/helpers/AppModeWidgetHelper.ts +++ b/browser_tests/fixtures/helpers/AppModeWidgetHelper.ts @@ -5,8 +5,9 @@ import type { ComfyPage } from '@e2e/fixtures/ComfyPage' /** * Helper for interacting with widgets rendered in app mode (linear view). * - * Widgets are located by their key (format: "nodeId:widgetName") via the - * `data-widget-key` attribute on each widget item. + * Widgets are located by `nodeId:widgetName` suffix against the + * `data-widget-key` attribute, which carries the canonical + * `graphId:nodeId:widgetName` WidgetEntityId. */ export class AppModeWidgetHelper { constructor(private readonly comfyPage: ComfyPage) {} @@ -19,9 +20,9 @@ export class AppModeWidgetHelper { return this.comfyPage.appMode.linearWidgets } - /** Get a widget item container by its key (e.g. "6:text", "3:seed"). */ + /** Get a widget item container by its `nodeId:widgetName` suffix. */ getWidgetItem(key: string): Locator { - return this.container.locator(`[data-widget-key="${key}"]`) + return this.container.locator(`[data-widget-key$=":${key}"]`) } /** Fill a textarea widget (e.g. CLIP Text Encode prompt). */