Commit 059af27a authored by Dave Pisek's avatar Dave Pisek

Reviewer feedback: Spec improvement

parent 31c993cd
...@@ -77,12 +77,14 @@ describe('Vulnerabilities Over Time Chart Component', () => { ...@@ -77,12 +77,14 @@ describe('Vulnerabilities Over Time Chart Component', () => {
}); });
it('should change the actively selected chart button and refetch the new data', async () => { it('should change the actively selected chart button and refetch the new data', async () => {
expect(findChartButtons().props('activeDay')).toBe(30); const chartButtons = findChartButtons();
findChartButtons().vm.$emit('days-selected', 90);
expect(chartButtons.props('activeDay')).toBe(30);
chartButtons.vm.$emit('days-selected', 90);
await nextTick(); await nextTick();
expect(findChartButtons().props('activeDay')).toBe(90); expect(chartButtons.props('activeDay')).toBe(90);
expect(wrapper.vm.$apollo.queries.vulnerabilitiesHistory.refetch).toHaveBeenCalledTimes(1); expect(wrapper.vm.$apollo.queries.vulnerabilitiesHistory.refetch).toHaveBeenCalledTimes(1);
}); });
}); });
......
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