Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 21:07:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 21:07:48 +0300
commite72386771751fb22245bc6604fef236a2ee130cb (patch)
tree7cf54bca933159cb177d3caa2f139f87d6d30391 /spec/frontend/monitoring/components/charts/empty_chart_spec.js
parentc2b98d3dbd47ab92c79c702276fe9130d9a28036 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/monitoring/components/charts/empty_chart_spec.js')
-rw-r--r--spec/frontend/monitoring/components/charts/empty_chart_spec.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/frontend/monitoring/components/charts/empty_chart_spec.js b/spec/frontend/monitoring/components/charts/empty_chart_spec.js
new file mode 100644
index 00000000000..06822126b59
--- /dev/null
+++ b/spec/frontend/monitoring/components/charts/empty_chart_spec.js
@@ -0,0 +1,33 @@
+import { shallowMount, createLocalVue } from '@vue/test-utils';
+import EmptyChart from '~/monitoring/components/charts/empty_chart.vue';
+
+const localVue = createLocalVue();
+
+describe('Empty Chart component', () => {
+ let emptyChart;
+ const graphTitle = 'Memory Usage';
+
+ beforeEach(() => {
+ emptyChart = shallowMount(localVue.extend(EmptyChart), {
+ propsData: {
+ graphTitle,
+ },
+ sync: false,
+ localVue,
+ });
+ });
+
+ afterEach(() => {
+ emptyChart.destroy();
+ });
+
+ it('render the chart title', () => {
+ expect(emptyChart.find({ ref: 'graphTitle' }).text()).toBe(graphTitle);
+ });
+
+ describe('Computed props', () => {
+ it('sets the height for the svg container', () => {
+ expect(emptyChart.vm.svgContainerStyle.height).toBe('300px');
+ });
+ });
+});