Skip to content

Commit 7e47bf4

Browse files
authored
Merge pull request #9238 from RoboErikG/toolbox-categories-tests
fix: Fix toolbox categories tests
2 parents c1c7ddb + 55bd1af commit 7e47bf4

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

tests/browser/test/toolbox_drag_test.mjs

Lines changed: 10 additions & 5 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(() => {
@@ -174,9 +179,9 @@ async function openCategories(browser, categoryList, directionMultiplier) {
174179
chai.assert.equal(failureCount, 0);
175180
}
176181

177-
// TODO (#9217) These take too long to run and are very flakey. Need to find a
178-
// better way to test whatever this is trying to test.
179-
suite.skip('Open toolbox categories', function () {
182+
// TODO (#9217) These take too long to run and are very flakey. Need to pull
183+
// these out into their own test runner.
184+
suite('Open toolbox categories', function () {
180185
this.timeout(0);
181186

182187
test('opening every toolbox category in the category toolbox in LTR', async function () {

0 commit comments

Comments
 (0)