DEV: use isFocused dom helper (#30533)

This commit is contained in:
Joffrey JAFFEUX 2025-01-02 15:02:20 +01:00 committed by GitHub
parent a21eefd142
commit 35f8b1d5d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();
});
});