diff --git a/app/assets/javascripts/discourse/tests/integration/components/float-kit/d-menu-test.js b/app/assets/javascripts/discourse/tests/integration/components/float-kit/d-menu-test.js
index 685adc00ba4..7fdc9c2e7d1 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/float-kit/d-menu-test.js
+++ b/app/assets/javascripts/discourse/tests/integration/components/float-kit/d-menu-test.js
@@ -47,11 +47,11 @@ module("Integration | Component | FloatKit | d-menu", function (hooks) {
this.site.mobileView = true;
await render(
- hbs``
+ hbs``
);
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) {
diff --git a/app/assets/javascripts/float-kit/addon/components/d-menu.gjs b/app/assets/javascripts/float-kit/addon/components/d-menu.gjs
index 15572940e71..77861063115 100644
--- a/app/assets/javascripts/float-kit/addon/components/d-menu.gjs
+++ b/app/assets/javascripts/float-kit/addon/components/d-menu.gjs
@@ -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
>