Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/toolboxCategories.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default {
{
type: 'controls_if',
kind: 'block',
id: 'if_block',
},
{
type: 'logic_compare',
Expand Down Expand Up @@ -374,6 +375,7 @@ export default {
fields: {
TEXT: '',
},
id: 'text_block',
},
{
type: 'text_join',
Expand All @@ -382,6 +384,7 @@ export default {
{
type: 'text_append',
kind: 'block',
id: 'append_text_block',
fields: {
name: 'item',
},
Expand Down
1 change: 1 addition & 0 deletions test/webdriverio/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@

<body>
<div id="root">
<div id="focusableDiv" tabindex="0">Simple div to focus.</div>
<div id="blocklyDiv"></div>
<div id="shortcuts"></div>
</div>
Expand Down
11 changes: 6 additions & 5 deletions test/webdriverio/test/actions_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ import {
contextMenuExists,
moveToToolboxCategory,
PAUSE_TIME,
setCurrentCursorNodeById,
focusOnBlock,
tabNavigateToWorkspace,
testFileLocations,
testSetup,
keyRight,
} from './test_setup.js';

suite('Menus test', function () {
Expand All @@ -29,7 +30,7 @@ suite('Menus test', function () {
test('Menu action opens menu', async function () {
// Navigate to draw_circle_1.
await tabNavigateToWorkspace(this.browser);
await setCurrentCursorNodeById(this.browser, 'draw_circle_1');
await focusOnBlock(this.browser, 'draw_circle_1');
await this.browser.pause(PAUSE_TIME);
await this.browser.keys([Key.Ctrl, Key.Return]);
await this.browser.pause(PAUSE_TIME);
Expand All @@ -42,11 +43,11 @@ suite('Menus test', function () {
test('Menu action returns true in the toolbox', async function () {
// Navigate to draw_circle_1.
await tabNavigateToWorkspace(this.browser);
await setCurrentCursorNodeById(this.browser, 'draw_circle_1');
await focusOnBlock(this.browser, 'draw_circle_1');
// Navigate to a toolbox category
await moveToToolboxCategory(this.browser, 'Functions');
// Move to flyout.
await this.browser.keys(Key.ArrowRight);
await keyRight(this.browser);
await this.browser.keys([Key.Ctrl, Key.Return]);
await this.browser.pause(PAUSE_TIME);

Expand All @@ -59,7 +60,7 @@ suite('Menus test', function () {
test('Menu action returns false during drag', async function () {
// Navigate to draw_circle_1.
await tabNavigateToWorkspace(this.browser);
await setCurrentCursorNodeById(this.browser, 'draw_circle_1');
await focusOnBlock(this.browser, 'draw_circle_1');
// Start moving the block
await this.browser.keys('m');
await this.browser.keys([Key.Ctrl, Key.Return]);
Expand Down
Loading
Loading