mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: correctly display label (#31282)
A regression introduced in 32c8aa0aad
incorrectly passes label to the trigger component, but also passes
translatedLabel instead of label to the menu.
The existing test was checking for the presence of "label", but it was
actually returning true because the test was showing "en.label". The
test has been modified in consequences.
This commit is contained in:
parent
4db3389f3d
commit
24b2e353a4
@ -25,7 +25,7 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
||||
test("@label", async function (assert) {
|
||||
await render(hbs`<DMenu @inline={{true}} @label="label" />`);
|
||||
|
||||
assert.dom(".fk-d-menu__trigger").containsText("label");
|
||||
assert.dom(".fk-d-menu__trigger .d-button-label").hasText(/^label$/);
|
||||
});
|
||||
|
||||
test("@icon", async function (assert) {
|
||||
|
@ -85,11 +85,8 @@ export default class DMenu extends Component {
|
||||
get icon() {
|
||||
return instance.args.icon;
|
||||
},
|
||||
get label() {
|
||||
return instance.args.label;
|
||||
},
|
||||
get translatedLabel() {
|
||||
return instance.args.translatedLabel;
|
||||
return instance.args.label;
|
||||
},
|
||||
get translatedAriaLabel() {
|
||||
return instance.args.ariaLabel;
|
||||
|
Loading…
Reference in New Issue
Block a user