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

Add latest changes from gitlab-org/gitlab@master

parent 196ada08
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -1606,6 +1606,7 @@ ActiveRecord::Schema.define(version: 2020_03_19_203901) do
t.integer "start_date_sourcing_epic_id"
t.integer "due_date_sourcing_epic_id"
t.integer "health_status", limit: 2
t.string "external_key", limit: 255
t.index "group_id, ((iid)::character varying) varchar_pattern_ops", name: "index_epics_on_group_id_and_iid_varchar_pattern"
t.index ["assignee_id"], name: "index_epics_on_assignee_id"
t.index ["author_id"], name: "index_epics_on_author_id"
Loading
Loading
@@ -1613,6 +1614,7 @@ ActiveRecord::Schema.define(version: 2020_03_19_203901) do
t.index ["due_date_sourcing_epic_id"], name: "index_epics_on_due_date_sourcing_epic_id", where: "(due_date_sourcing_epic_id IS NOT NULL)"
t.index ["due_date_sourcing_milestone_id"], name: "index_epics_on_due_date_sourcing_milestone_id"
t.index ["end_date"], name: "index_epics_on_end_date"
t.index ["group_id", "external_key"], name: "index_epics_on_group_id_and_external_key", unique: true, where: "(external_key IS NOT NULL)"
t.index ["group_id"], name: "index_epics_on_group_id"
t.index ["iid"], name: "index_epics_on_iid"
t.index ["lock_version"], name: "index_epics_on_lock_version", where: "(lock_version IS NULL)"
Loading
Loading
@@ -2222,6 +2224,7 @@ ActiveRecord::Schema.define(version: 2020_03_19_203901) do
t.integer "duplicated_to_id"
t.integer "promoted_to_epic_id"
t.integer "health_status", limit: 2
t.string "external_key", limit: 255
t.index ["author_id", "id", "created_at"], name: "index_issues_on_author_id_and_id_and_created_at"
t.index ["author_id"], name: "index_issues_on_author_id"
t.index ["closed_by_id"], name: "index_issues_on_closed_by_id"
Loading
Loading
@@ -2233,6 +2236,7 @@ ActiveRecord::Schema.define(version: 2020_03_19_203901) do
t.index ["moved_to_id"], name: "index_issues_on_moved_to_id", where: "(moved_to_id IS NOT NULL)"
t.index ["project_id", "created_at", "id", "state_id"], name: "idx_issues_on_project_id_and_created_at_and_id_and_state_id"
t.index ["project_id", "due_date", "id", "state_id"], name: "idx_issues_on_project_id_and_due_date_and_id_and_state_id", where: "(due_date IS NOT NULL)"
t.index ["project_id", "external_key"], name: "index_issues_on_project_id_and_external_key", unique: true, where: "(external_key IS NOT NULL)"
t.index ["project_id", "iid"], name: "index_issues_on_project_id_and_iid", unique: true
t.index ["project_id", "relative_position", "state_id", "id"], name: "idx_issues_on_project_id_and_rel_position_and_state_id_and_id", order: { id: :desc }
t.index ["project_id", "updated_at", "id", "state_id"], name: "idx_issues_on_project_id_and_updated_at_and_id_and_state_id"
Loading
Loading
Loading
Loading
@@ -268,6 +268,11 @@ See [Analyzer settings](#analyzer-settings) for the complete list of available o
 
SAST can be [configured](#customizing-the-sast-settings) using environment variables.
 
#### Custom Certificate Authority
To trust a custom Certificate Authority, set the `ADDITIONAL_CA_CERT_BUNDLE` variable to the bundle
of CA certs that you want to trust within the SAST environment.
#### Docker images
 
The following are Docker image-related variables.
Loading
Loading
Loading
Loading
@@ -144,7 +144,7 @@ module Gitlab
%r{\A(ee/)?spec/(?!javascripts|frontend)[^/]+} => :backend,
%r{\A(ee/)?vendor/(?!assets)[^/]+} => :backend,
%r{\A(ee/)?vendor/(languages\.yml|licenses\.csv)\z} => :backend,
%r{\A(Gemfile|Gemfile.lock|Procfile|Rakefile)\z} => :backend,
%r{\A(Gemfile|Gemfile.lock|Rakefile)\z} => :backend,
%r{\A[A-Z_]+_VERSION\z} => :backend,
%r{\A\.rubocop(_todo)?\.yml\z} => :backend,
 
Loading
Loading
Loading
Loading
@@ -77,7 +77,7 @@ describe 'Dashboard Groups page', :js do
expect(page).to have_content(group.name)
expect(page).to have_content(nested_group.parent.name)
expect(page).not_to have_content(another_group.name)
expect(page.all('.js-groups-list-holder .content-list li').length).to eq 2
expect(page.all('.js-groups-list-holder .groups-list li').length).to eq 2
end
end
 
Loading
Loading
Loading
Loading
@@ -47,26 +47,26 @@ describe 'Explore Groups page', :js do
expect(page).to have_content(group.full_name)
expect(page).to have_content(public_group.full_name)
expect(page).not_to have_content(private_group.full_name)
expect(page.all('.js-groups-list-holder .content-list li').length).to eq 2
expect(page.all('.js-groups-list-holder .groups-list li').length).to eq 2
end
 
it 'shows non-archived projects count' do
# Initially project is not archived
expect(find('.js-groups-list-holder .content-list li:first-child .stats .number-projects')).to have_text("1")
expect(find('.js-groups-list-holder .groups-list li:first-child .stats .number-projects')).to have_text("1")
 
# Archive project
::Projects::UpdateService.new(empty_project, user, archived: true).execute
visit explore_groups_path
 
# Check project count
expect(find('.js-groups-list-holder .content-list li:first-child .stats .number-projects')).to have_text("0")
expect(find('.js-groups-list-holder .groups-list li:first-child .stats .number-projects')).to have_text("0")
 
# Unarchive project
::Projects::UpdateService.new(empty_project, user, archived: false).execute
visit explore_groups_path
 
# Check project count
expect(find('.js-groups-list-holder .content-list li:first-child .stats .number-projects')).to have_text("1")
expect(find('.js-groups-list-holder .groups-list li:first-child .stats .number-projects')).to have_text("1")
end
 
describe 'landing component' do
Loading
Loading
Loading
Loading
@@ -162,4 +162,17 @@ describe 'Visual tokens', :js do
])
end
end
it 'does retain hint token when mix of typing and clicks are performed' do
input_filtered_search('label:', extra_space: false, submit: false)
expect(page).to have_css('#js-dropdown-operator', visible: true)
find('#js-dropdown-operator li[data-value="="]').click
token = page.all('.tokens-container .js-visual-token')[0]
expect(token.find('.name').text).to eq('Label')
expect(token.find('.operator').text).to eq('=')
end
end
Loading
Loading
@@ -2,13 +2,17 @@
 
require 'spec_helper'
 
describe 'Projects > Snippets > User updates a snippet' do
describe 'Projects > Snippets > User updates a snippet', :js do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, namespace: user.namespace) }
let!(:snippet) { create(:project_snippet, project: project, author: user) }
let_it_be(:snippet, reload: true) { create(:project_snippet, :repository, project: project, author: user) }
let(:version_snippet_enabled) { true }
 
before do
stub_feature_flags(snippets_vue: false)
stub_feature_flags(version_snippets: version_snippet_enabled)
project.add_maintainer(user)
sign_in(user)
 
Loading
Loading
@@ -17,6 +21,29 @@ describe 'Projects > Snippets > User updates a snippet' do
page.within('.detail-page-header') do
first(:link, 'Edit').click
end
wait_for_all_requests
end
it 'displays the snippet blob path and content' do
blob = snippet.blobs.first
aggregate_failures do
expect(page.find_field('project_snippet_file_name').value).to eq blob.path
expect(page.find('.file-content')).to have_content(blob.data.strip)
expect(page.find('.snippet-file-content', visible: false).value).to eq blob.data
end
end
context 'when feature flag :version_snippets is disabled' do
let(:version_snippet_enabled) { false }
it 'displays the snippet file_name and content' do
aggregate_failures do
expect(page.find_field('project_snippet_file_name').value).to eq snippet.file_name
expect(page.find('.file-content')).to have_content(snippet.content)
expect(page.find('.snippet-file-content', visible: false).value).to eq snippet.content
end
end
end
 
it 'updates a snippet' do
Loading
Loading
Loading
Loading
@@ -5,18 +5,43 @@ require 'spec_helper'
describe 'User edits snippet', :js do
include DropzoneHelper
 
let(:file_name) { 'test.rb' }
let(:content) { 'puts "test"' }
let_it_be(:file_name) { 'test.rb' }
let_it_be(:content) { 'puts "test"' }
let_it_be(:user) { create(:user) }
let(:snippet) { create(:personal_snippet, :public, file_name: file_name, content: content, author: user) }
let_it_be(:snippet, reload: true) { create(:personal_snippet, :repository, :public, file_name: file_name, content: content, author: user) }
let(:version_snippet_enabled) { true }
 
before do
stub_feature_flags(snippets_vue: false)
stub_feature_flags(version_snippets: version_snippet_enabled)
sign_in(user)
 
visit edit_snippet_path(snippet)
wait_for_requests
wait_for_all_requests
end
it 'displays the snippet blob path and content' do
blob = snippet.blobs.first
aggregate_failures do
expect(page.find_field('personal_snippet_file_name').value).to eq blob.path
expect(page.find('.file-content')).to have_content(blob.data.strip)
expect(page.find('.snippet-file-content', visible: false).value).to eq blob.data
end
end
context 'when feature flag :version_snippets is disabled' do
let(:version_snippet_enabled) { false }
it 'displays the snippet file_name and content' do
aggregate_failures do
expect(page.find_field('personal_snippet_file_name').value).to eq file_name
expect(page.find('.file-content')).to have_content(content)
expect(page.find('.snippet-file-content', visible: false).value).to eq content
end
end
end
 
it 'updates the snippet' do
Loading
Loading
Loading
Loading
@@ -206,7 +206,6 @@ describe Gitlab::Danger::Helper do
 
'Gemfile' | :backend
'Gemfile.lock' | :backend
'Procfile' | :backend
'Rakefile' | :backend
'FOO_VERSION' | :backend
 
Loading
Loading
Loading
Loading
@@ -31,6 +31,7 @@ Issue:
- last_edited_by_id
- discussion_locked
- health_status
- external_key
Event:
- id
- target_type
Loading
Loading
@@ -843,6 +844,7 @@ Epic:
- start_date_sourcing_epic_id
- due_date_sourcing_epic_id
- health_status
- external_key
EpicIssue:
- id
- relative_position
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