mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 17:52:45 +08:00
FIX: correctly display label (#31282)
A regression introduced in 32c8aa0aad880bcab372ffd75bce3c857060d721 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…
x
Reference in New Issue
Block a user