Skip to content

Commit d0e383b

Browse files
committed
chore: update clipboard tests to not use stable ids
1 parent 8557b41 commit d0e383b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/webdriverio/test/clipboard_test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
focusOnBlock,
1818
focusOnBlockField,
1919
blockIsPresent,
20+
getFocusedBlockType,
2021
} from './test_setup.js';
2122
import {Key, KeyAction, PointerAction, WheelAction} from 'webdriverio';
2223

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

67-
const blocks = await getSameBlocks(this.browser, block);
68-
const selectedId = await getSelectedBlockId(this.browser);
67+
const focusedType = await getFocusedBlockType(this.browser);
6968

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

7473
test('Copy and paste whilst dragging block', async function () {

0 commit comments

Comments
 (0)