mirror of
https://github.com/discourse/discourse.git
synced 2025-01-01 16:23:45 +08:00
DEV: correctly applies identifier do DModal used in DMenu (#30370)
A previous refactor used an incorrect path. This commit also adds a simple test to ensure this identifier is present.
This commit is contained in:
parent
0a9ebbe1dd
commit
bce0018163
|
@ -47,11 +47,11 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
|
|||
this.site.mobileView = true;
|
||||
|
||||
await render(
|
||||
hbs`<DMenu @inline={{true}} @modalForMobile={{true}} @content="content" />`
|
||||
hbs`<DMenu @identifier="foo" @inline={{true}} @modalForMobile={{true}} @content="content" />`
|
||||
);
|
||||
await open();
|
||||
|
||||
assert.dom(".fk-d-menu-modal").hasText("content");
|
||||
assert.dom(".fk-d-menu-modal[data-identifier='foo']").hasText("content");
|
||||
});
|
||||
|
||||
test("@onRegisterApi", async function (assert) {
|
||||
|
|
|
@ -119,7 +119,7 @@ export default class DMenu extends Component {
|
|||
@class
|
||||
}}
|
||||
@inline={{(isTesting)}}
|
||||
data-identifier={{@instance.options.identifier}}
|
||||
data-identifier={{this.options.identifier}}
|
||||
data-content
|
||||
>
|
||||
<div class="fk-d-menu-modal__grip" aria-hidden="true"></div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user