From d0e383b73d96480c97b7dd52f9b1eaabc1d00624 Mon Sep 17 00:00:00 2001 From: Maribeth Moffatt Date: Mon, 28 Jul 2025 12:53:30 -0700 Subject: [PATCH] chore: update clipboard tests to not use stable ids --- test/webdriverio/test/clipboard_test.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/webdriverio/test/clipboard_test.ts b/test/webdriverio/test/clipboard_test.ts index 062f8ad1..b9e9f42e 100644 --- a/test/webdriverio/test/clipboard_test.ts +++ b/test/webdriverio/test/clipboard_test.ts @@ -17,6 +17,7 @@ import { focusOnBlock, focusOnBlockField, blockIsPresent, + getFocusedBlockType, } from './test_setup.js'; import {Key, KeyAction, PointerAction, WheelAction} from 'webdriverio'; @@ -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 () {