Skip to content

Commit

Permalink
fix(tests): Make first basic block test agree with test plan
Browse files Browse the repository at this point in the history
The test plan specified to use a block from the Basic Blocks
category of the test blocks.

PR google#7324 changed the test in a way that violated the plan,
albeit in aid of a good cause: the basic blocks category had
become unusable due to a bug in the test blocks combined with
better error checking (in PR google#7289).

Since the test blocks were fixed by google/blockly-samples#1774
(and the fix published and Blockly updated by PR google#7313) this
violation can be corrected.
  • Loading branch information
cpcallen committed Aug 2, 2023
1 parent f3899e2 commit 6f7297f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/browser/test/basic_block_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const {
testSetup,
testFileLocations,
getAllBlocks,
dragNthBlockFromFlyout,
dragBlockTypeFromFlyout,
} = require('./test_setup');
const {Key} = require('webdriverio');

Expand All @@ -32,7 +32,13 @@ suite('Basic block tests', function (done) {

test('Drag three blocks into the workspace', async function () {
for (let i = 1; i <= 3; i++) {
await dragNthBlockFromFlyout(this.browser, 'Align', 0, 250, 50 * i);
await dragBlockTypeFromFlyout(
this.browser,
'Basic',
'test_basic_empty',
250,
50 * i
);
chai.assert.equal((await getAllBlocks(this.browser)).length, i);
}
});
Expand Down

0 comments on commit 6f7297f

Please sign in to comment.