Skip to content
Merged
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
9 changes: 4 additions & 5 deletions test/webdriverio/test/clipboard_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
focusOnBlock,
focusOnBlockField,
blockIsPresent,
getFocusedBlockType,
} from './test_setup.js';
import {Key, KeyAction, PointerAction, WheelAction} from 'webdriverio';

Expand Down Expand Up @@ -61,14 +62,12 @@ suite('Clipboard test', function () {
await this.browser.keys([Key.Ctrl, 'x']);
await block.waitForExist({reverse: true});
await this.browser.keys([Key.Ctrl, 'v']);
await block.waitForExist();
await this.browser.pause(PAUSE_TIME);

const blocks = await getSameBlocks(this.browser, block);
const selectedId = await getSelectedBlockId(this.browser);
const focusedType = await getFocusedBlockType(this.browser);

chai.assert.equal(await blocks.length, 1);
chai.assert.equal(selectedId, await blocks[0].getAttribute('data-id'));
// Pasted block should be focused.
chai.assert.equal(focusedType, 'simple_circle');
});

test('Copy and paste whilst dragging block', async function () {
Expand Down
Loading