From 2c6c2e1a9d3addd72c5c5cc697f7bd246d6cee1e Mon Sep 17 00:00:00 2001 From: Erik Pasternak Date: Fri, 11 Jul 2025 13:50:22 -0700 Subject: [PATCH] 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 https://github.com/google/blockly-samples/pull/2580 Once the latest version of samples is published the toolbox suite can be re-enabled. --- tests/browser/test/toolbox_drag_test.mjs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/browser/test/toolbox_drag_test.mjs b/tests/browser/test/toolbox_drag_test.mjs index 32c201406..d2a7ecce1 100644 --- a/tests/browser/test/toolbox_drag_test.mjs +++ b/tests/browser/test/toolbox_drag_test.mjs @@ -11,7 +11,7 @@ import * as chai from 'chai'; import {Key} from 'webdriverio'; import { - dragBlockTypeFromFlyout, + getBlockTypeFromCategory, getCategory, PAUSE_TIME, screenDirection, @@ -148,7 +148,12 @@ async function openCategories(browser, categoryList, directionMultiplier) { continue; } const blockType = await getNthBlockType(browser, categoryName, i); - dragBlockTypeFromFlyout(browser, categoryName, blockType, 50, 20); + const blockElem = await getBlockTypeFromCategory( + browser, + categoryName, + blockType, + ); + await blockElem.dragAndDrop({x: 50 * directionMultiplier, y: 20}); await browser.pause(PAUSE_TIME); // Should be one top level block on the workspace. const topBlockCount = await browser.execute(() => {