DEV: removes unused components (#22497)

Removes the following components which are not used anymore:
- d-progress-bar
- on-visibility-action
This commit is contained in:
Joffrey JAFFEUX
2023-07-10 09:54:45 +02:00
committed by GitHub
parent 03e495186f
commit af22f77d38
7 changed files with 0 additions and 246 deletions

View File

@ -1,31 +0,0 @@
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
import hbs from "htmlbars-inline-precompile";
import { render, waitUntil } from "@ember/test-helpers";
import { module, test } from "qunit";
module("Discourse Chat | Component | on-visibility-action", function (hooks) {
setupRenderingTest(hooks);
test("Calling an action on visibility gained", async function (assert) {
this.set("value", null);
this.set("display", false);
this.set("action", () => {
this.set("value", "foo");
});
this.set("root", document.querySelector("#ember-testing"));
await render(hbs`
{{#if display}}
<OnVisibilityAction @action={{this.action}} @root={{this.root}} />
{{/if}}
`);
assert.strictEqual(this.value, null);
this.set("display", true);
await waitUntil(() => this.value !== null);
assert.strictEqual(this.value, "foo");
});
});