diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-05 00:08:38 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-05 00:08:38 +0000 |
commit | 38a00c219fffa802ffaa26689fc7912b59165ddc (patch) | |
tree | bb1f6a3525a7559fa1033ee4e8f9cead9402f270 /spec/frontend | |
parent | 37c8b3b44e6d3f5755e45b3db6913fab7fee5c89 (diff) | |
download | gitlab-ce-38a00c219fffa802ffaa26689fc7912b59165ddc.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
-rw-r--r-- | spec/frontend/confirm_modal_spec.js | 6 | ||||
-rw-r--r-- | spec/frontend/ide/components/branches/item_spec.js | 10 | ||||
-rw-r--r-- | spec/frontend/ide/components/commit_sidebar/list_item_spec.js | 13 | ||||
-rw-r--r-- | spec/frontend/ide/components/merge_requests/item_spec.js | 18 | ||||
-rw-r--r-- | spec/frontend/ide/components/repo_commit_section_spec.js | 4 | ||||
-rw-r--r-- | spec/frontend/ide/components/repo_tab_spec.js | 12 | ||||
-rw-r--r-- | spec/frontend/ide/ide_router_spec.js | 37 | ||||
-rw-r--r-- | spec/frontend/ide/stores/actions/file_spec.js | 4 | ||||
-rw-r--r-- | spec/frontend/ide/stores/actions/project_spec.js | 9 | ||||
-rw-r--r-- | spec/frontend/ide/stores/actions/tree_spec.js | 11 | ||||
-rw-r--r-- | spec/frontend/ide/stores/actions_spec.js | 22 | ||||
-rw-r--r-- | spec/frontend/ide/stores/modules/commit/actions_spec.js | 10 | ||||
-rw-r--r-- | spec/frontend/ide/sync_router_and_store_spec.js | 12 | ||||
-rw-r--r-- | spec/frontend/lib/utils/common_utils_spec.js | 27 |
14 files changed, 137 insertions, 58 deletions
diff --git a/spec/frontend/confirm_modal_spec.js b/spec/frontend/confirm_modal_spec.js index 89cfc3ef3a3..b14d1c3e01d 100644 --- a/spec/frontend/confirm_modal_spec.js +++ b/spec/frontend/confirm_modal_spec.js @@ -51,7 +51,7 @@ describe('ConfirmModal', () => { const findModalOkButton = (modal, variant) => modal.querySelector(`.modal-footer .btn-${variant}`); const findModalCancelButton = modal => modal.querySelector('.modal-footer .btn-secondary'); - const modalIsHidden = () => findModal().getAttribute('aria-hidden') === 'true'; + const modalIsHidden = () => findModal() === null; const serializeModal = (modal, buttonIndex) => { const { modalAttributes } = buttons[buttonIndex]; @@ -101,7 +101,9 @@ describe('ConfirmModal', () => { }); it('closes the modal', () => { - expect(modalIsHidden()).toBe(true); + setImmediate(() => { + expect(modalIsHidden()).toBe(true); + }); }); }); }); diff --git a/spec/frontend/ide/components/branches/item_spec.js b/spec/frontend/ide/components/branches/item_spec.js index 196951cce66..d8175025755 100644 --- a/spec/frontend/ide/components/branches/item_spec.js +++ b/spec/frontend/ide/components/branches/item_spec.js @@ -1,5 +1,6 @@ import { shallowMount } from '@vue/test-utils'; -import router from '~/ide/ide_router'; +import { createStore } from '~/ide/stores'; +import { createRouter } from '~/ide/ide_router'; import Item from '~/ide/components/branches/item.vue'; import Icon from '~/vue_shared/components/icon.vue'; import Timeago from '~/vue_shared/components/time_ago_tooltip.vue'; @@ -13,6 +14,8 @@ const TEST_PROJECT_ID = projectData.name_with_namespace; describe('IDE branch item', () => { let wrapper; + let store; + let router; function createComponent(props = {}) { wrapper = shallowMount(Item, { @@ -26,6 +29,11 @@ describe('IDE branch item', () => { }); } + beforeEach(() => { + store = createStore(); + router = createRouter(store); + }); + afterEach(() => { wrapper.destroy(); }); diff --git a/spec/frontend/ide/components/commit_sidebar/list_item_spec.js b/spec/frontend/ide/components/commit_sidebar/list_item_spec.js index ebb41448905..7ce628d4da7 100644 --- a/spec/frontend/ide/components/commit_sidebar/list_item_spec.js +++ b/spec/frontend/ide/components/commit_sidebar/list_item_spec.js @@ -1,17 +1,22 @@ import Vue from 'vue'; import { trimText } from 'helpers/text_helper'; import { createComponentWithStore } from 'helpers/vue_mount_component_helper'; -import store from '~/ide/stores'; +import { createStore } from '~/ide/stores'; import listItem from '~/ide/components/commit_sidebar/list_item.vue'; -import router from '~/ide/ide_router'; -import { file, resetStore } from '../../helpers'; +import { createRouter } from '~/ide/ide_router'; +import { file } from '../../helpers'; describe('Multi-file editor commit sidebar list item', () => { let vm; let f; let findPathEl; + let store; + let router; beforeEach(() => { + store = createStore(); + router = createRouter(store); + const Component = Vue.extend(listItem); f = file('test-file'); @@ -28,8 +33,6 @@ describe('Multi-file editor commit sidebar list item', () => { afterEach(() => { vm.$destroy(); - - resetStore(store); }); const findPathText = () => trimText(findPathEl.textContent); diff --git a/spec/frontend/ide/components/merge_requests/item_spec.js b/spec/frontend/ide/components/merge_requests/item_spec.js index 551d5dab9f7..b1da89d7a9b 100644 --- a/spec/frontend/ide/components/merge_requests/item_spec.js +++ b/spec/frontend/ide/components/merge_requests/item_spec.js @@ -1,5 +1,7 @@ -import { mount } from '@vue/test-utils'; -import router from '~/ide/ide_router'; +import Vuex from 'vuex'; +import { mount, createLocalVue } from '@vue/test-utils'; +import { createStore } from '~/ide/stores'; +import { createRouter } from '~/ide/ide_router'; import Item from '~/ide/components/merge_requests/item.vue'; const TEST_ITEM = { @@ -9,7 +11,12 @@ const TEST_ITEM = { }; describe('IDE merge request item', () => { + const localVue = createLocalVue(); + localVue.use(Vuex); + let wrapper; + let store; + let router; const createComponent = (props = {}) => { wrapper = mount(Item, { @@ -21,11 +28,18 @@ describe('IDE merge request item', () => { currentProjectId: TEST_ITEM.projectPathWithNamespace, ...props, }, + localVue, router, + store, }); }; const findIcon = () => wrapper.find('.ic-mobile-issue-close'); + beforeEach(() => { + store = createStore(); + router = createRouter(store); + }); + afterEach(() => { wrapper.destroy(); wrapper = null; diff --git a/spec/frontend/ide/components/repo_commit_section_spec.js b/spec/frontend/ide/components/repo_commit_section_spec.js index d4e4e064a52..43094796d4f 100644 --- a/spec/frontend/ide/components/repo_commit_section_spec.js +++ b/spec/frontend/ide/components/repo_commit_section_spec.js @@ -1,6 +1,6 @@ import { mount } from '@vue/test-utils'; import { createStore } from '~/ide/stores'; -import router from '~/ide/ide_router'; +import { createRouter } from '~/ide/ide_router'; import RepoCommitSection from '~/ide/components/repo_commit_section.vue'; import EmptyState from '~/ide/components/commit_sidebar/empty_state.vue'; import { stageKeys } from '~/ide/constants'; @@ -10,6 +10,7 @@ const TEST_NO_CHANGES_SVG = 'nochangessvg'; describe('RepoCommitSection', () => { let wrapper; + let router; let store; function createComponent() { @@ -55,6 +56,7 @@ describe('RepoCommitSection', () => { beforeEach(() => { store = createStore(); + router = createRouter(store); jest.spyOn(store, 'dispatch'); jest.spyOn(router, 'push').mockImplementation(); diff --git a/spec/frontend/ide/components/repo_tab_spec.js b/spec/frontend/ide/components/repo_tab_spec.js index 82ea73ffbb1..5a591d3dcd0 100644 --- a/spec/frontend/ide/components/repo_tab_spec.js +++ b/spec/frontend/ide/components/repo_tab_spec.js @@ -1,11 +1,13 @@ import Vue from 'vue'; -import store from '~/ide/stores'; +import { createStore } from '~/ide/stores'; import repoTab from '~/ide/components/repo_tab.vue'; -import router from '~/ide/ide_router'; -import { file, resetStore } from '../helpers'; +import { createRouter } from '~/ide/ide_router'; +import { file } from '../helpers'; describe('RepoTab', () => { let vm; + let store; + let router; function createComponent(propsData) { const RepoTab = Vue.extend(repoTab); @@ -17,13 +19,13 @@ describe('RepoTab', () => { } beforeEach(() => { + store = createStore(); + router = createRouter(store); jest.spyOn(router, 'push').mockImplementation(() => {}); }); afterEach(() => { vm.$destroy(); - - resetStore(vm.$store); }); it('renders a close link and a name link', () => { diff --git a/spec/frontend/ide/ide_router_spec.js b/spec/frontend/ide/ide_router_spec.js index 1461b756d13..b53e2019819 100644 --- a/spec/frontend/ide/ide_router_spec.js +++ b/spec/frontend/ide/ide_router_spec.js @@ -1,17 +1,20 @@ -import router from '~/ide/ide_router'; -import store from '~/ide/stores'; +import { createRouter } from '~/ide/ide_router'; +import { createStore } from '~/ide/stores'; +import waitForPromises from 'helpers/wait_for_promises'; describe('IDE router', () => { const PROJECT_NAMESPACE = 'my-group/sub-group'; const PROJECT_NAME = 'my-project'; + const TEST_PATH = `/project/${PROJECT_NAMESPACE}/${PROJECT_NAME}/merge_requests/2`; - afterEach(() => { - router.push('/'); - }); + let store; + let router; - afterAll(() => { - // VueRouter leaves this window.history at the "base" url. We need to clean this up. + beforeEach(() => { window.history.replaceState({}, '', '/'); + store = createStore(); + router = createRouter(store); + jest.spyOn(store, 'dispatch').mockReturnValue(new Promise(() => {})); }); [ @@ -31,8 +34,6 @@ describe('IDE router', () => { `/project/${PROJECT_NAMESPACE}/${PROJECT_NAME}`, ].forEach(route => { it(`finds project path when route is "${route}"`, () => { - jest.spyOn(store, 'dispatch').mockReturnValue(new Promise(() => {})); - router.push(route); expect(store.dispatch).toHaveBeenCalledWith('getProjectData', { @@ -41,4 +42,22 @@ describe('IDE router', () => { }); }); }); + + it('keeps router in sync when store changes', async () => { + expect(router.currentRoute.fullPath).toBe('/'); + + store.state.router.fullPath = TEST_PATH; + + await waitForPromises(); + + expect(router.currentRoute.fullPath).toBe(TEST_PATH); + }); + + it('keeps store in sync when router changes', () => { + expect(store.dispatch).not.toHaveBeenCalled(); + + router.push(TEST_PATH); + + expect(store.dispatch).toHaveBeenCalledWith('router/push', TEST_PATH, { root: true }); + }); }); diff --git a/spec/frontend/ide/stores/actions/file_spec.js b/spec/frontend/ide/stores/actions/file_spec.js index e50697af5eb..90b4d973222 100644 --- a/spec/frontend/ide/stores/actions/file_spec.js +++ b/spec/frontend/ide/stores/actions/file_spec.js @@ -5,7 +5,7 @@ import { createStore } from '~/ide/stores'; import * as actions from '~/ide/stores/actions/file'; import * as types from '~/ide/stores/mutation_types'; import service from '~/ide/services'; -import router from '~/ide/ide_router'; +import { createRouter } from '~/ide/ide_router'; import eventHub from '~/ide/eventhub'; import { file } from '../../helpers'; @@ -16,6 +16,7 @@ describe('IDE store file actions', () => { let mock; let originalGon; let store; + let router; beforeEach(() => { mock = new MockAdapter(axios); @@ -26,6 +27,7 @@ describe('IDE store file actions', () => { }; store = createStore(); + router = createRouter(store); jest.spyOn(store, 'commit'); jest.spyOn(store, 'dispatch'); diff --git a/spec/frontend/ide/stores/actions/project_spec.js b/spec/frontend/ide/stores/actions/project_spec.js index 1aaeebf19d4..f71cffb93ad 100644 --- a/spec/frontend/ide/stores/actions/project_spec.js +++ b/spec/frontend/ide/stores/actions/project_spec.js @@ -1,7 +1,6 @@ import MockAdapter from 'axios-mock-adapter'; import axios from '~/lib/utils/axios_utils'; import { createStore } from '~/ide/stores'; -import router from '~/ide/ide_router'; import { refreshLastCommitData, showBranchNotFoundError, @@ -13,7 +12,6 @@ import { } from '~/ide/stores/actions'; import service from '~/ide/services'; import api from '~/api'; -import { resetStore } from '../../helpers'; import testAction from '../../../helpers/vuex_action_helper'; const TEST_PROJECT_ID = 'abc/def'; @@ -33,8 +31,6 @@ describe('IDE store project actions', () => { afterEach(() => { mock.restore(); - - resetStore(store); }); describe('refreshLastCommitData', () => { @@ -122,7 +118,6 @@ describe('IDE store project actions', () => { describe('createNewBranchFromDefault', () => { beforeEach(() => { jest.spyOn(api, 'createBranch').mockResolvedValue(); - jest.spyOn(router, 'push').mockImplementation(); }); it('calls API', done => { @@ -175,6 +170,8 @@ describe('IDE store project actions', () => { }); it('reloads window', done => { + jest.spyOn(window.location, 'reload').mockImplementation(); + createNewBranchFromDefault( { state: { @@ -190,7 +187,7 @@ describe('IDE store project actions', () => { 'new-branch-name', ) .then(() => { - expect(router.push).toHaveBeenCalled(); + expect(window.location.reload).toHaveBeenCalled(); }) .then(done) .catch(done.fail); diff --git a/spec/frontend/ide/stores/actions/tree_spec.js b/spec/frontend/ide/stores/actions/tree_spec.js index 37594512fe9..44e2fcab436 100644 --- a/spec/frontend/ide/stores/actions/tree_spec.js +++ b/spec/frontend/ide/stores/actions/tree_spec.js @@ -3,14 +3,16 @@ import testAction from 'helpers/vuex_action_helper'; import { showTreeEntry, getFiles, setDirectoryData } from '~/ide/stores/actions/tree'; import * as types from '~/ide/stores/mutation_types'; import axios from '~/lib/utils/axios_utils'; -import store from '~/ide/stores'; +import { createStore } from '~/ide/stores'; import service from '~/ide/services'; -import router from '~/ide/ide_router'; -import { file, resetStore, createEntriesFromPaths } from '../../helpers'; +import { createRouter } from '~/ide/ide_router'; +import { file, createEntriesFromPaths } from '../../helpers'; describe('Multi-file store tree actions', () => { let projectTree; let mock; + let store; + let router; const basicCallParameters = { endpoint: 'rootEndpoint', @@ -21,6 +23,8 @@ describe('Multi-file store tree actions', () => { }; beforeEach(() => { + store = createStore(); + router = createRouter(store); jest.spyOn(router, 'push').mockImplementation(); mock = new MockAdapter(axios); @@ -35,7 +39,6 @@ describe('Multi-file store tree actions', () => { afterEach(() => { mock.restore(); - resetStore(store); }); describe('getFiles', () => { diff --git a/spec/frontend/ide/stores/actions_spec.js b/spec/frontend/ide/stores/actions_spec.js index 666ed8a24aa..3b8762e2fd8 100644 --- a/spec/frontend/ide/stores/actions_spec.js +++ b/spec/frontend/ide/stores/actions_spec.js @@ -1,7 +1,7 @@ import MockAdapter from 'axios-mock-adapter'; import { visitUrl } from '~/lib/utils/url_utility'; import { createStore } from '~/ide/stores'; -import router from '~/ide/ide_router'; +import { createRouter } from '~/ide/ide_router'; import { stageAllChanges, unstageAllChanges, @@ -30,9 +30,11 @@ jest.mock('~/lib/utils/url_utility', () => ({ describe('Multi-file store actions', () => { let store; + let router; beforeEach(() => { store = createStore(); + router = createRouter(store); jest.spyOn(store, 'commit'); jest.spyOn(store, 'dispatch'); @@ -339,10 +341,12 @@ describe('Multi-file store actions', () => { it('adds all files from changedFiles to stagedFiles', () => { stageAllChanges(store); - expect(store.commit.mock.calls).toEqual([ - [types.SET_LAST_COMMIT_MSG, ''], - [types.STAGE_CHANGE, expect.objectContaining({ path: file1.path })], - ]); + expect(store.commit.mock.calls).toEqual( + expect.arrayContaining([ + [types.SET_LAST_COMMIT_MSG, ''], + [types.STAGE_CHANGE, expect.objectContaining({ path: file1.path })], + ]), + ); }); it('opens pending tab if a change exists in that file', () => { @@ -371,9 +375,11 @@ describe('Multi-file store actions', () => { it('removes all files from stagedFiles after unstaging', () => { unstageAllChanges(store); - expect(store.commit.mock.calls).toEqual([ - [types.UNSTAGE_CHANGE, expect.objectContaining({ path: file2.path })], - ]); + expect(store.commit.mock.calls).toEqual( + expect.arrayContaining([ + [types.UNSTAGE_CHANGE, expect.objectContaining({ path: file2.path })], + ]), + ); }); it('opens pending tab if a change exists in that file', () => { diff --git a/spec/frontend/ide/stores/modules/commit/actions_spec.js b/spec/frontend/ide/stores/modules/commit/actions_spec.js index 649c05441f6..52870d7bc75 100644 --- a/spec/frontend/ide/stores/modules/commit/actions_spec.js +++ b/spec/frontend/ide/stores/modules/commit/actions_spec.js @@ -1,10 +1,10 @@ -import { resetStore, file } from 'jest/ide/helpers'; +import { file } from 'jest/ide/helpers'; import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; import { visitUrl } from '~/lib/utils/url_utility'; import { createStore } from '~/ide/stores'; import service from '~/ide/services'; -import router from '~/ide/ide_router'; +import { createRouter } from '~/ide/ide_router'; import eventHub from '~/ide/eventhub'; import consts from '~/ide/stores/modules/commit/constants'; import * as mutationTypes from '~/ide/stores/modules/commit/mutation_types'; @@ -18,12 +18,15 @@ jest.mock('~/lib/utils/url_utility', () => ({ })); const TEST_COMMIT_SHA = '123456789'; -const store = createStore(); describe('IDE commit module actions', () => { let mock; + let store; + let router; beforeEach(() => { + store = createStore(); + router = createRouter(store); gon.api_version = 'v1'; mock = new MockAdapter(axios); jest.spyOn(router, 'push').mockImplementation(); @@ -34,7 +37,6 @@ describe('IDE commit module actions', () => { afterEach(() => { delete gon.api_version; mock.restore(); - resetStore(store); }); describe('updateCommitMessage', () => { diff --git a/spec/frontend/ide/sync_router_and_store_spec.js b/spec/frontend/ide/sync_router_and_store_spec.js index c691a196916..c4ce92b99cc 100644 --- a/spec/frontend/ide/sync_router_and_store_spec.js +++ b/spec/frontend/ide/sync_router_and_store_spec.js @@ -1,14 +1,10 @@ -import Vue from 'vue'; import VueRouter from 'vue-router'; -import Vuex from 'vuex'; -import routerModule from '~/ide/stores/modules/router'; +import { createStore } from '~/ide/stores'; import { syncRouterAndStore } from '~/ide/sync_router_and_store'; import waitForPromises from 'helpers/wait_for_promises'; const TEST_ROUTE = '/test/lorem/ipsum'; -Vue.use(Vuex); - describe('~/ide/sync_router_and_store', () => { let unsync; let router; @@ -32,11 +28,7 @@ describe('~/ide/sync_router_and_store', () => { beforeEach(() => { router = new VueRouter(); - store = new Vuex.Store({ - modules: { - router: routerModule, - }, - }); + store = createStore(); jest.spyOn(store, 'dispatch'); onRouterChange = jest.fn(); diff --git a/spec/frontend/lib/utils/common_utils_spec.js b/spec/frontend/lib/utils/common_utils_spec.js index 11debfe12a1..f597255538c 100644 --- a/spec/frontend/lib/utils/common_utils_spec.js +++ b/spec/frontend/lib/utils/common_utils_spec.js @@ -589,6 +589,7 @@ describe('common_utils', () => { id: 1, group_name: 'GitLab.org', absolute_web_url: 'https://gitlab.com/gitlab-org/', + milestones: ['12.3', '12.4'], }, objNested: { project_name: 'GitLab CE', @@ -599,6 +600,7 @@ describe('common_utils', () => { frontend_framework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, }, convertObjectPropsToCamelCase: { @@ -606,6 +608,7 @@ describe('common_utils', () => { id: 1, group_name: 'GitLab.org', absolute_web_url: 'https://gitlab.com/gitlab-org/', + milestones: ['12.3', '12.4'], }, objNested: { project_name: 'GitLab CE', @@ -616,6 +619,7 @@ describe('common_utils', () => { frontend_framework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, }, convertObjectPropsToSnakeCase: { @@ -623,6 +627,7 @@ describe('common_utils', () => { id: 1, groupName: 'GitLab.org', absoluteWebUrl: 'https://gitlab.com/gitlab-org/', + milestones: ['12.3', '12.4'], }, objNested: { projectName: 'GitLab CE', @@ -633,6 +638,7 @@ describe('common_utils', () => { frontendFramework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, }, }; @@ -669,16 +675,19 @@ describe('common_utils', () => { id_converted: 1, group_name_converted: 'GitLab.org', absolute_web_url_converted: 'https://gitlab.com/gitlab-org/', + milestones_converted: ['12.3', '12.4'], }, convertObjectPropsToCamelCase: { id: 1, groupName: 'GitLab.org', absoluteWebUrl: 'https://gitlab.com/gitlab-org/', + milestones: ['12.3', '12.4'], }, convertObjectPropsToSnakeCase: { id: 1, group_name: 'GitLab.org', absolute_web_url: 'https://gitlab.com/gitlab-org/', + milestones: ['12.3', '12.4'], }, }; @@ -696,6 +705,7 @@ describe('common_utils', () => { frontend_framework: 'Vue', database: 'PostgreSQL', }, + milestones_converted: ['12.3', '12.4'], }, convertObjectPropsToCamelCase: { projectName: 'GitLab CE', @@ -706,6 +716,7 @@ describe('common_utils', () => { frontend_framework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, convertObjectPropsToSnakeCase: { project_name: 'GitLab CE', @@ -716,6 +727,7 @@ describe('common_utils', () => { frontendFramework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, }; @@ -734,6 +746,7 @@ describe('common_utils', () => { frontend_framework_converted: 'Vue', database_converted: 'PostgreSQL', }, + milestones_converted: ['12.3', '12.4'], }, convertObjectPropsToCamelCase: { projectName: 'GitLab CE', @@ -744,6 +757,7 @@ describe('common_utils', () => { frontendFramework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, convertObjectPropsToSnakeCase: { project_name: 'GitLab CE', @@ -754,6 +768,7 @@ describe('common_utils', () => { frontend_framework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, }; @@ -783,6 +798,7 @@ describe('common_utils', () => { frontend_framework: 'Vue', database: 'PostgreSQL', }, + milestones_converted: ['12.3', '12.4'], }, convertObjectPropsToCamelCase: { projectName: 'GitLab CE', @@ -792,6 +808,7 @@ describe('common_utils', () => { frontend_framework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, convertObjectPropsToSnakeCase: { project_name: 'GitLab CE', @@ -801,6 +818,7 @@ describe('common_utils', () => { frontendFramework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, }; @@ -826,6 +844,7 @@ describe('common_utils', () => { backend_converted: 'Ruby', frontend_framework_converted: 'Vue', }, + milestones_converted: ['12.3', '12.4'], }, convertObjectPropsToCamelCase: { projectName: 'GitLab CE', @@ -834,6 +853,7 @@ describe('common_utils', () => { backend: 'Ruby', frontendFramework: 'Vue', }, + milestones: ['12.3', '12.4'], }, convertObjectPropsToSnakeCase: { project_name: 'GitLab CE', @@ -842,6 +862,7 @@ describe('common_utils', () => { backend: 'Ruby', frontend_framework: 'Vue', }, + milestones: ['12.3', '12.4'], }, }; @@ -872,6 +893,7 @@ describe('common_utils', () => { frontend_framework: 'Vue', database: 'PostgreSQL', }, + milestones_converted: ['12.3', '12.4'], }, convertObjectPropsToCamelCase: { projectName: 'GitLab CE', @@ -882,6 +904,7 @@ describe('common_utils', () => { frontend_framework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, convertObjectPropsToSnakeCase: { project_name: 'GitLab CE', @@ -892,6 +915,7 @@ describe('common_utils', () => { frontendFramework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, }; @@ -919,6 +943,7 @@ describe('common_utils', () => { frontend_framework: 'Vue', database_converted: 'PostgreSQL', }, + milestones_converted: ['12.3', '12.4'], }, convertObjectPropsToCamelCase: { projectName: 'GitLab CE', @@ -929,6 +954,7 @@ describe('common_utils', () => { frontend_framework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, convertObjectPropsToSnakeCase: { project_name: 'GitLab CE', @@ -939,6 +965,7 @@ describe('common_utils', () => { frontendFramework: 'Vue', database: 'PostgreSQL', }, + milestones: ['12.3', '12.4'], }, }; |