Skip to content
Snippets Groups Projects
Commit cd15d0e6 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent dd6afb4b
No related branches found
No related tags found
No related merge requests found
Showing
with 137 additions and 49 deletions
Loading
Loading
@@ -11641,7 +11641,7 @@ msgstr ""
msgid "No files found."
msgstr ""
 
msgid "No forks available to you."
msgid "No forks are available to you."
msgstr ""
 
msgid "No issues for the selected time period."
Loading
Loading
@@ -18447,7 +18447,7 @@ msgstr ""
msgid "To preserve performance only <strong>%{display_size} of %{real_size}</strong> files are displayed."
msgstr ""
 
msgid "To protect this issue's confidentiality, %{link_start}fork the project%{link_end} and set the forks visibility to private."
msgid "To protect this issue's confidentiality, %{forkLink} and set the fork's visibility to private."
msgstr ""
 
msgid "To protect this issue's confidentiality, a private fork of this project was selected."
Loading
Loading
@@ -21049,6 +21049,9 @@ msgstr ""
msgid "for this project"
msgstr ""
 
msgid "fork this project"
msgstr ""
msgid "from"
msgstr ""
 
Loading
Loading
Loading
Loading
@@ -2,13 +2,13 @@
 
FactoryBot.define do
factory :detailed_error_tracking_error, class: Gitlab::ErrorTracking::DetailedError do
id { 'id' }
id { '1' }
title { 'title' }
type { 'error' }
user_count { 1 }
count { 2 }
first_seen { Time.now }
last_seen { Time.now }
first_seen { Time.now.iso8601 }
last_seen { Time.now.iso8601 }
message { 'message' }
culprit { 'culprit' }
external_url { 'http://example.com/id' }
Loading
Loading
@@ -18,7 +18,11 @@ FactoryBot.define do
project_slug { 'project_name' }
short_id { 'ID' }
status { 'unresolved' }
frequency { [] }
frequency do
[
[Time.now.to_i, 10]
]
end
first_release_last_commit { '68c914da9' }
last_release_last_commit { '9ad419c86' }
first_release_short_version { 'abc123' }
Loading
Loading
Loading
Loading
@@ -29,7 +29,7 @@ describe 'User creates confidential merge request on issue page', :js do
click_button 'Create confidential merge request'
 
page.within '.create-confidential-merge-request-dropdown-menu' do
expect(page).to have_content('No forks available to you')
expect(page).to have_content('No forks are available to you')
end
end
end
Loading
Loading
Loading
Loading
@@ -15,19 +15,12 @@ exports[`Confidential merge request project form group component renders empty s
class="text-muted mt-1 mb-0"
>
No forks available to you.
No forks are available to you.
<br />
<span>
To protect this issue's confidentiality,
<a
class="help-link"
href="https://test.com"
>
fork the project
</a>
and set the forks visibility to private.
</span>
<glsprintf-stub
message="To protect this issue's confidentiality, %{forkLink} and set the fork's visibility to private."
/>
<gllink-stub
class="w-auto p-0 d-inline-block text-primary bg-transparent"
Loading
Loading
@@ -65,19 +58,12 @@ exports[`Confidential merge request project form group component renders fork dr
class="text-muted mt-1 mb-0"
>
No forks available to you.
No forks are available to you.
<br />
<span>
To protect this issue's confidentiality,
<a
class="help-link"
href="https://test.com"
>
fork the project
</a>
and set the forks visibility to private.
</span>
<glsprintf-stub
message="To protect this issue's confidentiality, %{forkLink} and set the fork's visibility to private."
/>
<gllink-stub
class="w-auto p-0 d-inline-block text-primary bg-transparent"
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
describe Resolvers::ErrorTracking::SentryDetailedErrorResolver do
include GraphqlHelpers
let_it_be(:project) { create(:project) }
let_it_be(:current_user) { create(:user) }
let(:issue_details_service) { spy('ErrorTracking::IssueDetailsService') }
before do
project.add_developer(current_user)
allow(ErrorTracking::IssueDetailsService)
.to receive(:new)
.and_return issue_details_service
end
describe '#resolve' do
let(:args) { { id: issue_global_id(1234) } }
it 'fetches the data via the sentry API' do
resolve_error(args)
expect(issue_details_service).to have_received(:execute)
end
context 'error matched' do
let(:detailed_error) { build(:detailed_error_tracking_error) }
before do
allow(issue_details_service).to receive(:execute)
.and_return({ issue: detailed_error })
end
it 'resolves to a detailed error' do
expect(resolve_error(args)).to eq detailed_error
end
it 'assigns the gitlab project' do
expect(resolve_error(args).gitlab_project).to eq project
end
end
it 'resolves to nil if no match' do
allow(issue_details_service).to receive(:execute)
.and_return({ issue: nil })
result = resolve_error(args)
expect(result).to eq nil
end
end
def resolve_error(args = {}, context = { current_user: current_user })
resolve(described_class, obj: project, args: args, ctx: context)
end
def issue_global_id(issue_id)
Gitlab::ErrorTracking::DetailedError.new(id: issue_id).to_global_id.to_s
end
end
# frozen_string_literal: true
require 'spec_helper'
describe GitlabSchema.types['SentryDetailedError'] do
it { expect(described_class.graphql_name).to eq('SentryDetailedError') }
it { expect(described_class).to require_graphql_authorizations(:read_sentry_issue) }
it 'exposes the expected fields' do
expected_fields = %i[
id
sentryId
title
type
userCount
count
firstSeen
lastSeen
message
culprit
externalUrl
sentryProjectId
sentryProjectName
sentryProjectSlug
shortId
status
frequency
firstReleaseLastCommit
lastReleaseLastCommit
firstReleaseShortVersion
lastReleaseShortVersion
]
is_expected.to have_graphql_fields(*expected_fields)
end
end
Loading
Loading
@@ -22,8 +22,7 @@ describe GitlabSchema.types['Project'] do
only_allow_merge_if_pipeline_succeeds request_access_enabled
only_allow_merge_if_all_discussions_are_resolved printing_merge_request_link_enabled
namespace group statistics repository merge_requests merge_request issues
issue pipelines
removeSourceBranchAfterMerge
issue pipelines removeSourceBranchAfterMerge sentryDetailedError
]
 
is_expected.to have_graphql_fields(*expected_fields)
Loading
Loading
import Vue from 'vue';
import BarChart from '~/vue_shared/components/bar_chart.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import BarChart from '~/vue_shared/components/bar_chart.vue';
 
function getRandomArbitrary(min, max) {
return Math.random() * (max - min) + min;
Loading
Loading
import Vue from 'vue';
import ciBadge from '~/vue_shared/components/ci_badge_link.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import ciBadge from '~/vue_shared/components/ci_badge_link.vue';
 
describe('CI Badge Link Component', () => {
let CIBadge;
Loading
Loading
import Vue from 'vue';
import ciIcon from '~/vue_shared/components/ci_icon.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import ciIcon from '~/vue_shared/components/ci_icon.vue';
 
describe('CI Icon component', () => {
const Component = Vue.extend(ciIcon);
Loading
Loading
import Vue from 'vue';
import MockAdapter from 'axios-mock-adapter';
import axios from '~/lib/utils/axios_utils';
import contentViewer from '~/vue_shared/components/content_viewer/content_viewer.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import { GREEN_BOX_IMAGE_URL } from 'spec/test_constants';
import axios from '~/lib/utils/axios_utils';
import contentViewer from '~/vue_shared/components/content_viewer/content_viewer.vue';
import '~/behaviors/markdown/render_gfm';
 
describe('ContentViewer', () => {
Loading
Loading
import $ from 'jquery';
import Vue from 'vue';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
 
const modalComponent = Vue.extend(DeprecatedModal2);
 
Loading
Loading
import $ from 'jquery';
import Vue from 'vue';
import DeprecatedModal from '~/vue_shared/components/deprecated_modal.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import DeprecatedModal from '~/vue_shared/components/deprecated_modal.vue';
 
const modalComponent = Vue.extend(DeprecatedModal);
 
Loading
Loading
import Vue from 'vue';
 
import diffViewer from '~/vue_shared/components/diff_viewer/diff_viewer.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import { GREEN_BOX_IMAGE_URL, RED_BOX_IMAGE_URL } from 'spec/test_constants';
import diffViewer from '~/vue_shared/components/diff_viewer/diff_viewer.vue';
 
describe('DiffViewer', () => {
const requiredProps = {
Loading
Loading
import Vue from 'vue';
import imageDiffViewer from '~/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import { GREEN_BOX_IMAGE_URL, RED_BOX_IMAGE_URL } from 'spec/test_constants';
import imageDiffViewer from '~/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue';
 
describe('ImageDiffViewer', () => {
const requiredProps = {
Loading
Loading
import Vue from 'vue';
 
import dropdownButtonComponent from '~/vue_shared/components/dropdown/dropdown_button.vue';
import { mountComponentWithSlots } from 'spec/helpers/vue_mount_component_helper';
import dropdownButtonComponent from '~/vue_shared/components/dropdown/dropdown_button.vue';
 
const defaultLabel = 'Select';
const customLabel = 'Select project';
Loading
Loading
import Vue from 'vue';
 
import dropdownHiddenInputComponent from '~/vue_shared/components/dropdown/dropdown_hidden_input.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import dropdownHiddenInputComponent from '~/vue_shared/components/dropdown/dropdown_hidden_input.vue';
 
import { mockLabels } from './mock_data';
 
Loading
Loading
import Vue from 'vue';
 
import dropdownSearchInputComponent from '~/vue_shared/components/dropdown/dropdown_search_input.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import dropdownSearchInputComponent from '~/vue_shared/components/dropdown/dropdown_search_input.vue';
 
const componentConfig = {
placeholderText: 'Search something',
Loading
Loading
import Vue from 'vue';
import Mousetrap from 'mousetrap';
import FindFileComponent from '~/vue_shared/components/file_finder/index.vue';
import { UP_KEY_CODE, DOWN_KEY_CODE, ENTER_KEY_CODE, ESC_KEY_CODE } from '~/lib/utils/keycodes';
import { file } from 'spec/ide/helpers';
import timeoutPromise from 'spec/helpers/set_timeout_promise_helper';
import FindFileComponent from '~/vue_shared/components/file_finder/index.vue';
import { UP_KEY_CODE, DOWN_KEY_CODE, ENTER_KEY_CODE, ESC_KEY_CODE } from '~/lib/utils/keycodes';
 
describe('File finder item spec', () => {
const Component = Vue.extend(FindFileComponent);
Loading
Loading
import Vue from 'vue';
import ItemComponent from '~/vue_shared/components/file_finder/item.vue';
import { file } from 'spec/ide/helpers';
import ItemComponent from '~/vue_shared/components/file_finder/item.vue';
import createComponent from '../../../helpers/vue_mount_component_helper';
 
describe('File finder item spec', () => {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment