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>2024-01-05 00:07:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-05 00:07:37 +0300
commit808b8561f4e75b2db7c7e94a6c7651efb546048b (patch)
tree2cb7546939b56fef3a73a52dd8790de55f0fc0e4 /spec/features
parentcc514c362bcd4b657bf6a6d1d37f5305952df363 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/issuables/issuable_list_spec.rb4
-rw-r--r--spec/features/projects/branches_spec.rb4
-rw-r--r--spec/features/tags/developer_views_tags_spec.rb4
3 files changed, 6 insertions, 6 deletions
diff --git a/spec/features/issuables/issuable_list_spec.rb b/spec/features/issuables/issuable_list_spec.rb
index 1020ea341ce..fee0f8a8f32 100644
--- a/spec/features/issuables/issuable_list_spec.rb
+++ b/spec/features/issuables/issuable_list_spec.rb
@@ -16,11 +16,11 @@ RSpec.describe 'issuable list', :js, feature_category: :team_planning do
issuable_types.each do |issuable_type|
it "avoids N+1 database queries for #{issuable_type.to_s.humanize.pluralize}", quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/231426' } do
- control_count = ActiveRecord::QueryRecorder.new { visit_issuable_list(issuable_type) }.count
+ control = ActiveRecord::QueryRecorder.new { visit_issuable_list(issuable_type) }
create_issuables(issuable_type)
- expect { visit_issuable_list(issuable_type) }.not_to exceed_query_limit(control_count)
+ expect { visit_issuable_list(issuable_type) }.not_to exceed_query_limit(control)
end
it "counts upvotes, downvotes and notes count for each #{issuable_type.to_s.humanize}" do
diff --git a/spec/features/projects/branches_spec.rb b/spec/features/projects/branches_spec.rb
index a29d643b15b..41b8ad7825c 100644
--- a/spec/features/projects/branches_spec.rb
+++ b/spec/features/projects/branches_spec.rb
@@ -171,12 +171,12 @@ RSpec.describe 'Branches', feature_category: :source_code_management do
new_branches_count = 20
sql_queries_count_threshold = 10
- control_count = ActiveRecord::QueryRecorder.new { visit project_branches_path(project) }.count
+ control = ActiveRecord::QueryRecorder.new { visit project_branches_path(project) }
(1..new_branches_count).each { |number| repository.add_branch(user, "new-branch-#{number}", 'master') }
expect { visit project_branches_filtered_path(project, state: 'all') }
- .not_to exceed_query_limit(control_count).with_threshold(sql_queries_count_threshold)
+ .not_to exceed_query_limit(control).with_threshold(sql_queries_count_threshold)
end
end
diff --git a/spec/features/tags/developer_views_tags_spec.rb b/spec/features/tags/developer_views_tags_spec.rb
index 154311853f8..bc2d33b3a02 100644
--- a/spec/features/tags/developer_views_tags_spec.rb
+++ b/spec/features/tags/developer_views_tags_spec.rb
@@ -41,11 +41,11 @@ RSpec.describe 'Developer views tags', feature_category: :source_code_management
end
it 'avoids a N+1 query in branches index' do
- control_count = ActiveRecord::QueryRecorder.new { visit project_tags_path(project) }.count
+ control = ActiveRecord::QueryRecorder.new { visit project_tags_path(project) }
%w[one two three four five].each { |tag| repository.add_tag(user, tag, 'master', 'foo') }
- expect { visit project_tags_path(project) }.not_to exceed_query_limit(control_count)
+ expect { visit project_tags_path(project) }.not_to exceed_query_limit(control)
end
it 'views the tags list page' do