Commit 4b2f3022 authored by mfluharty's avatar mfluharty

Add extra coverage for performance widgets

To make sure they're rendering fully
so we don't have another regression
like we did with browser performance in 13.8
parent 9a93299f
...@@ -3,6 +3,7 @@ import MockAdapter from 'axios-mock-adapter'; ...@@ -3,6 +3,7 @@ import MockAdapter from 'axios-mock-adapter';
import Vue, { nextTick } from 'vue'; import Vue, { nextTick } from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import MrWidgetOptions from 'ee/vue_merge_request_widget/mr_widget_options.vue'; import MrWidgetOptions from 'ee/vue_merge_request_widget/mr_widget_options.vue';
import PerformanceIssueBody from 'ee/vue_merge_request_widget/components/performance_issue_body.vue';
import { import {
sastDiffSuccessMock, sastDiffSuccessMock,
dastDiffSuccessMock, dastDiffSuccessMock,
...@@ -370,6 +371,13 @@ describe('ee merge request widget options', () => { ...@@ -370,6 +371,13 @@ describe('ee merge request widget options', () => {
}); });
}); });
it('should render performance issue body component', (done) => {
setImmediate(() => {
expect(wrapper.find(PerformanceIssueBody).exists()).toBe(true);
done();
});
});
describe('text connector', () => { describe('text connector', () => {
it('should only render information about fixed issues', (done) => { it('should only render information about fixed issues', (done) => {
setImmediate(() => { setImmediate(() => {
...@@ -527,6 +535,10 @@ describe('ee merge request widget options', () => { ...@@ -527,6 +535,10 @@ describe('ee merge request widget options', () => {
); );
}); });
it('should render performance issue body component', () => {
expect(wrapper.find(PerformanceIssueBody).exists()).toBe(true);
});
describe('text connector', () => { describe('text connector', () => {
it('should only render information about fixed issues', (done) => { it('should only render information about fixed issues', (done) => {
wrapper.vm.mr.loadPerformanceMetrics.degraded = []; wrapper.vm.mr.loadPerformanceMetrics.degraded = [];
......
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