mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-10 15:40:24 +00:00
[tests] update selection overlay tests after canvas migration (#5173)
* [fix] update selection overlay tests after canvas migration Update browser tests to work with canvas-based selection overlay introduced in PR #5158. Replaces DOM-based .selection-overlay-container checks with .selection-toolbox visibility and converts border visibility tests to canvas screenshot comparisons. Fixes #5158 * [chore] remove unused file flagged by knip * [fix] adjust test expectations for canvas-based positioning - Skip animated webp test unrelated to selection overlay changes - Update toolbox position expectations to match canvas-based coordinates - Canvas positioning uses different coordinate system than DOM overlay * [fix] improve positioning test flexibility and revert webp skip - Make toolbox position test more flexible for canvas-based coordinates - Revert animated webp test skip as requested in review - Canvas positioning varies more than DOM, use reasonable bounds instead * Update test expectations [skip ci] * [refactor] address review comments - use fixture locators - Add selectionToolbox locator to ComfyPage fixture as requested - Replace .isVisible() === false with .not.toBeVisible() pattern - Update all selection toolbox locators to use fixture instead of inline selectors - Improves maintainability and follows established patterns * [refactor] use fixture canvas locator for screenshots Replace inline canvas locators with comfyPage.canvas fixture property for consistency and maintainability as suggested in review. --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -41,15 +41,12 @@ test.describe('Node Help', () => {
|
||||
// Select the node with panning to ensure toolbox is visible
|
||||
await selectNodeWithPan(comfyPage, ksamplerNodes[0])
|
||||
|
||||
// Wait for selection overlay container and toolbox to appear
|
||||
await expect(
|
||||
comfyPage.page.locator('.selection-overlay-container')
|
||||
).toBeVisible()
|
||||
await expect(comfyPage.page.locator('.selection-toolbox')).toBeVisible()
|
||||
// Wait for selection toolbox to appear
|
||||
await expect(comfyPage.selectionToolbox).toBeVisible()
|
||||
|
||||
// Click the help button in the selection toolbox
|
||||
const helpButton = comfyPage.page.locator(
|
||||
'.selection-toolbox button:has(.pi-question-circle)'
|
||||
const helpButton = comfyPage.selectionToolbox.locator(
|
||||
'button:has(.pi-question-circle)'
|
||||
)
|
||||
await expect(helpButton).toBeVisible()
|
||||
await helpButton.click()
|
||||
|
||||
Reference in New Issue
Block a user