diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-20 03:06:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-20 03:06:22 +0300 |
commit | 5a3f1ba53bf875a73f800909e8559d15dfab4339 (patch) | |
tree | d59abd1b468ae972040f3c0b667877ffc26a61b5 /spec | |
parent | 3d5ad15d2bf62ca70b1628afb64c5476e408781c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r-- | spec/frontend/error_tracking/components/error_details_spec.js | 12 | ||||
-rw-r--r-- | spec/helpers/projects/error_tracking_helper_spec.rb | 5 | ||||
-rw-r--r-- | spec/helpers/projects_helper_spec.rb | 1 |
3 files changed, 16 insertions, 2 deletions
diff --git a/spec/frontend/error_tracking/components/error_details_spec.js b/spec/frontend/error_tracking/components/error_details_spec.js index 54e8b0848a2..ddc17dea291 100644 --- a/spec/frontend/error_tracking/components/error_details_spec.js +++ b/spec/frontend/error_tracking/components/error_details_spec.js @@ -1,6 +1,6 @@ import { createLocalVue, shallowMount } from '@vue/test-utils'; import Vuex from 'vuex'; -import { GlLoadingIcon, GlLink } from '@gitlab/ui'; +import { GlButton, GlLoadingIcon, GlLink } from '@gitlab/ui'; import Stacktrace from '~/error_tracking/components/stacktrace.vue'; import ErrorDetails from '~/error_tracking/components/error_details.vue'; @@ -20,6 +20,7 @@ describe('ErrorDetails', () => { propsData: { issueDetailsPath: '/123/details', issueStackTracePath: '/stacktrace', + issueProjectPath: '/test-project/issues/new', }, }); } @@ -82,6 +83,15 @@ describe('ErrorDetails', () => { expect(wrapper.find(Stacktrace).exists()).toBe(false); }); + it('should allow a blank issue to be created', () => { + store.state.details.loading = false; + store.state.details.error.id = 1; + mountComponent(); + const button = wrapper.find(GlButton); + expect(button.exists()).toBe(true); + expect(button.attributes().href).toBe(wrapper.props().issueProjectPath); + }); + describe('Stacktrace', () => { it('should show stacktrace', () => { store.state.details.loading = false; diff --git a/spec/helpers/projects/error_tracking_helper_spec.rb b/spec/helpers/projects/error_tracking_helper_spec.rb index 5e7449e21b7..fdffdca22fb 100644 --- a/spec/helpers/projects/error_tracking_helper_spec.rb +++ b/spec/helpers/projects/error_tracking_helper_spec.rb @@ -81,6 +81,7 @@ describe Projects::ErrorTrackingHelper do let(:route_params) { [project.owner, project, issue_id, { format: :json }] } let(:details_path) { details_namespace_project_error_tracking_index_path(*route_params) } let(:stack_trace_path) { stack_trace_namespace_project_error_tracking_index_path(*route_params) } + let(:issue_project_path) { new_project_issue_path(project) } let(:result) { helper.error_details_data(project, issue_id) } @@ -91,5 +92,9 @@ describe Projects::ErrorTrackingHelper do it 'returns the correct stack trace path' do expect(result['issue-stack-trace-path']).to eq stack_trace_path end + + it 'returns the correct path for creating a new issue' do + expect(result['issue-project-path']).to eq issue_project_path + end end end diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index f9a95a96de1..0db54599ede 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -506,7 +506,6 @@ describe ProjectsHelper do it 'returns the command to push to create project over SSH' do allow(Gitlab::CurrentSettings.current_application_settings).to receive(:enabled_git_access_protocol) { 'ssh' } - allow(Gitlab.config.gitlab_shell).to receive(:ssh_path_prefix).and_return('git@localhost:') expect(helper.push_to_create_project_command(user)).to eq("git push --set-upstream #{Gitlab.config.gitlab.user}@localhost:john/$(git rev-parse --show-toplevel | xargs basename).git $(git rev-parse --abbrev-ref HEAD)") end |