-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…selection-using-drag-and-drop Feature/#407 qa test multiple selection using drag and drop
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { dragAndDrop, addComponentsToCanvas, getTransformer } from '../helpers'; | ||
|
||
test('Should perform multiple selection when dragging and dropping over multiple components in the canvas', async ({ | ||
page, | ||
}) => { | ||
await page.goto(''); | ||
|
||
//Drag and drop component to canvas | ||
const componentsAtCanvas = ['Input', 'Input', 'Icon', 'Label']; | ||
await addComponentsToCanvas(page, componentsAtCanvas); | ||
|
||
//Click Away | ||
await page.mouse.click(800, 130); | ||
|
||
//Perform items selection by drag and drop | ||
await dragAndDrop(page, { x: 260, y: 130 }, { x: 1000, y: 550 }); | ||
|
||
//Assert | ||
const selectedItems = await getTransformer(page); | ||
expect(selectedItems._nodes.length).toEqual(3); | ||
}); |