mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-08 06:30:04 +00:00
## Summary Fixes flaky screenshot test that was identified during the PR #9400 snapshot update, where baselines regenerated without any code changes affecting them. **Root cause:** `fillAndSelectFirstNode('KSampler')` selected `nth(0)` from the autocomplete dropdown, but search result ordering is non-deterministic when the search box opens via link release with filter chips. Sometimes 'Preview Image' appeared as the first result instead of 'KSampler', causing a completely different node to be added. **Fix:** Added an `exact: true` option to `fillAndSelectFirstNode` that uses an `aria-label` selector to click the specific matching result instead of blindly selecting the first item. - Fixes #4658 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9426-fix-stabilize-flaky-screenshot-tests-for-search-results-and-image-preview-31a6d73d365081598167ce285416995c) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>