diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /spec/frontend/analytics/instance_statistics/components | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'spec/frontend/analytics/instance_statistics/components')
4 files changed, 18 insertions, 20 deletions
diff --git a/spec/frontend/analytics/instance_statistics/components/app_spec.js b/spec/frontend/analytics/instance_statistics/components/app_spec.js index cc676e86e99..b945cc20bd6 100644 --- a/spec/frontend/analytics/instance_statistics/components/app_spec.js +++ b/spec/frontend/analytics/instance_statistics/components/app_spec.js @@ -1,9 +1,9 @@ import { shallowMount } from '@vue/test-utils'; -import InstanceStatisticsApp from '~/analytics/instance_statistics/components/app.vue'; import InstanceCounts from '~/analytics/instance_statistics/components//instance_counts.vue'; +import InstanceStatisticsApp from '~/analytics/instance_statistics/components/app.vue'; import InstanceStatisticsCountChart from '~/analytics/instance_statistics/components/instance_statistics_count_chart.vue'; -import UsersChart from '~/analytics/instance_statistics/components/users_chart.vue'; import ProjectsAndGroupsChart from '~/analytics/instance_statistics/components/projects_and_groups_chart.vue'; +import UsersChart from '~/analytics/instance_statistics/components/users_chart.vue'; describe('InstanceStatisticsApp', () => { let wrapper; diff --git a/spec/frontend/analytics/instance_statistics/components/instance_statistics_count_chart_spec.js b/spec/frontend/analytics/instance_statistics/components/instance_statistics_count_chart_spec.js index a69f3388cbb..e80dcdff426 100644 --- a/spec/frontend/analytics/instance_statistics/components/instance_statistics_count_chart_spec.js +++ b/spec/frontend/analytics/instance_statistics/components/instance_statistics_count_chart_spec.js @@ -1,13 +1,13 @@ -import { createLocalVue, shallowMount } from '@vue/test-utils'; -import { GlLineChart } from '@gitlab/ui/dist/charts'; import { GlAlert } from '@gitlab/ui'; +import { GlLineChart } from '@gitlab/ui/dist/charts'; +import { createLocalVue, shallowMount } from '@vue/test-utils'; import VueApollo from 'vue-apollo'; import createMockApollo from 'helpers/mock_apollo_helper'; import InstanceStatisticsCountChart from '~/analytics/instance_statistics/components/instance_statistics_count_chart.vue'; import statsQuery from '~/analytics/instance_statistics/graphql/queries/instance_count.query.graphql'; import ChartSkeletonLoader from '~/vue_shared/components/resizable_chart/skeleton_loader.vue'; -import { mockCountsData1 } from '../mock_data'; import { mockQueryResponse, mockApolloResponse } from '../apollo_mock_data'; +import { mockCountsData1 } from '../mock_data'; const localVue = createLocalVue(); localVue.use(VueApollo); diff --git a/spec/frontend/analytics/instance_statistics/components/projects_and_groups_chart_spec.js b/spec/frontend/analytics/instance_statistics/components/projects_and_groups_chart_spec.js index bf94e476ea3..bbfc65f19b1 100644 --- a/spec/frontend/analytics/instance_statistics/components/projects_and_groups_chart_spec.js +++ b/spec/frontend/analytics/instance_statistics/components/projects_and_groups_chart_spec.js @@ -1,15 +1,14 @@ -import { createLocalVue, shallowMount } from '@vue/test-utils'; -import { GlLineChart } from '@gitlab/ui/dist/charts'; import { GlAlert } from '@gitlab/ui'; +import { GlLineChart } from '@gitlab/ui/dist/charts'; +import { createLocalVue, shallowMount } from '@vue/test-utils'; import VueApollo from 'vue-apollo'; import createMockApollo from 'helpers/mock_apollo_helper'; -import { useFakeDate } from 'helpers/fake_date'; import ProjectsAndGroupChart from '~/analytics/instance_statistics/components/projects_and_groups_chart.vue'; -import ChartSkeletonLoader from '~/vue_shared/components/resizable_chart/skeleton_loader.vue'; -import projectsQuery from '~/analytics/instance_statistics/graphql/queries/projects.query.graphql'; import groupsQuery from '~/analytics/instance_statistics/graphql/queries/groups.query.graphql'; -import { mockCountsData2, roundedSortedCountsMonthlyChartData2 } from '../mock_data'; +import projectsQuery from '~/analytics/instance_statistics/graphql/queries/projects.query.graphql'; +import ChartSkeletonLoader from '~/vue_shared/components/resizable_chart/skeleton_loader.vue'; import { mockQueryResponse } from '../apollo_mock_data'; +import { mockCountsData2, roundedSortedCountsMonthlyChartData2 } from '../mock_data'; const localVue = createLocalVue(); localVue.use(VueApollo); @@ -45,8 +44,8 @@ describe('ProjectsAndGroupChart', () => { return shallowMount(ProjectsAndGroupChart, { props: { - startDate: useFakeDate(2020, 9, 26), - endDate: useFakeDate(2020, 10, 1), + startDate: new Date(2020, 9, 26), + endDate: new Date(2020, 10, 1), totalDataPoints: mockCountsData2.length, }, localVue, diff --git a/spec/frontend/analytics/instance_statistics/components/users_chart_spec.js b/spec/frontend/analytics/instance_statistics/components/users_chart_spec.js index b9fa30643df..d857b7fae61 100644 --- a/spec/frontend/analytics/instance_statistics/components/users_chart_spec.js +++ b/spec/frontend/analytics/instance_statistics/components/users_chart_spec.js @@ -1,18 +1,17 @@ -import { createLocalVue, shallowMount } from '@vue/test-utils'; -import { GlAreaChart } from '@gitlab/ui/dist/charts'; import { GlAlert } from '@gitlab/ui'; +import { GlAreaChart } from '@gitlab/ui/dist/charts'; +import { createLocalVue, shallowMount } from '@vue/test-utils'; import VueApollo from 'vue-apollo'; import createMockApollo from 'helpers/mock_apollo_helper'; -import { useFakeDate } from 'helpers/fake_date'; import UsersChart from '~/analytics/instance_statistics/components/users_chart.vue'; -import ChartSkeletonLoader from '~/vue_shared/components/resizable_chart/skeleton_loader.vue'; import usersQuery from '~/analytics/instance_statistics/graphql/queries/users.query.graphql'; +import ChartSkeletonLoader from '~/vue_shared/components/resizable_chart/skeleton_loader.vue'; +import { mockQueryResponse } from '../apollo_mock_data'; import { mockCountsData1, mockCountsData2, roundedSortedCountsMonthlyChartData2, } from '../mock_data'; -import { mockQueryResponse } from '../apollo_mock_data'; const localVue = createLocalVue(); localVue.use(VueApollo); @@ -31,8 +30,8 @@ describe('UsersChart', () => { return shallowMount(UsersChart, { props: { - startDate: useFakeDate(2020, 9, 26), - endDate: useFakeDate(2020, 10, 1), + startDate: new Date(2020, 9, 26), + endDate: new Date(2020, 10, 1), totalDataPoints: mockCountsData2.length, }, localVue, |