discourse/plugins/discourse-data-explorer/test/javascripts/integration/components/data-explorer-bar-chart-test.gjs
2025-07-15 16:38:05 +02:00

26 lines
786 B
Text
Vendored

import { array } from "@ember/helper";
import { render } from "@ember/test-helpers";
import { module, test } from "qunit";
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
import DataExplorerBarChart from "../../discourse/components/data-explorer-bar-chart";
module(
"Data Explorer Plugin | Integration | Component | data-explorer-bar-chart",
function (hooks) {
setupRenderingTest(hooks);
test("renders a chart", async function (assert) {
await render(
<template>
<DataExplorerBarChart
@labels={{array "label_1" "label_2"}}
@values={{array 115 1000}}
@datasetName="data"
/>
</template>
);
assert.dom("canvas").exists("renders a canvas");
});
}
);