Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-14 06:09:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-14 06:09:39 +0300
commit52cacdb89bb29f355e0c3a33c3250ac2d3fea036 (patch)
tree106e4128d0b9e454f60287c9895fc2182e82db21 /spec/features
parent9398d718d92a40a0a917040645a55dea51467a91 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/dashboard/projects_spec.rb12
-rw-r--r--spec/features/ide/user_commits_changes_spec.rb33
-rw-r--r--spec/features/projects/pipelines/pipeline_spec.rb11
3 files changed, 42 insertions, 14 deletions
diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb
index 73f759f8a54..218cbf871a9 100644
--- a/spec/features/dashboard/projects_spec.rb
+++ b/spec/features/dashboard/projects_spec.rb
@@ -244,13 +244,15 @@ describe 'Dashboard Projects' do
ActiveRecord::QueryRecorder.new { visit dashboard_projects_path }.count
- # There are three known N+1 queries:
+ # There are seven known N+1 queries: https://gitlab.com/gitlab-org/gitlab/-/issues/214037
# 1. Project#open_issues_count
# 2. Project#open_merge_requests_count
# 3. Project#forks_count
- #
- # In addition, ProjectsHelper#load_pipeline_status also adds an
- # additional query.
- expect { visit dashboard_projects_path }.not_to exceed_query_limit(control_count + 4)
+ # 4. ProjectsHelper#load_pipeline_status
+ # 5. RendersMemberAccess#preload_max_member_access_for_collection
+ # 6. User#max_member_access_for_project_ids
+ # 7. CommitWithPipeline#last_pipeline
+
+ expect { visit dashboard_projects_path }.not_to exceed_query_limit(control_count + 7)
end
end
diff --git a/spec/features/ide/user_commits_changes_spec.rb b/spec/features/ide/user_commits_changes_spec.rb
new file mode 100644
index 00000000000..f53abde1523
--- /dev/null
+++ b/spec/features/ide/user_commits_changes_spec.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe 'IDE user commits changes', :js do
+ include WebIdeSpecHelpers
+
+ let(:project) { create(:project, :public, :repository) }
+ let(:user) { project.owner }
+
+ before do
+ sign_in(user)
+
+ ide_visit(project)
+ end
+
+ it 'user updates nested files' do
+ content = <<~HEREDOC
+ Lorem ipsum
+ Dolar sit
+ Amit
+ HEREDOC
+
+ ide_create_new_file('foo/bar/lorem_ipsum.md', content: content)
+ ide_delete_file('foo/bar/.gitkeep')
+
+ ide_commit
+
+ expect(page).to have_content('All changes are committed')
+ expect(project.repository.blob_at('master', 'foo/bar/.gitkeep')).to be_nil
+ expect(project.repository.blob_at('master', 'foo/bar/lorem_ipsum.md').data).to eql(content)
+ end
+end
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb
index 561c0552007..e8846b5b617 100644
--- a/spec/features/projects/pipelines/pipeline_spec.rb
+++ b/spec/features/projects/pipelines/pipeline_spec.rb
@@ -133,15 +133,8 @@ describe 'Pipeline', :js do
context 'when there are two related merge requests' do
before do
- create(:merge_request,
- source_project: project,
- source_branch: pipeline.ref,
- target_branch: 'feature-1')
-
- create(:merge_request,
- source_project: project,
- source_branch: pipeline.ref,
- target_branch: 'feature-2')
+ create(:merge_request, source_project: project, source_branch: pipeline.ref)
+ create(:merge_request, source_project: project, source_branch: pipeline.ref, target_branch: 'fix')
end
it 'links to the most recent related merge request' do