mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 03:42:41 +08:00
DEV: use isFocused dom helper (#30533)
This commit is contained in:
parent
a21eefd142
commit
35f8b1d5d3
|
@ -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();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user