Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
8101a16
fix: Fix failing NPM build.
BenHenning Nov 20, 2025
b85a4b1
chore: Disable workflows for investigation.
BenHenning Nov 20, 2025
8859f98
chore: Debug & disable test for investigation.
BenHenning Nov 20, 2025
ae9ee30
chore: More investigation work.
BenHenning Nov 20, 2025
27785c6
chore: Clean up test & re-enable all.
BenHenning Nov 20, 2025
d5497fe
chore: Try upgrading WebdriverIO.
BenHenning Nov 20, 2025
3d7c478
Merge branch 'main' into update-npm-lock-file
BenHenning Nov 21, 2025
75d0c73
Merge branch 'update-npm-lock-file' into attempt-to-fix-mac-tests
BenHenning Nov 21, 2025
8d56eba
chore: Re-isolate scroll test.
BenHenning Nov 21, 2025
af1dbaa
chore: Add more debug logs.
BenHenning Nov 21, 2025
2e210fe
chore: Run tests up to 50 times.
BenHenning Nov 21, 2025
2187b2c
chore: Speed & reduce tests for CI investigating.
BenHenning Nov 21, 2025
dabaad5
chore: Fix path changing.
BenHenning Nov 21, 2025
4b97659
chore: Remove debug logs to test theory.
BenHenning Nov 21, 2025
cefb286
chore: Try to remove more logs.
BenHenning Nov 21, 2025
28a32f4
chore: Try adding a pause.
BenHenning Nov 21, 2025
059092f
chore: Add comment & enable most tests.
BenHenning Nov 21, 2025
531979e
chore: Re-add removed comment.
BenHenning Nov 21, 2025
efecfd9
chore: Re-add logs for investigation.
BenHenning Nov 21, 2025
1e96c0a
chore: Undo accidental test isolation.
BenHenning Nov 21, 2025
7c607d1
chore: More logs.
BenHenning Nov 21, 2025
385b562
chore: Undo pause.
BenHenning Nov 21, 2025
bfe5ea6
chore: Re-enable most tests.
BenHenning Nov 21, 2025
7e2035e
chore: More logs.
BenHenning Nov 21, 2025
c82a486
chore: More logs.
BenHenning Nov 21, 2025
4fb876c
chore: More logs.
BenHenning Nov 21, 2025
75a8bc8
chore: Use correct parent.
BenHenning Nov 21, 2025
4b4c842
chore: Try to 'jiggle' block.
BenHenning Nov 21, 2025
2cc7478
chore: Try using pause time.
BenHenning Nov 21, 2025
27b375f
feat: Record & upload test failures in CI.
BenHenning Nov 21, 2025
ffed2d1
chore: Remove pause timeout.
BenHenning Nov 21, 2025
b0ef7f9
chore: Hopefully fix screenshots in CI.
BenHenning Nov 21, 2025
c757c64
chore: Add missing 'cd'.
BenHenning Nov 21, 2025
cb6f91f
chore: Fix artifact path.
BenHenning Nov 21, 2025
d44fec2
chore: Add position log.
BenHenning Dec 1, 2025
a8845c8
chore: Attempt to disable BiDi again.
BenHenning Dec 1, 2025
e850385
chore: Fix syntax error.
BenHenning Dec 1, 2025
f8039b4
chore: More logs on relative position.
BenHenning Dec 1, 2025
1d3b366
chore: Fix test.
BenHenning Dec 1, 2025
ed9d2db
chore: Add more to log.
BenHenning Dec 1, 2025
f504532
chore: Try adding a long pause.
BenHenning Dec 1, 2025
6ee17d7
chore: Add another log statement.
BenHenning Dec 1, 2025
7023e09
chore: Fix log output.
BenHenning Dec 1, 2025
bba3633
chore: Add additional screenshot.
BenHenning Dec 1, 2025
d731e9e
Merge branch 'main' into attempt-to-fix-mac-tests
BenHenning Dec 1, 2025
5c505a1
chore: Restore PAUSE_TIME.
BenHenning Dec 1, 2025
cc40d71
chore: Attempt at synchronizing.
BenHenning Dec 2, 2025
14a2a3c
chore: Attempt to pretend to be JavaFX.
BenHenning Dec 2, 2025
c7a5087
chore: Attempt to use --headless=new.
BenHenning Dec 2, 2025
3542de5
chore: Restore headless, and add force rendering.
BenHenning Dec 3, 2025
11080fd
chore: Use idle() more broadly.
BenHenning Dec 3, 2025
e0a0594
chore: Some more controls for better inspection.
BenHenning Dec 3, 2025
db03a10
chore: Speed up test & force rendering.
BenHenning Dec 5, 2025
04325d1
fix: Use correct branch after rename.
BenHenning Dec 5, 2025
3b6c99e
chore: Re-enable non-scroll tests.
BenHenning Dec 5, 2025
d5fcc1d
chore: Re-enable tests & some cleanups.
BenHenning Dec 5, 2025
661b4fe
chore: Undo all package lock changes.
BenHenning Dec 5, 2025
587ddbf
chore: Undo lots of logs.
BenHenning Dec 5, 2025
4b4dd48
fix: Fix failing tests by adding config support.
BenHenning Dec 5, 2025
5bf1ac7
chore: Re-enable move tests.
BenHenning Dec 5, 2025
52b7aed
chore: Try to isolate failing test.
BenHenning Dec 5, 2025
9986e9c
chore: Run all move tests.
BenHenning Dec 5, 2025
efb5b7d
chore: Re-enable previous tests to move.
BenHenning Dec 5, 2025
8499089
chore: Skip some of the earlier suites.
BenHenning Dec 5, 2025
3a26ac5
chore: Re-disable more suites.
BenHenning Dec 5, 2025
4d2a86e
chore: Re-enable one suite.
BenHenning Dec 5, 2025
2750f66
chore: Try re-disabling other suites.
BenHenning Dec 5, 2025
c8e3728
chore: Try re-disabling big suite.
BenHenning Dec 5, 2025
eceb74f
chore: Isolate to just 2 suites.
BenHenning Dec 5, 2025
adc0c98
chore: Drop inner suite.
BenHenning Dec 5, 2025
f015528
chore: Disable first 8 & re-add sub-suite.
BenHenning Dec 5, 2025
a213520
chore: Skip remaining tests.
BenHenning Dec 5, 2025
cf3b5c4
chore: Disable immediate previous test.
BenHenning Dec 5, 2025
c8743df
chore: Swap disabled tests.
BenHenning Dec 5, 2025
0895aaf
chore: Try disabling alert dialog assertion.
BenHenning Dec 5, 2025
e561389
chore: Don't open alert dialog.
BenHenning Dec 5, 2025
df7324a
chore: Re-open alert. Reduce previous test.
BenHenning Dec 5, 2025
f7e7479
chore: Try reducing failing test.
BenHenning Dec 5, 2025
caf02c8
chore: Attempt WDIO upgrade.
BenHenning Dec 5, 2025
ff5ba58
Revert "chore: Attempt WDIO upgrade."
BenHenning Dec 5, 2025
339667e
chore: Add cross-suite session reloading in CI.
BenHenning Dec 5, 2025
69896a2
chore: Re-enable all suites and tests.
BenHenning Dec 5, 2025
1122f65
chore: Re-enable Ubuntu tests in CI.
BenHenning Dec 5, 2025
e407c73
chore: Increase timeouts.
BenHenning Dec 5, 2025
1411d90
chore: Run tests 50 times in CI.
BenHenning Dec 5, 2025
65e6c02
fix: Make mkdir resilient for multiple runs.
BenHenning Dec 5, 2025
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
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
build_tip_of_tree_v12:
name: Build test (against tip-of-tree core develop)
runs-on: ubuntu-latest
if: false
steps:
- name: Checkout experimentation plugin
uses: actions/checkout@v4
Expand Down Expand Up @@ -59,8 +60,7 @@ jobs:

build:
name: Build test (against pinned v12)
# Don't run pinned version checks for PRs.
if: ${{ !github.base_ref }}
if: false
runs-on: ubuntu-latest
steps:
- name: Checkout experimentation plugin
Expand All @@ -81,6 +81,7 @@ jobs:
name: Eslint check
timeout-minutes: 5
runs-on: ubuntu-latest
if: false
steps:
- uses: actions/checkout@v4

Expand All @@ -99,6 +100,7 @@ jobs:
name: Prettier check
timeout-minutes: 5
runs-on: ubuntu-latest
if: false
steps:
- uses: actions/checkout@v4

Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
jobs:
webdriverio_tests_tip_of_tree_v12:
name: WebdriverIO tests (against tip-of-tree core develop)
timeout-minutes: 10
# timeout-minutes: 10
runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -33,7 +33,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: 'google/blockly'
ref: 'develop'
ref: 'main'
path: core-blockly

- name: Use Node.js 20.x
Expand All @@ -60,15 +60,30 @@ jobs:
npm link blockly
cd ..

- name: Run tests
- name: Build tests
run: |
cd main
npm run wdio:clean

- name: Run tests (up to 50 times)
run: |
cd main
npm run test:ci
for i in $(seq 1 50);
do
echo "Attempt $i"
npm run wdio:run:ci
done

- name: Upload test failure screenshots
if: always()
uses: actions/upload-artifact@v5
with:
name: test-failure-screenshots
path: main/test/webdriverio/test/failures

webdriverio_tests:
name: WebdriverIO tests (against pinned v12)
# Don't run pinned version checks for PRs.
if: ${{ !github.base_ref }}
if: false
timeout-minutes: 10
runs-on: ${{ matrix.os }}

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
"prepublishOnly": "npm login --registry https://wombat-dressing-room.appspot.com",
"start": "blockly-scripts start",
"test": "npm run test:mocha && npm run test:wdio",
"test:ci": "npm run test:mocha && npm run test:wdio:ci",
"test:ci": "npm run test:wdio:ci",
"test:mocha": "blockly-scripts test",
"test:wdio": "npm run wdio:clean && npm run wdio:run",
"test:wdio:ci": "npm run wdio:clean && npm run wdio:run:ci",
"wdio:build": "npm run wdio:build:app && npm run wdio:build:tests",
"wdio:build:app": "cd test/webdriverio && webpack",
"wdio:build:tests": "tsc -p ./test/webdriverio/test/tsconfig.json",
"wdio:clean": "cd test/webdriverio/test && rm -rf dist",
"wdio:run": "npm run wdio:build && cd test/webdriverio/test && npx mocha dist",
"wdio:run:ci": "npm run wdio:build && cd test/webdriverio/test && npx mocha --timeout 30000 dist"
"wdio:clean": "cd test/webdriverio/test && rm -rf dist && rm -rf failures",
"wdio:run": "npm run wdio:build && cd test/webdriverio/test && mkdir -p failures && npx mocha dist",
"wdio:run:ci": "npm run wdio:build && cd test/webdriverio/test && mkdir -p failures && npx mocha --timeout 30000 dist"
},
"main": "./dist/index.js",
"module": "./src/index.js",
Expand Down
26 changes: 16 additions & 10 deletions test/webdriverio/test/actions_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import {
sendKeyAndWait,
keyRight,
contextMenuItems,
checkForFailures,
idle,
} from './test_setup.js';

const isDarwin = process.platform === 'darwin';
Expand Down Expand Up @@ -96,13 +98,17 @@ suite('Menus test', function () {
testFileLocations.MORE_BLOCKS,
this.timeout(),
);
await this.browser.pause(PAUSE_TIME);
await idle(this.browser);
});

teardown(async function() {
await checkForFailures(this.browser, this.currentTest!.title, this.currentTest?.state);
});

test('Menu action via keyboard on block opens menu', async function () {
// Navigate to draw_circle_1.
await focusOnBlock(this.browser, 'draw_circle_1');
await this.browser.pause(PAUSE_TIME);
await idle(this.browser);
await sendKeyAndWait(this.browser, [Key.Ctrl, Key.Return]);

chai.assert.deepEqual(
Expand All @@ -126,7 +132,7 @@ suite('Menus test', function () {
await focusOnBlock(this.browser, 'text_print_1');
await this.browser.keys(Key.ArrowRight);
await this.browser.keys([Key.Ctrl, Key.Return]);
await this.browser.pause(PAUSE_TIME);
await idle(this.browser);

chai.assert.deepEqual(
await contextMenuItems(this.browser),
Expand Down Expand Up @@ -154,9 +160,9 @@ suite('Menus test', function () {
await moveToToolboxCategory(this.browser, 'Math');
// Move to flyout.
await keyRight(this.browser);
await this.browser.pause(PAUSE_TIME);
await idle(this.browser);
await rightClickOnFlyoutBlockType(this.browser, 'math_number');
await this.browser.pause(PAUSE_TIME);
await idle(this.browser);

chai.assert.deepEqual(
await contextMenuItems(this.browser),
Expand Down Expand Up @@ -192,11 +198,11 @@ suite('Menus test', function () {
test('Escape key dismisses menu', async function () {
await tabNavigateToWorkspace(this.browser);
await focusOnBlock(this.browser, 'draw_circle_1');
await this.browser.pause(PAUSE_TIME);
await idle(this.browser);
await this.browser.keys([Key.Ctrl, Key.Return]);
await this.browser.pause(PAUSE_TIME);
await idle(this.browser);
await this.browser.keys(Key.Escape);
await this.browser.pause(PAUSE_TIME);
await idle(this.browser);

chai.assert.isTrue(
await contextMenuExists(this.browser, 'Duplicate', /* reverse= */ true),
Expand All @@ -207,9 +213,9 @@ suite('Menus test', function () {
test('Clicking workspace dismisses menu', async function () {
await tabNavigateToWorkspace(this.browser);
await clickBlock(this.browser, 'draw_circle_1', {button: 'right'});
await this.browser.pause(PAUSE_TIME);
await idle(this.browser);
await focusWorkspace(this.browser);
await this.browser.pause(PAUSE_TIME);
await idle(this.browser);

chai.assert.isTrue(
await contextMenuExists(this.browser, 'Duplicate', /* reverse= */ true),
Expand Down
Loading
Loading