mirror of
https://github.com/discourse/discourse.git
synced 2025-01-04 11:44:22 +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;
|
this.site.mobileView = true;
|
||||||
|
|
||||||
await render(
|
await render(
|
||||||
hbs`<DMenu @inline={{true}} @modalForMobile={{true}} @content="content" />`
|
hbs`<DMenu @identifier="foo" @inline={{true}} @modalForMobile={{true}} @content="content" />`
|
||||||
);
|
);
|
||||||
await open();
|
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) {
|
test("@onRegisterApi", async function (assert) {
|
||||||
|
|
|
@ -119,7 +119,7 @@ export default class DMenu extends Component {
|
||||||
@class
|
@class
|
||||||
}}
|
}}
|
||||||
@inline={{(isTesting)}}
|
@inline={{(isTesting)}}
|
||||||
data-identifier={{@instance.options.identifier}}
|
data-identifier={{this.options.identifier}}
|
||||||
data-content
|
data-content
|
||||||
>
|
>
|
||||||
<div class="fk-d-menu-modal__grip" aria-hidden="true"></div>
|
<div class="fk-d-menu-modal__grip" aria-hidden="true"></div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user