mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 15:14:16 +08:00
FEATURE: allow plugins to specify keyboard shortcuts for hidden toolbar items (#28456)
Previous to this change there is no clean way to apply keyboard shortcuts to things such as "add poll" and other hidden options in the toolbar This allows shortcuts to be specified similar to how they are on the toolbar Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
@ -13,7 +13,6 @@ import {
|
||||
query,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
acceptance("Discourse Presence Plugin", function (needs) {
|
||||
needs.user({ whisperer: true });
|
||||
@ -83,7 +82,7 @@ acceptance("Discourse Presence Plugin", function (needs) {
|
||||
|
||||
const menu = selectKit(".toolbar-popup-menu-options");
|
||||
await menu.expand();
|
||||
await menu.selectRowByName(I18n.t("composer.toggle_whisper"));
|
||||
await menu.selectRowByName("toggle-whisper");
|
||||
|
||||
assert.strictEqual(
|
||||
count(".composer-actions svg.d-icon-far-eye-slash"),
|
||||
|
Reference in New Issue
Block a user