Skip to content

Commit

Permalink
fix flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
karanh37 committed Sep 29, 2024
1 parent 1b9910c commit a9023f6
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,8 @@ export const dragAndDropNode = async (
originSelector: string,
destinationSelector: string
) => {
const originElement = await page.waitForSelector(originSelector, {
state: 'attached',
});
const destinationElement = await page.waitForSelector(destinationSelector, {
state: 'attached',
});

await originElement.hover();
const destinationElement = await page.waitForSelector(destinationSelector);
await page.hover(originSelector);
await page.mouse.down();
const box = (await destinationElement.boundingBox())!;
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
Expand Down

0 comments on commit a9023f6

Please sign in to comment.