|
87 | 87 | }); |
88 | 88 | //connection 1 |
89 | 89 | const elementCombineTextOutput0 = page |
90 | | - .getByTestId("div-handle-combinetext-shownode-combined text-right") |
| 90 | + .getByTestId("handle-combinetext-shownode-combined text-right") |
91 | 91 | .nth(0); |
92 | 92 | await elementCombineTextOutput0.click(); |
93 | 93 |
|
@@ -169,10 +169,34 @@ test( |
169 | 169 |
|
170 | 170 | await adjustScreenView(page, { numberOfZoomOut: 2 }); |
171 | 171 |
|
172 | | - await page |
173 | | - .getByTestId("title-Combine Text") |
174 | | - .first() |
175 | | - .click({ modifiers: ["ControlOrMeta"] }); |
| 172 | + // Select both Combine Text nodes using box selection (Shift+drag) |
| 173 | + // Note: Ctrl/Meta+click doesn't work reliably in Playwright with ReactFlow |
| 174 | + const combineTextNodes = page.locator(".react-flow__node").filter({ |
| 175 | + has: page.getByTestId("title-Combine Text"), |
| 176 | + }); |
| 177 | + |
| 178 | + const firstBox = await combineTextNodes.first().boundingBox(); |
| 179 | + const secondBox = await combineTextNodes.nth(1).boundingBox(); |
| 180 | + |
| 181 | + if (firstBox && secondBox) { |
| 182 | + // Calculate area to drag-select both nodes |
| 183 | + const startX = Math.min(firstBox.x, secondBox.x) - 50; |
| 184 | + const startY = Math.min(firstBox.y, secondBox.y) - 50; |
| 185 | + const endX = |
| 186 | + Math.max(firstBox.x + firstBox.width, secondBox.x + secondBox.width) + |
| 187 | + 50; |
| 188 | + const endY = |
| 189 | + Math.max(firstBox.y + firstBox.height, secondBox.y + secondBox.height) + |
| 190 | + 50; |
| 191 | + |
| 192 | + // Use Shift+drag for box selection |
| 193 | + await page.keyboard.down("Shift"); |
| 194 | + await page.mouse.move(startX, startY); |
| 195 | + await page.mouse.down(); |
| 196 | + await page.mouse.move(endX, endY, { steps: 10 }); |
| 197 | + await page.mouse.up(); |
| 198 | + await page.keyboard.up("Shift"); |
| 199 | + } |
176 | 200 |
|
177 | 201 | await page.waitForSelector('[data-testid="group-node"]', { |
178 | 202 | timeout: 3000, |
|
0 commit comments