diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-12-19 12:22:11 +0100 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-12-19 12:26:02 +0100 |
commit | 491aac4a93f55d89b92e8809bd9dd64a881f91d9 (patch) | |
tree | d0b44e8cd7bfac5c3de26cf426e05f1a4dec46cb | |
parent | ed5e0d6b9ede2b3f4681dff8dc6f2d9df344d3c8 (diff) | |
download | gitlab-ce-tz-basic-ide-setup.tar.gz |
Fix for visitUrl Test + Linting Errorstz-basic-ide-setup40040-decouple-multi-file-editor-from-file-list
-rw-r--r-- | app/assets/javascripts/ide/stores/actions.js | 8 | ||||
-rw-r--r-- | app/views/projects/tree/_tree_header.html.haml | 6 | ||||
-rw-r--r-- | spec/javascripts/repo/stores/actions_spec.js | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/app/assets/javascripts/ide/stores/actions.js b/app/assets/javascripts/ide/stores/actions.js index 069f94a2026..c01046c8c76 100644 --- a/app/assets/javascripts/ide/stores/actions.js +++ b/app/assets/javascripts/ide/stores/actions.js @@ -15,7 +15,7 @@ export const closeDiscardPopup = ({ commit }) => export const discardAllChanges = ({ commit, getters, dispatch }) => { const changedFiles = getters.changedFiles; - changedFiles.forEach(file => { + changedFiles.forEach((file) => { commit(types.DISCARD_FILE_CHANGES, file); if (file.tempFile) { @@ -66,7 +66,7 @@ export const setPanelCollapsedStatus = ({ commit }, { side, collapsed }) => { export const checkCommitStatus = ({ state }) => service .getBranchData(state.currentProjectId, state.currentBranchId) - .then(data => { + .then((data) => { const { id } = data.commit; const selectedBranch = state.projects[state.currentProjectId].branches[state.currentBranchId]; @@ -85,7 +85,7 @@ export const commitChanges = ( ) => service .commit(state.currentProjectId, payload) - .then(data => { + .then((data) => { const { branch } = payload; if (!data.short_id) { flash(data.message); @@ -122,7 +122,7 @@ export const commitChanges = ( reference: data.id, }); - getters.changedFiles.forEach(entry => { + getters.changedFiles.forEach((entry) => { commit(types.SET_LAST_COMMIT_DATA, { entry, lastCommit, diff --git a/app/views/projects/tree/_tree_header.html.haml b/app/views/projects/tree/_tree_header.html.haml index f10eb15b0c6..d1ecef39475 100644 --- a/app/views/projects/tree/_tree_header.html.haml +++ b/app/views/projects/tree/_tree_header.html.haml @@ -6,7 +6,7 @@ - addtotree_toggle_attributes = { href: '#', 'data-toggle': 'dropdown', 'data-target': '.add-to-tree-dropdown' } - else - addtotree_toggle_attributes = { title: _("You can only add files when you are on a branch"), data: { container: 'body' }, class: 'disabled has-tooltip' } - + %ul.breadcrumb.repo-breadcrumb %li = link_to project_tree_path(@project, @ref) do @@ -14,7 +14,7 @@ - path_breadcrumbs do |title, path| %li = link_to truncate(title, length: 40), project_tree_path(@project, tree_join(@ref, path)) - + - if current_user %li %a.btn.add-to-tree{ addtotree_toggle_attributes } @@ -58,7 +58,7 @@ continue: continue_params) = link_to fork_path, method: :post do #{ _('New directory') } - + %li.divider %li = link_to new_project_branch_path(@project) do diff --git a/spec/javascripts/repo/stores/actions_spec.js b/spec/javascripts/repo/stores/actions_spec.js index dfa3d47d4e5..0b0d34f072a 100644 --- a/spec/javascripts/repo/stores/actions_spec.js +++ b/spec/javascripts/repo/stores/actions_spec.js @@ -230,7 +230,7 @@ describe('Multi-file store actions', () => { store.state.currentProjectId = 'abcproject'; store.state.currentBranchId = 'master'; store.state.projects.abcproject = { - new_merge_request_path: 'newMergeRequestUrl?branch=', + web_url: 'webUrl', branches: { master: { workingReference: '1', @@ -327,7 +327,7 @@ describe('Multi-file store actions', () => { store.dispatch('commitChanges', { payload, newMr: true }) .then(() => { - expect(urlUtils.visitUrl).toHaveBeenCalledWith('newMergeRequestUrl?branch=master'); + expect(urlUtils.visitUrl).toHaveBeenCalledWith('webUrl/merge_requests/new?merge_request%5Bsource_branch%5D=master'); done(); }).catch(done.fail); |