FIX: Title for keyboard shortcuts button in sidebar (#17638)

This commit is contained in:
Alan Guo Xiang Tan 2022-07-25 15:47:39 +08:00 committed by GitHub
parent 07424b9bb6
commit 1dff3ad79d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -15,7 +15,7 @@
<div class="sidebar-footer-actions">
<DButton
@action={{route-action "showKeyboardShortcutsHelp"}}
@title={{i18n "keyboard_shortcuts_help.title"}}
@title="keyboard_shortcuts_help.title"
@icon="keyboard"
@class="sidebar-footer-actions-button sidebar-footer-actions-keyboard-shortcuts" />

View File

@ -1,3 +1,5 @@
import I18n from "I18n";
import { test } from "qunit";
import { click, currentRouteName, visit } from "@ember/test-helpers";
import {
@ -48,7 +50,11 @@ acceptance("Sidebar - User with sidebar enabled", function (needs) {
test("viewing keyboard shortcuts using sidebar", async function (assert) {
await visit("/");
await click(".sidebar-footer-actions-keyboard-shortcuts");
await click(
`.sidebar-footer-actions-keyboard-shortcuts[title="${I18n.t(
"keyboard_shortcuts_help.title"
)}"]`
);
assert.ok(
exists("#keyboard-shortcuts-help"),