mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
Re-enable undo/redo tests now that focus is working
This commit is contained in:
@@ -8,6 +8,7 @@ import * as chai from 'chai';
|
||||
import {Key} from 'webdriverio';
|
||||
import {
|
||||
clickBlock,
|
||||
clickWorkspace,
|
||||
contextMenuSelect,
|
||||
getAllBlocks,
|
||||
getBlockElementById,
|
||||
@@ -176,8 +177,7 @@ suite('Delete blocks', function (done) {
|
||||
);
|
||||
});
|
||||
|
||||
// TODO(#9029) enable this test once deleting a block doesn't lose focus
|
||||
test.skip('Undo block deletion', async function () {
|
||||
test('Undo block deletion', async function () {
|
||||
const before = (await getAllBlocks(this.browser)).length;
|
||||
// Get first print block, click to select it, and delete it using backspace key.
|
||||
await clickBlock(this.browser, this.firstBlock.id, {button: 1});
|
||||
@@ -194,8 +194,7 @@ suite('Delete blocks', function (done) {
|
||||
);
|
||||
});
|
||||
|
||||
// TODO(#9029) enable this test once deleting a block doesn't lose focus
|
||||
test.skip('Redo block deletion', async function () {
|
||||
test('Redo block deletion', async function () {
|
||||
const before = (await getAllBlocks(this.browser)).length;
|
||||
// Get first print block, click to select it, and delete it using backspace key.
|
||||
await clickBlock(this.browser, this.firstBlock.id, {button: 1});
|
||||
@@ -205,6 +204,7 @@ suite('Delete blocks', function (done) {
|
||||
await this.browser.keys([Key.Ctrl, 'z']);
|
||||
await this.browser.pause(PAUSE_TIME);
|
||||
// Redo
|
||||
await clickWorkspace(this.browser);
|
||||
await this.browser.keys([Key.Ctrl, Key.Shift, 'z']);
|
||||
await this.browser.pause(PAUSE_TIME);
|
||||
const after = (await getAllBlocks(this.browser)).length;
|
||||
|
||||
@@ -40,8 +40,7 @@ suite('This tests loading Large Configuration and Deletion', function (done) {
|
||||
chai.assert.equal(allBlocks.length, 10);
|
||||
});
|
||||
|
||||
// TODO(#8793) Re-enable test after deleting a block updates focus correctly.
|
||||
test.skip('undoing delete block results in the correct number of blocks', async function () {
|
||||
test('undoing delete block results in the correct number of blocks', async function () {
|
||||
await this.browser.keys([Key.Ctrl, 'z']);
|
||||
await this.browser.pause(PAUSE_TIME);
|
||||
const allBlocks = await getAllBlocks(this.browser);
|
||||
|
||||
Reference in New Issue
Block a user