Skip to content

Commit c624dd8

Browse files
HDS-5289 Fix failing tests
1 parent 373c173 commit c624dd8

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

showcase/tests/integration/components/hds/charts/bar/index-test.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ module('Integration | Component | hds/charts/bar/index', function (hooks) {
1212
setupRenderingTest(hooks);
1313

1414
test('it should render the component with a CSS class that matches the component name', async function (assert) {
15-
await render(hbs`<Hds::Charts::Bar id="test-charts-bar" />`);
15+
this.data = [
16+
{ date: '2025-01', value: 1000 },
17+
{ date: '2025-02', value: 1500 },
18+
];
19+
20+
await render(
21+
hbs`<Hds::Charts::Bar @data={{this.data}} @title="Test bar" id="test-charts-bar" />`,
22+
);
1623
assert.dom('#test-charts-bar').hasClass('hds-charts-bar');
1724
});
1825
});

showcase/tests/integration/components/hds/charts/donut/index-test.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ module('Integration | Component | hds/charts/donut/index', function (hooks) {
1212
setupRenderingTest(hooks);
1313

1414
test('it should render the component with a CSS class that matches the component name', async function (assert) {
15-
await render(hbs`<Hds::Charts::Donut id="test-charts-donut" />`);
15+
this.data = [
16+
{ group: 'group 1', value: 2 },
17+
{ group: 'group 2', value: 4 },
18+
];
19+
20+
await render(
21+
hbs`<Hds::Charts::Donut @data={{this.data}} @title="Test donut" id="test-charts-donut" />`,
22+
);
1623
assert.dom('#test-charts-donut').hasClass('hds-charts-donut');
1724
});
1825
});

showcase/tests/integration/components/hds/charts/meter/index-test.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ module('Integration | Component | hds/charts/meter/index', function (hooks) {
1212
setupRenderingTest(hooks);
1313

1414
test('it should render the component with a CSS class that matches the component name', async function (assert) {
15-
await render(hbs`<Hds::Charts::Meter id="test-charts-meter" />`);
15+
this.data = [
16+
{ group: 'Test group 1', value: 30 },
17+
{ group: 'Test group 2', value: 70 },
18+
];
19+
20+
await render(
21+
hbs`<Hds::Charts::Meter @data={{this.data}} @title="Test meter" id="test-charts-meter" />`,
22+
);
1623
assert.dom('#test-charts-meter').hasClass('hds-charts-meter');
1724
});
1825
});

0 commit comments

Comments
 (0)