(sourceLocator, destinationLocator)
| 3291 | } |
| 3292 | |
| 3293 | async function proceedDragAndDrop(sourceLocator, destinationLocator) { |
| 3294 | const src = await this._locateElement(sourceLocator) |
| 3295 | if (!src) { |
| 3296 | throw new ElementNotFound(sourceLocator, 'Source Element') |
| 3297 | } |
| 3298 | |
| 3299 | const dst = await this._locateElement(destinationLocator) |
| 3300 | if (!dst) { |
| 3301 | throw new ElementNotFound(destinationLocator, 'Destination Element') |
| 3302 | } |
| 3303 | |
| 3304 | // Note: Using public api .getClickablePoint because the .BoundingBox does not take into account iframe offsets |
| 3305 | const dragSource = await getClickablePoint(src) |
| 3306 | const dragDestination = await getClickablePoint(dst) |
| 3307 | |
| 3308 | // Drag start point |
| 3309 | await this.page.mouse.move(dragSource.x, dragSource.y, { steps: 5 }) |
| 3310 | await this.page.mouse.down() |
| 3311 | |
| 3312 | // Drag destination |
| 3313 | await this.page.mouse.move(dragDestination.x, dragDestination.y, { steps: 5 }) |
| 3314 | await this.page.mouse.up() |
| 3315 | |
| 3316 | await this._waitForAction() |
| 3317 | } |
| 3318 | |
| 3319 | async function proceedSeeInField(assertType, field, value, context) { |
| 3320 | const els = await findVisibleFields.call(this, field, context) |
nothing calls this directly
no test coverage detected