diff --git a/app/assets/javascripts/discourse/tests/integration/components/float-kit/d-menu-test.js b/app/assets/javascripts/discourse/tests/integration/components/float-kit/d-menu-test.js index dc9be4dd8e8..c1aba983fd1 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/float-kit/d-menu-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/float-kit/d-menu-test.js @@ -366,10 +366,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) { await triggerKeyEvent(document.activeElement, "keydown", "Tab"); await triggerKeyEvent(document.activeElement, "keydown", "Enter"); - assert.strictEqual( - document.activeElement, - document.querySelector(".fk-d-menu__trigger") - ); + assert.dom(".fk-d-menu__trigger").isFocused(); }); test("focusTrigger=false on close", async function (assert) { @@ -387,6 +384,6 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) { await triggerKeyEvent(document.activeElement, "keydown", "Tab"); await triggerKeyEvent(document.activeElement, "keydown", "Enter"); - assert.strictEqual(document.activeElement, document.body); + assert.dom(document.body).isFocused(); }); });