Commit 2099e33b authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Fix minor review comments

parent 35b7fd7c
......@@ -317,7 +317,7 @@ export default {
<gl-loading-icon v-else-if="!isLoading" size="md" class="my-4 py-4" />
</template>
<template v-if="featureFlags.hasTasksByTypeChart">
<div class="tasks-by-type-chart">
<div class="js-tasks-by-type-chart">
<div v-if="shouldDisplayTasksByTypeChart">
<tasks-by-type-chart
:chart-data="tasksByTypeChartData"
......
......@@ -20,7 +20,7 @@ export default {
},
computed: {
hasData() {
return this.chartData && this.chartData.data && this.chartData.data.length;
return Boolean(this.chartData?.data?.length);
},
selectedFiltersText() {
const { subject, selectedLabelIds } = this.filters;
......
......@@ -274,7 +274,7 @@ describe 'Group Cycle Analytics', :js do
end
it 'will not display the tasks by type chart' do
expect(page).not_to have_selector('.tasks-by-type-chart')
expect(page).not_to have_selector('.js-tasks-by-type-chart')
expect(page).not_to have_text('Tasks by type')
end
......
......@@ -366,7 +366,7 @@ describe('Cycle Analytics component', () => {
mock.restore();
});
it('displays the tasks by type chart', () => {
expect(wrapper.find('.tasks-by-type-chart').exists()).toBe(true);
expect(wrapper.find('.js-tasks-by-type-chart').exists()).toBe(true);
});
});
......@@ -390,7 +390,7 @@ describe('Cycle Analytics component', () => {
});
it('does not render the tasks by type chart', () => {
expect(wrapper.find('.tasks-by-type-chart').exists()).toBe(false);
expect(wrapper.find('.js-tasks-by-type-chart').exists()).toBe(false);
});
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment