diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /spec/frontend/contributors | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'spec/frontend/contributors')
3 files changed, 38 insertions, 40 deletions
diff --git a/spec/frontend/contributors/component/__snapshots__/contributors_spec.js.snap b/spec/frontend/contributors/component/__snapshots__/contributors_spec.js.snap index 2f441f0f747..5cfb4702be7 100644 --- a/spec/frontend/contributors/component/__snapshots__/contributors_spec.js.snap +++ b/spec/frontend/contributors/component/__snapshots__/contributors_spec.js.snap @@ -53,23 +53,23 @@ exports[`Contributors charts should render charts and a RefSelector when loading Excluding merge commits. Limited to 6,000 commits. </span> - <div> - <glareachart-stub - annotations="" - class="gl-mb-5" - data="[object Object]" - height="264" - includelegendavgmax="true" - legendaveragetext="Avg" - legendcurrenttext="Current" - legendlayout="inline" - legendmaxtext="Max" - legendmintext="Min" - option="[object Object]" - thresholds="" - width="0" - /> - </div> + <glareachart-stub + annotations="" + class="gl-mb-5" + data="[object Object]" + height="264" + includelegendavgmax="true" + legendaveragetext="Avg" + legendcurrenttext="Current" + legendlayout="inline" + legendmaxtext="Max" + legendmintext="Min" + legendseriesinfo="" + option="[object Object]" + responsive="" + thresholds="" + width="auto" + /> <div class="row" @@ -91,22 +91,22 @@ exports[`Contributors charts should render charts and a RefSelector when loading </p> - <div> - <glareachart-stub - annotations="" - data="[object Object]" - height="216" - includelegendavgmax="true" - legendaveragetext="Avg" - legendcurrenttext="Current" - legendlayout="inline" - legendmaxtext="Max" - legendmintext="Min" - option="[object Object]" - thresholds="" - width="0" - /> - </div> + <glareachart-stub + annotations="" + data="[object Object]" + height="216" + includelegendavgmax="true" + legendaveragetext="Avg" + legendcurrenttext="Current" + legendlayout="inline" + legendmaxtext="Max" + legendmintext="Min" + legendseriesinfo="" + option="[object Object]" + responsive="" + thresholds="" + width="auto" + /> </div> </div> </div> diff --git a/spec/frontend/contributors/component/contributors_spec.js b/spec/frontend/contributors/component/contributors_spec.js index 03b1e977548..f915b834aff 100644 --- a/spec/frontend/contributors/component/contributors_spec.js +++ b/spec/frontend/contributors/component/contributors_spec.js @@ -1,5 +1,5 @@ import MockAdapter from 'axios-mock-adapter'; -import Vue, { nextTick } from 'vue'; +import { nextTick } from 'vue'; import { mountExtended } from 'helpers/vue_test_utils_helper'; import ContributorsCharts from '~/contributors/components/contributors.vue'; import { createStore } from '~/contributors/stores'; @@ -16,7 +16,6 @@ jest.mock('~/lib/utils/url_utility', () => ({ let wrapper; let mock; let store; -const Component = Vue.extend(ContributorsCharts); const endpoint = 'contributors/-/graphs'; const branch = 'main'; const chartData = [ @@ -32,7 +31,7 @@ function factory() { mock.onGet().reply(HTTP_STATUS_OK, chartData); store = createStore(); - wrapper = mountExtended(Component, { + wrapper = mountExtended(ContributorsCharts, { propsData: { endpoint, branch, @@ -60,7 +59,6 @@ describe('Contributors charts', () => { afterEach(() => { mock.restore(); - wrapper.destroy(); }); it('should fetch chart data when mounted', () => { diff --git a/spec/frontend/contributors/store/actions_spec.js b/spec/frontend/contributors/store/actions_spec.js index b2ebdf2f53c..a15b9ad2978 100644 --- a/spec/frontend/contributors/store/actions_spec.js +++ b/spec/frontend/contributors/store/actions_spec.js @@ -2,11 +2,11 @@ import MockAdapter from 'axios-mock-adapter'; import testAction from 'helpers/vuex_action_helper'; import * as actions from '~/contributors/stores/actions'; import * as types from '~/contributors/stores/mutation_types'; -import { createAlert } from '~/flash'; +import { createAlert } from '~/alert'; import axios from '~/lib/utils/axios_utils'; import { HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_OK } from '~/lib/utils/http_status'; -jest.mock('~/flash.js'); +jest.mock('~/alert'); describe('Contributors store actions', () => { describe('fetchChartData', () => { @@ -38,7 +38,7 @@ describe('Contributors store actions', () => { ); }); - it('should show flash on API error', async () => { + it('should show alert on API error', async () => { mock.onGet().reply(HTTP_STATUS_BAD_REQUEST, 'Not Found'); await testAction( |