diff --git a/test-app/tests/integration/components/high-charts-test.js b/test-app/tests/integration/components/high-charts-test.js index 197d27e..045fa91 100644 --- a/test-app/tests/integration/components/high-charts-test.js +++ b/test-app/tests/integration/components/high-charts-test.js @@ -19,6 +19,8 @@ module('Integration | Component | High Charts', function (hooks) { `); + await waitFor('.highcharts-credits'); + // custom highcharts-configs/application.js is auto-loaded from tests/dummy/app assert .dom('.highcharts-credits') @@ -41,6 +43,8 @@ module('Integration | Component | High Charts', function (hooks) { /> `); + await waitFor('.highcharts-legend'); + assert .dom('.highcharts-legend .highcharts-legend-item text') .exists({ count: 1 }, 'expected one series'); @@ -52,6 +56,7 @@ module('Integration | Component | High Charts', function (hooks) { test('should add a series', async function (assert) { this.cityData = cityData; this.lineChartOptions = lineChartOptions; + await render(hbs` `); + await waitFor('.highcharts-legend'); + assert .dom('.highcharts-legend .highcharts-legend-item') .exists({ count: 3 }, 'base series count'); @@ -83,6 +90,7 @@ module('Integration | Component | High Charts', function (hooks) { test('should remove a series', async function (assert) { this.cityData = cityData; this.lineChartOptions = lineChartOptions; + await render(hbs` `); + await waitFor('.highcharts-legend'); + assert .dom('.highcharts-legend .highcharts-legend-item') .exists({ count: 3 }, 'base series count'); @@ -175,6 +185,8 @@ module('Integration | Component | High Charts', function (hooks) { await render(hbs` `); + await waitFor('.highcharts-container'); + assert .dom('.highcharts-container') .exists({ count: 1 }, 'we rendered a chart without a mode specified'); @@ -182,6 +194,8 @@ module('Integration | Component | High Charts', function (hooks) { await render(hbs` `); + await waitFor('.highcharts-container'); + assert .dom('.highcharts-container') .exists({ count: 1 }, 'we rendered a chart with empty string mode'); @@ -189,6 +203,8 @@ module('Integration | Component | High Charts', function (hooks) { await render(hbs` `); + await waitFor('.highcharts-container'); + assert .dom('.highcharts-container') .exists({ count: 1 }, 'we rendered a chart with false boolean mode'); @@ -196,6 +212,8 @@ module('Integration | Component | High Charts', function (hooks) { await render(hbs` `); + await waitFor('.highcharts-container'); + assert .dom('.highcharts-container') .exists({ count: 1 }, 'we rendered a chart with null mode');