mirror of
https://github.com/google/blockly.git
synced 2025-12-16 06:10:12 +01:00
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.
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
import * as chai from 'chai';
|
import * as chai from 'chai';
|
||||||
import {Key} from 'webdriverio';
|
import {Key} from 'webdriverio';
|
||||||
import {
|
import {
|
||||||
dragBlockTypeFromFlyout,
|
getBlockTypeFromCategory,
|
||||||
getCategory,
|
getCategory,
|
||||||
PAUSE_TIME,
|
PAUSE_TIME,
|
||||||
screenDirection,
|
screenDirection,
|
||||||
@@ -148,7 +148,12 @@ async function openCategories(browser, categoryList, directionMultiplier) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const blockType = await getNthBlockType(browser, categoryName, i);
|
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);
|
await browser.pause(PAUSE_TIME);
|
||||||
// Should be one top level block on the workspace.
|
// Should be one top level block on the workspace.
|
||||||
const topBlockCount = await browser.execute(() => {
|
const topBlockCount = await browser.execute(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user