Commit 7a67a29c authored by Phil Hughes's avatar Phil Hughes

Merge branch 'xanf-remove-is-vue-instance' into 'master'

Replace isVueInstance with alternate options

See merge request gitlab-org/gitlab!40218
parents f33410af 9b7b210b
......@@ -66,7 +66,7 @@ describe('OnDemandScansApp', () => {
it('renders properly', () => {
createComponent();
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.html()).not.toBe('');
});
describe('submit button', () => {
......
......@@ -82,7 +82,7 @@ describe('OnDemandScansApp', () => {
});
it('renders properly', () => {
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.html()).not.toBe('');
});
describe('computed props', () => {
......
......@@ -121,7 +121,7 @@ describe('EnvironmentLogs', () => {
it('displays UI elements', () => {
initWrapper();
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.isEmpty()).toBe(false);
expect(findEnvironmentsDropdown().is(GlDeprecatedDropdown)).toBe(true);
expect(findSimpleFilters().exists()).toBe(true);
......
......@@ -68,7 +68,7 @@ describe('LogAdvancedFilters', () => {
it('displays UI elements', () => {
initWrapper();
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.isEmpty()).toBe(false);
expect(findFilteredSearch().exists()).toBe(true);
expect(findTimeRangePicker().exists()).toBe(true);
......
......@@ -28,7 +28,7 @@ describe('LogControlButtons', () => {
it('displays UI elements', () => {
initWrapper();
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.isEmpty()).toBe(false);
expect(findScrollToTop().is(GlButton)).toBe(true);
expect(findScrollToBottom().is(GlButton)).toBe(true);
......
......@@ -59,7 +59,7 @@ describe('LogSimpleFilters', () => {
it('displays UI elements', () => {
initWrapper();
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.isEmpty()).toBe(false);
expect(findPodsDropdown().exists()).toBe(true);
});
......
......@@ -46,9 +46,8 @@ describe('Anomaly chart component', () => {
});
});
it('is a Vue instance', () => {
it('renders correctly', () => {
expect(findTimeSeries().exists()).toBe(true);
expect(findTimeSeries().isVueInstance()).toBe(true);
});
describe('receives props correctly', () => {
......
......@@ -37,10 +37,6 @@ describe('Bar component', () => {
chartData = barChart.vm.chartData[graphData.metrics[0].label];
});
it('is a Vue instance', () => {
expect(glbarChart.isVueInstance()).toBe(true);
});
it('should display a label on the x axis', () => {
expect(glbarChart.props('xAxisTitle')).toBe(graphData.xLabel);
});
......
......@@ -95,10 +95,6 @@ describe('Column component', () => {
describe('wrapped components', () => {
describe('GitLab UI column chart', () => {
it('is a Vue instance', () => {
expect(findChart().isVueInstance()).toBe(true);
});
it('receives data properties needed for proper chart render', () => {
expect(chartProps('data').values).toEqual(dataValues);
});
......
......@@ -24,21 +24,14 @@ describe('Heatmap component', () => {
};
describe('wrapped chart', () => {
let glHeatmapChart;
beforeEach(() => {
createWrapper();
glHeatmapChart = findChart();
});
afterEach(() => {
wrapper.destroy();
});
it('is a Vue instance', () => {
expect(glHeatmapChart.isVueInstance()).toBe(true);
});
it('should display a label on the x axis', () => {
expect(wrapper.vm.xAxisName).toBe(graphData.xLabel);
});
......
......@@ -632,9 +632,8 @@ describe('Time series component', () => {
return wrapper.vm.$nextTick();
});
it('is a Vue instance', () => {
it('exists', () => {
expect(findChartComponent().exists()).toBe(true);
expect(findChartComponent().isVueInstance()).toBe(true);
});
it('receives data properties needed for proper chart render', () => {
......
......@@ -141,7 +141,6 @@ describe('Dashboard Panel', () => {
it('The Empty Chart component is rendered and is a Vue instance', () => {
expect(wrapper.find(MonitorEmptyChart).exists()).toBe(true);
expect(wrapper.find(MonitorEmptyChart).isVueInstance()).toBe(true);
});
});
......@@ -170,7 +169,6 @@ describe('Dashboard Panel', () => {
it('The Empty Chart component is rendered and is a Vue instance', () => {
expect(wrapper.find(MonitorEmptyChart).exists()).toBe(true);
expect(wrapper.find(MonitorEmptyChart).isVueInstance()).toBe(true);
});
});
......@@ -226,13 +224,11 @@ describe('Dashboard Panel', () => {
it('empty chart is rendered for empty results', () => {
createWrapper({ graphData: graphDataEmpty });
expect(wrapper.find(MonitorEmptyChart).exists()).toBe(true);
expect(wrapper.find(MonitorEmptyChart).isVueInstance()).toBe(true);
});
it('area chart is rendered by default', () => {
createWrapper();
expect(wrapper.find(MonitorTimeSeriesChart).exists()).toBe(true);
expect(wrapper.find(MonitorTimeSeriesChart).isVueInstance()).toBe(true);
});
describe.each`
......@@ -254,7 +250,6 @@ describe('Dashboard Panel', () => {
it(`renders the chart component and binds attributes`, () => {
expect(wrapper.find(component).exists()).toBe(true);
expect(wrapper.find(component).isVueInstance()).toBe(true);
expect(wrapper.find(component).attributes()).toMatchObject(attrs);
});
......@@ -548,7 +543,6 @@ describe('Dashboard Panel', () => {
});
it('it renders a time series chart with no errors', () => {
expect(wrapper.find(MonitorTimeSeriesChart).isVueInstance()).toBe(true);
expect(wrapper.find(MonitorTimeSeriesChart).exists()).toBe(true);
});
});
......
......@@ -707,8 +707,7 @@ describe('Dashboard', () => {
});
it('renders correctly', () => {
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.exists()).toBe(true);
expect(wrapper.html()).not.toBe('');
});
});
......
......@@ -47,7 +47,7 @@ describe('Pipelines filtered search', () => {
});
it('displays UI elements', () => {
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.isEmpty()).toBe(false);
expect(findFilteredSearch().exists()).toBe(true);
});
......
......@@ -38,10 +38,6 @@ describe('User Avatar Link Component', () => {
wrapper = null;
});
it('should return a defined Vue component', () => {
expect(wrapper.isVueInstance()).toBe(true);
});
it('should have user-avatar-image registered as child component', () => {
expect(wrapper.vm.$options.components.userAvatarImage).toBeDefined();
});
......
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