From 5605c0a0849d0fc176fb08f38ee82f17bf6f5741 Mon Sep 17 00:00:00 2001 From: Alberto Fernandez-Capel Date: Thu, 22 Sep 2022 09:45:18 +0100 Subject: [PATCH] Add some more delay To avoid flaky tests in CI. --- src/test/system/custom_element_test.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/test/system/custom_element_test.js b/src/test/system/custom_element_test.js index 1b379a64f..5a522f645 100644 --- a/src/test/system/custom_element_test.js +++ b/src/test/system/custom_element_test.js @@ -345,27 +345,24 @@ testGroup("Custom element API", { template: "editor_empty" }, () => { element.addEventListener("trix-blur", () => blurEventCount++) triggerEvent(element, "blur") - await nextFrame() + await delay(10) assert.equal(blurEventCount, 1) assert.equal(focusEventCount, 0) triggerEvent(element, "focus") - - await nextFrame() + await delay(10) assert.equal(blurEventCount, 1) assert.equal(focusEventCount, 1) insertImageAttachment() - await delay(20) await clickElement(element.querySelector("figure")) const textarea = element.querySelector("textarea") textarea.focus() - await nextFrame() assert.equal(document.activeElement, textarea)