diff --git a/app/assets/javascripts/discourse/app/components/hidden-details.hbs b/app/assets/javascripts/discourse/app/components/hidden-details.hbs deleted file mode 100644 index 2ef594cdedc..00000000000 --- a/app/assets/javascripts/discourse/app/components/hidden-details.hbs +++ /dev/null @@ -1,6 +0,0 @@ -{{#unless this.expanded}} - -{{/unless}} -{{#if this.expanded}} - {{this.details}} -{{/if}} \ No newline at end of file diff --git a/app/assets/javascripts/discourse/app/components/hidden-details.js b/app/assets/javascripts/discourse/app/components/hidden-details.js deleted file mode 100644 index a06ed1ee91c..00000000000 --- a/app/assets/javascripts/discourse/app/components/hidden-details.js +++ /dev/null @@ -1,9 +0,0 @@ -import Component from "@ember/component"; -import { action } from "@ember/object"; - -export default Component.extend({ - @action - expand() { - this.set("expanded", true); - }, -}); diff --git a/app/assets/javascripts/discourse/tests/integration/components/hidden-details-test.js b/app/assets/javascripts/discourse/tests/integration/components/hidden-details-test.js deleted file mode 100644 index ff81361d819..00000000000 --- a/app/assets/javascripts/discourse/tests/integration/components/hidden-details-test.js +++ /dev/null @@ -1,29 +0,0 @@ -import { click, render } from "@ember/test-helpers"; -import { hbs } from "ember-cli-htmlbars"; -import { module, test } from "qunit"; -import { setupRenderingTest } from "discourse/tests/helpers/component-test"; -import { exists, query } from "discourse/tests/helpers/qunit-helpers"; -import I18n from "discourse-i18n"; - -module("Integration | Component | hidden-details", function (hooks) { - setupRenderingTest(hooks); - - test("Shows a link and turns link into details on click", async function (assert) { - this.set("label", "label"); - this.set("details", "details"); - - await render( - hbs`` - ); - - assert.ok(exists(".btn-link")); - assert.strictEqual(query(".btn-link span").innerText, I18n.t("label")); - assert.notOk(exists(".description")); - - await click(".btn-link"); - - assert.notOk(exists(".btn-link")); - assert.ok(exists(".description")); - assert.strictEqual(query(".description").innerText, "details"); - }); -});