mirror of
https://github.com/google/blockly.git
synced 2026-01-06 08:30:13 +01:00
Merge pull request #9238 from RoboErikG/toolbox-categories-tests
fix: Fix toolbox categories tests
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(() => {
|
||||||
@@ -174,9 +179,9 @@ async function openCategories(browser, categoryList, directionMultiplier) {
|
|||||||
chai.assert.equal(failureCount, 0);
|
chai.assert.equal(failureCount, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO (#9217) These take too long to run and are very flakey. Need to find a
|
// TODO (#9217) These take too long to run and are very flakey. Need to pull
|
||||||
// better way to test whatever this is trying to test.
|
// these out into their own test runner.
|
||||||
suite.skip('Open toolbox categories', function () {
|
suite('Open toolbox categories', function () {
|
||||||
this.timeout(0);
|
this.timeout(0);
|
||||||
|
|
||||||
test('opening every toolbox category in the category toolbox in LTR', async function () {
|
test('opening every toolbox category in the category toolbox in LTR', async function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user