fix: browser test fixes for flaky selectors and missing setup

- SidebarTab: Use placeholder selector instead of test ID for search input
- KeyboardHelper: Remove redundant canvas fallback (null is valid)
- groupNode: Use variable for category name instead of hardcoded string
- nodeLibrary: Ensure tab is open before filling search input
- subgraph: Reload workflow after page reload to restore state
- useSettingSearch: Use role selector and simplify selected class assertion

Amp-Thread-ID: https://ampcode.com/threads/T-019c18c2-667a-7179-bb2d-86f35cd1d7b0
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Alexander Brown
2026-02-01 02:39:59 -08:00
parent e1bc1c4721
commit 5bd37bef99
6 changed files with 16 additions and 17 deletions

View File

@@ -20,26 +20,26 @@ export class KeyboardHelper {
}
async selectAll(locator?: Locator | null): Promise<void> {
await this.ctrlSend('KeyA', locator ?? this.canvas)
await this.ctrlSend('KeyA', locator)
}
async bypass(locator?: Locator | null): Promise<void> {
await this.ctrlSend('KeyB', locator ?? this.canvas)
await this.ctrlSend('KeyB', locator)
}
async undo(locator?: Locator | null): Promise<void> {
await this.ctrlSend('KeyZ', locator ?? this.canvas)
await this.ctrlSend('KeyZ', locator)
}
async redo(locator?: Locator | null): Promise<void> {
await this.ctrlSend('KeyY', locator ?? this.canvas)
await this.ctrlSend('KeyY', locator)
}
async moveUp(locator?: Locator | null): Promise<void> {
await this.ctrlSend('ArrowUp', locator ?? this.canvas)
await this.ctrlSend('ArrowUp', locator)
}
async moveDown(locator?: Locator | null): Promise<void> {
await this.ctrlSend('ArrowDown', locator ?? this.canvas)
await this.ctrlSend('ArrowDown', locator)
}
}