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

Add latest changes from gitlab-org/gitlab@master

parent ee7fba4b
No related branches found
No related tags found
No related merge requests found
Showing
with 101 additions and 69 deletions
Loading
Loading
@@ -150,7 +150,7 @@ gem 'wikicloth', '0.8.1'
gem 'asciidoctor', '~> 2.0.10'
gem 'asciidoctor-include-ext', '~> 0.3.1', require: false
gem 'asciidoctor-plantuml', '0.0.10'
gem 'rouge', '~> 3.11.0'
gem 'rouge', '~> 3.15.0'
gem 'truncato', '~> 0.7.11'
gem 'bootstrap_form', '~> 4.2.0'
gem 'nokogiri', '~> 1.10.5'
Loading
Loading
Loading
Loading
@@ -873,7 +873,7 @@ GEM
retriable (3.1.2)
rinku (2.0.0)
rotp (2.1.2)
rouge (3.11.0)
rouge (3.15.0)
rqrcode (0.7.0)
chunky_png
rqrcode-rails3 (0.1.7)
Loading
Loading
Loading
Loading
@@ -163,7 +163,7 @@ export const createCommitPayload = ({
});
 
export const createNewMergeRequestUrl = (projectUrl, source, target) =>
`${projectUrl}/merge_requests/new?merge_request[source_branch]=${source}&merge_request[target_branch]=${target}&nav_source=webide`;
`${projectUrl}/-/merge_requests/new?merge_request[source_branch]=${source}&merge_request[target_branch]=${target}&nav_source=webide`;
 
const sortTreesByTypeAndName = (a, b) => {
if (a.type === 'tree' && b.type === 'blob') {
Loading
Loading
Loading
Loading
@@ -32,17 +32,17 @@ import { __ } from './locale';
//
// <ul class="nav-links merge-request-tabs">
// <li class="notes-tab active">
// <a data-action="notes" data-target="#notes" data-toggle="tab" href="/foo/bar/merge_requests/1">
// <a data-action="notes" data-target="#notes" data-toggle="tab" href="/foo/bar/-/merge_requests/1">
// Discussion
// </a>
// </li>
// <li class="commits-tab">
// <a data-action="commits" data-target="#commits" data-toggle="tab" href="/foo/bar/merge_requests/1/commits">
// <a data-action="commits" data-target="#commits" data-toggle="tab" href="/foo/bar/-/merge_requests/1/commits">
// Commits
// </a>
// </li>
// <li class="diffs-tab">
// <a data-action="diffs" data-target="#diffs" data-toggle="tab" href="/foo/bar/merge_requests/1/diffs">
// <a data-action="diffs" data-target="#diffs" data-toggle="tab" href="/foo/bar/-/merge_requests/1/diffs">
// Diffs
// </a>
// </li>
Loading
Loading
@@ -260,17 +260,17 @@ export default class MergeRequestTabs {
//
// Examples:
//
// location.pathname # => "/namespace/project/merge_requests/1"
// location.pathname # => "/namespace/project/-/merge_requests/1"
// setCurrentAction('diffs')
// location.pathname # => "/namespace/project/merge_requests/1/diffs"
// location.pathname # => "/namespace/project/-/merge_requests/1/diffs"
//
// location.pathname # => "/namespace/project/merge_requests/1/diffs"
// location.pathname # => "/namespace/project/-/merge_requests/1/diffs"
// setCurrentAction('show')
// location.pathname # => "/namespace/project/merge_requests/1"
// location.pathname # => "/namespace/project/-/merge_requests/1"
//
// location.pathname # => "/namespace/project/merge_requests/1/diffs"
// location.pathname # => "/namespace/project/-/merge_requests/1/diffs"
// setCurrentAction('commits')
// location.pathname # => "/namespace/project/merge_requests/1/commits"
// location.pathname # => "/namespace/project/-/merge_requests/1/commits"
//
// Returns the new URL String
setCurrentAction(action) {
Loading
Loading
Loading
Loading
@@ -62,7 +62,7 @@ module ChatMessage
end
 
def merge_request_url
"#{project_url}/merge_requests/#{merge_request_iid}"
"#{project_url}/-/merge_requests/#{merge_request_iid}"
end
 
# overridden in EE
Loading
Loading
Loading
Loading
@@ -184,7 +184,7 @@ class HipchatService < Service
description = obj_attr[:description]
title = render_line(obj_attr[:title])
 
merge_request_url = "#{project_url}/merge_requests/#{merge_request_id}"
merge_request_url = "#{project_url}/-/merge_requests/#{merge_request_id}"
merge_request_link = "<a href=\"#{merge_request_url}\">merge request !#{merge_request_id}</a>"
message = ["#{user_name} #{state} #{merge_request_link} in " \
"#{project_link}: <b>#{title}</b>"]
Loading
Loading
Loading
Loading
@@ -15,8 +15,8 @@ module Secpick
DEFAULT_REMOTE = 'dev'.freeze
SECURITY_REMOTE = 'security'.freeze
 
NEW_MR_URL = 'https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/new'.freeze
SECURITY_MR_URL = 'https://gitlab.com/gitlab-org/security/gitlab/merge_requests/new'.freeze
NEW_MR_URL = 'https://dev.gitlab.org/gitlab/gitlabhq/-/merge_requests/new'.freeze
SECURITY_MR_URL = 'https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/new'.freeze
 
class SecurityFix
def initialize
Loading
Loading
---
title: Move merge request routes under /-/ scope
merge_request: 21126
author:
type: deprecated
Loading
Loading
@@ -281,6 +281,8 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end
end
 
draw :merge_requests
# The wiki and repository routing contains wildcard characters so
# its preferable to keep it below all other project routes
draw :repository_scoped
Loading
Loading
@@ -339,17 +341,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end
end
 
# Unscoped route. It will be replaced with redirect to /-/merge_requests/
# Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
draw :merge_requests
# To ensure an old unscoped routing is used for the UI we need to
# add prefix 'as' to the scope routing and place it below original MR routing.
# Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
scope '-', as: 'scoped' do
draw :merge_requests
end
resources :pipelines, only: [:index, :new, :create, :show, :destroy] do
collection do
resource :pipelines_settings, path: 'settings', only: [:show, :update]
Loading
Loading
@@ -510,7 +501,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
:forks, :group_links, :import, :avatar, :mirror,
:cycle_analytics, :mattermost, :variables, :triggers,
:environments, :protected_environments, :error_tracking,
:serverless, :clusters, :audit_events, :wikis)
:serverless, :clusters, :audit_events, :wikis, :merge_requests)
end
 
# rubocop: disable Cop/PutProjectRoutesUnderScope
Loading
Loading
Loading
Loading
@@ -56,13 +56,16 @@ possible.
 
The GraphQL API includes the following queries at the root level:
 
1. `project` : Project information, with many of its associations such as issues and merge requests also available.
1. `project` : Project information, with many of its associations such as issues and merge requests.
1. `group` : Basic group information and epics **(ULTIMATE)** are currently supported.
1. `namespace` : Within a namespace it is also possible to fetch `projects`.
1. `currentUser`: Information about the currently logged in user.
1. `metaData`: Metadata about GitLab and the GraphQL API.
1. `snippets`: Snippets visible to the currently logged in user.
 
New associations and root level objects are constantly being added.
See the [GraphQL API Reference](reference/index.md) for up-to-date information.
Root-level queries are defined in
[`app/graphql/types/query_type.rb`](https://gitlab.com/gitlab-org/gitlab/blob/master/app/graphql/types/query_type.rb).
 
Loading
Loading
Loading
Loading
@@ -4,31 +4,56 @@ description: "Learn how long your open merge requests have spent in code review,
 
# Code Review Analytics **(STARTER)**
 
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/38062) in GitLab ([Starter](https://about.gitlab.com/pricing/)) 12.7.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/38062) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.7.
 
Want to learn how long your open merge requests have spent in code review? Or what distinguishes your longest-running code reviews? These are some of the questions Code Review Analytics is designed to answer.
Code Review Analytics can be used to answer questions like:
- How long do open merge requests spend in code review?
- What distinguishes your longest-running code reviews?
 
NOTE: **Note:**
Initially no data will appear. Data will populate as users comment on open merge requests.
Initially no data will appear. Data is populated as users comment on open merge requests.
 
## Overview
 
Code Review Analytics displays a collection of merge requests in a table. These are all the open merge requests that are considered to be in code review. This feature considers code review to begin when a merge request receives its first comment from someone other than the author. The rows of the table are sorted by review time so the longest reviews appear at the top. There are also columns to display the author, approvers, comment count, and line -/+ counts.
Code Review Analytics displays a table of open merge requests, which are considered to be in code review.
Code review starts when a merge request receives its first comment from someone other than the author.
The Code Review Analytics table:
- Is sorted by review time, so the longest reviews appear at the top.
- Has columns to display the author, approvers, comment count, and line -/+ counts.
This feature is designed for [development team leaders](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#delaney-development-team-lead)
and others who want to understand broad code review dynamics, and identify patterns to help explain them.
 
This feature is designed for [development team leaders](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#delaney-development-team-lead) and others who want to understand broad code review dynamics, and identify patterns to help explain them. You can use Code Review Analytics to expose your team's unique challenges with code review, and identify improvements that might substantially accelerate your development cycle.
You can use Code Review Analytics to expose your team's unique challenges with code review, and
identify improvements that might substantially accelerate your development cycle.
 
## Use cases
 
Perhaps your team agrees that code review is moving too slow, or the [Cycle Analytics feature](https://docs.gitlab.com/ee/user/analytics/cycle_analytics.html) shows that "Review" is your team's most time-consuming step. You can use Code Review Analytics to see what is currently moving slowest, and analyze the patterns and trends between them. Lots of comments or commits? Maybe the code is too complex. A particular author is involved? Maybe more training is advisable. Few comments and approvers? Maybe your team is understaffed.
Code Review Analytics can be used when:
- Your team agrees that code review is moving too slow.
- The [Cycle Analytics feature](cycle_analytics.md) shows that reviews are your team's most time-consuming step.
You can use Code Review Analytics to see what is currently moving slowest, and analyze the patterns
and trends between them. For example:
- Lots of comments or commits? Maybe the code is too complex.
- A particular author is involved? Maybe more training is required.
- Few comments and approvers? Maybe your team is understaffed.
 
## Permissions
 
- On [Starter or Bronze tier](https://about.gitlab.com/pricing/) and above.
- By users with [Reporter access] and above.
- By users with Reporter access and above.
 
## Feature flag
## Disable with feature flag
 
Code Review Analytics is [currently protected by a feature flag](https://gitlab.com/gitlab-org/gitlab/issues/194165) that defaults to "enabled" - meaning the feature is available. If you experience performance problems or otherwise wish to disable the feature, a GitLab administrator can execute a command in a Rails console:
Code Review Analytics is [currently enabled by a feature flag](https://gitlab.com/gitlab-org/gitlab/issues/194165)
that defaults to ON, meaning the feature is available. If you experience performance problems or
otherwise wish to disable the feature, a GitLab administrator can execute a command in a Rails console:
 
```ruby
Feature.disable(:code_review_analytics)
Loading
Loading
Loading
Loading
@@ -16,11 +16,11 @@ Once enabled, click on **Analytics** from the top navigation bar.
From the centralized analytics workspace, the following analytics are available:
 
- [Code Review Analytics](code_review_analytics.md), enabled with the `code_review_analytics`
[feature flag](../../development/feature_flags/development.html#enabling-a-feature-flag-in-development). **(STARTER)**
[feature flag](../../development/feature_flags/development.md#enabling-a-feature-flag-in-development). **(STARTER)**
- [Cycle Analytics](cycle_analytics.md), enabled with the `cycle_analytics`
[feature flag](../../development/feature_flags/development.html#enabling-a-feature-flag-in-development). **(PREMIUM)**
[feature flag](../../development/feature_flags/development.md#enabling-a-feature-flag-in-development). **(PREMIUM)**
- [Productivity Analytics](productivity_analytics.md), enabled with the `productivity_analytics`
[feature flag](../../development/feature_flags/development.html#enabling-a-feature-flag-in-development). **(PREMIUM)**
[feature flag](../../development/feature_flags/development.md#enabling-a-feature-flag-in-development). **(PREMIUM)**
 
NOTE: **Note:**
Project-level Cycle Analytics are still available at a project's **Project > Cycle Analytics**.
Loading
Loading
Loading
Loading
@@ -53,11 +53,11 @@ Disallow: /*/*/milestones/new
Disallow: /*/*/milestones/*/edit
Disallow: /*/*/issues/new
Disallow: /*/*/issues/*/edit
Disallow: /*/*/merge_requests/new
Disallow: /*/*/merge_requests/*.patch
Disallow: /*/*/merge_requests/*.diff
Disallow: /*/*/merge_requests/*/edit
Disallow: /*/*/merge_requests/*/diffs
Disallow: /*/*/-/merge_requests/new
Disallow: /*/*/-/merge_requests/*.patch
Disallow: /*/*/-/merge_requests/*.diff
Disallow: /*/*/-/merge_requests/*/edit
Disallow: /*/*/-/merge_requests/*/diffs
Disallow: /*/*/project_members/import
Disallow: /*/*/labels/new
Disallow: /*/*/labels/*/edit
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ export default [
short_commit_sha: 'de7a8f7f',
version_path: '/gnuwget/wget2/merge_requests/6/diffs?diff_id=37',
compare_path:
'/gnuwget/wget2/merge_requests/6/diffs?diff_id=37&start_sha=de7a8f7f20c3ea2e0bef3ba01cfd41c21f6b4995',
'/gnuwget/wget2/-/merge_requests/6/diffs?diff_id=37&start_sha=de7a8f7f20c3ea2e0bef3ba01cfd41c21f6b4995',
},
{
base_version_path: '/gnuwget/wget2/merge_requests/6/diffs?diff_id=36',
Loading
Loading
@@ -19,7 +19,7 @@ export default [
short_commit_sha: 'e78fc18f',
version_path: '/gnuwget/wget2/merge_requests/6/diffs?diff_id=36',
compare_path:
'/gnuwget/wget2/merge_requests/6/diffs?diff_id=37&start_sha=e78fc18fa37acb2185c59ca94d4a964464feb50e',
'/gnuwget/wget2/-/merge_requests/6/diffs?diff_id=37&start_sha=e78fc18fa37acb2185c59ca94d4a964464feb50e',
},
{
base_version_path: '/gnuwget/wget2/merge_requests/6/diffs?diff_id=35',
Loading
Loading
@@ -30,7 +30,7 @@ export default [
short_commit_sha: '48da7e7e',
version_path: '/gnuwget/wget2/merge_requests/6/diffs?diff_id=35',
compare_path:
'/gnuwget/wget2/merge_requests/6/diffs?diff_id=37&start_sha=48da7e7e9a99d41c852578bd9cb541ca4d864b3e',
'/gnuwget/wget2/-/merge_requests/6/diffs?diff_id=37&start_sha=48da7e7e9a99d41c852578bd9cb541ca4d864b3e',
},
{
base_version_path: '/gnuwget/wget2/merge_requests/6/diffs?diff_id=20',
Loading
Loading
@@ -41,6 +41,6 @@ export default [
short_commit_sha: '47bac2ed',
version_path: '/gnuwget/wget2/merge_requests/6/diffs?diff_id=20',
compare_path:
'/gnuwget/wget2/merge_requests/6/diffs?diff_id=37&start_sha=47bac2ed972c5bee344c1cea159a22cd7f711dc0',
'/gnuwget/wget2/-/merge_requests/6/diffs?diff_id=37&start_sha=47bac2ed972c5bee344c1cea159a22cd7f711dc0',
},
];
Loading
Loading
@@ -52,7 +52,7 @@ export const noteableDataMock = {
time_estimate: 0,
title: '14',
total_time_spent: 0,
noteable_note_url: '/group/project/merge_requests/1#note_1',
noteable_note_url: '/group/project/-/merge_requests/1#note_1',
updated_at: '2017-08-04T09:53:01.226Z',
updated_by_id: 1,
web_url: '/gitlab-org/gitlab-foss/issues/26',
Loading
Loading
@@ -101,8 +101,8 @@ export const individualNote = {
{ name: 'art', user: { id: 1, name: 'Root', username: 'root' } },
],
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1390/toggle_award_emoji',
noteable_note_url: '/group/project/merge_requests/1#note_1',
note_url: '/group/project/merge_requests/1#note_1',
noteable_note_url: '/group/project/-/merge_requests/1#note_1',
note_url: '/group/project/-/merge_requests/1#note_1',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F26%23note_1390&user_id=1',
path: '/gitlab-org/gitlab-foss/notes/1390',
Loading
Loading
@@ -161,8 +161,8 @@ export const note = {
},
],
toggle_award_path: '/gitlab-org/gitlab-foss/notes/546/toggle_award_emoji',
note_url: '/group/project/merge_requests/1#note_1',
noteable_note_url: '/group/project/merge_requests/1#note_1',
note_url: '/group/project/-/merge_requests/1#note_1',
noteable_note_url: '/group/project/-/merge_requests/1#note_1',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F7%23note_546&user_id=1',
path: '/gitlab-org/gitlab-foss/notes/546',
Loading
Loading
@@ -205,7 +205,7 @@ export const discussionMock = {
discussion_id: '9e3bd2f71a01de45fd166e6719eb380ad9f270b1',
emoji_awardable: true,
award_emoji: [],
noteable_note_url: '/group/project/merge_requests/1#note_1',
noteable_note_url: '/group/project/-/merge_requests/1#note_1',
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1395/toggle_award_emoji',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F26%23note_1395&user_id=1',
Loading
Loading
@@ -253,7 +253,7 @@ export const discussionMock = {
emoji_awardable: true,
award_emoji: [],
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1396/toggle_award_emoji',
noteable_note_url: '/group/project/merge_requests/1#note_1',
noteable_note_url: '/group/project/-/merge_requests/1#note_1',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F26%23note_1396&user_id=1',
path: '/gitlab-org/gitlab-foss/notes/1396',
Loading
Loading
@@ -299,7 +299,7 @@ export const discussionMock = {
discussion_id: '9e3bd2f71a01de45fd166e6719eb380ad9f270b1',
emoji_awardable: true,
award_emoji: [],
noteable_note_url: '/group/project/merge_requests/1#note_1',
noteable_note_url: '/group/project/-/merge_requests/1#note_1',
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1437/toggle_award_emoji',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F26%23note_1437&user_id=1',
Loading
Loading
@@ -349,7 +349,7 @@ export const loggedOutnoteableData = {
can_create_note: false,
can_update: false,
},
noteable_note_url: '/group/project/merge_requests/1#note_1',
noteable_note_url: '/group/project/-/merge_requests/1#note_1',
create_note_path: '/gitlab-org/gitlab-foss/notes?target_id=98&target_type=issue',
preview_note_path: '/gitlab-org/gitlab-foss/preview_markdown?target_id=98&target_type=Issue',
};
Loading
Loading
@@ -483,7 +483,7 @@ export const INDIVIDUAL_NOTE_RESPONSE_MAP = {
},
},
],
noteable_note_url: '/group/project/merge_requests/1#note_1',
noteable_note_url: '/group/project/-/merge_requests/1#note_1',
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1390/toggle_award_emoji',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F26%23note_1390\u0026user_id=1',
Loading
Loading
@@ -528,7 +528,7 @@ export const INDIVIDUAL_NOTE_RESPONSE_MAP = {
discussion_id: '70d5c92a4039a36c70100c6691c18c27e4b0a790',
emoji_awardable: true,
award_emoji: [],
noteable_note_url: '/group/project/merge_requests/1#note_1',
noteable_note_url: '/group/project/-/merge_requests/1#note_1',
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1391/toggle_award_emoji',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F26%23note_1391\u0026user_id=1',
Loading
Loading
@@ -583,7 +583,7 @@ export const INDIVIDUAL_NOTE_RESPONSE_MAP = {
discussion_id: 'a3ed36e29b1957efb3b68c53e2d7a2b24b1df052',
emoji_awardable: true,
award_emoji: [],
noteable_note_url: '/group/project/merge_requests/1#note_1',
noteable_note_url: '/group/project/-/merge_requests/1#note_1',
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1471/toggle_award_emoji',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F29%23note_1471\u0026user_id=1',
Loading
Loading
@@ -635,7 +635,7 @@ export const DISCUSSION_NOTE_RESPONSE_MAP = {
emoji_awardable: true,
award_emoji: [],
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1471/toggle_award_emoji',
noteable_note_url: '/group/project/merge_requests/1#note_1',
noteable_note_url: '/group/project/-/merge_requests/1#note_1',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F29%23note_1471\u0026user_id=1',
path: '/gitlab-org/gitlab-foss/notes/1471',
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@ describe('request selector', () => {
const requests = [
{
id: 'warningReq',
url: 'https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/1/discussions.json',
url: 'https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/1/discussions.json',
truncatedUrl: 'discussions.json',
hasWarnings: true,
},
Loading
Loading
Loading
Loading
@@ -15,14 +15,14 @@ describe('PerformanceBarStore', () => {
});
 
it('keeps the last two components of the path when the last component is numeric', () => {
store.addRequest('id', 'https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/1');
store.addRequest('id', 'https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/1');
expect(findUrl('id')).toEqual('merge_requests/1');
});
 
it('uses the last component of the path', () => {
store.addRequest(
'id',
'https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/1.json?serializer=widget',
'https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/1.json?serializer=widget',
);
expect(findUrl('id')).toEqual('1.json?serializer=widget');
});
Loading
Loading
Loading
Loading
@@ -51,7 +51,7 @@ describe AwardEmojiHelper do
it 'returns correct url' do
@project = merge_request.project
 
expected_url = "/#{@project.namespace.path}/#{@project.path}/merge_requests/#{merge_request.iid}/toggle_award_emoji"
expected_url = "/#{@project.namespace.path}/#{@project.path}/-/merge_requests/#{merge_request.iid}/toggle_award_emoji"
 
expect(subject).to eq(expected_url)
end
Loading
Loading
Loading
Loading
@@ -116,7 +116,7 @@ describe EventsHelper do
it 'returns a merge request url' do
event.target = create(:note_on_merge_request, note: 'LGTM!')
 
expect(subject).to eq("#{project_base_url}/merge_requests/#{event.note_target.iid}#note_#{event.target.id}")
expect(subject).to eq("#{project_base_url}/-/merge_requests/#{event.note_target.iid}#note_#{event.target.id}")
end
end
end
Loading
Loading
@@ -78,13 +78,21 @@ describe LabelsHelper do
end
 
context 'with a type argument' do
['issue', :issue, 'merge_request', :merge_request].each do |type|
['issue', :issue].each do |type|
context "set to #{type}" do
it 'links to correct page' do
expect(link_to_label(label_presenter, type: type)).to match %r{<a href="/#{label.project.full_path}/#{type.to_s.pluralize}\?label_name%5B%5D=#{label.name}">.*</a>}
end
end
end
['merge_request', :merge_request].each do |type|
context "set to #{type}" do
it 'links to correct page' do
expect(link_to_label(label_presenter, type: type)).to match %r{<a href="/#{label.project.full_path}/-/#{type.to_s.pluralize}\?label_name%5B%5D=#{label.name}">.*</a>}
end
end
end
end
 
context 'with a tooltip argument' do
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