Skip to content

Commit 2c6c2e1

Browse files
committed
fix: Fix toolbox categories tests (Almost)
This fixes the the toolbox categories tests except for dragging out the four empty statement blocks, which is fixed by RaspberryPiFoundation/blockly-samples#2580 Once the latest version of samples is published the toolbox suite can be re-enabled.
1 parent 60b7ee1 commit 2c6c2e1

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tests/browser/test/toolbox_drag_test.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import * as chai from 'chai';
1212
import {Key} from 'webdriverio';
1313
import {
14-
dragBlockTypeFromFlyout,
14+
getBlockTypeFromCategory,
1515
getCategory,
1616
PAUSE_TIME,
1717
screenDirection,
@@ -148,7 +148,12 @@ async function openCategories(browser, categoryList, directionMultiplier) {
148148
continue;
149149
}
150150
const blockType = await getNthBlockType(browser, categoryName, i);
151-
dragBlockTypeFromFlyout(browser, categoryName, blockType, 50, 20);
151+
const blockElem = await getBlockTypeFromCategory(
152+
browser,
153+
categoryName,
154+
blockType,
155+
);
156+
await blockElem.dragAndDrop({x: 50 * directionMultiplier, y: 20});
152157
await browser.pause(PAUSE_TIME);
153158
// Should be one top level block on the workspace.
154159
const topBlockCount = await browser.execute(() => {

0 commit comments

Comments
 (0)