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>2023-12-22 12:17:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-22 12:17:04 +0300
commit6b0293c14dce817f72310127dd38562313321b1b (patch)
treecb2254757b496664957a2b5d90c21d7d76e4bdeb /spec/graphql
parent968a9dd39b77628b541e0788488bad2493fefbee (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql')
-rw-r--r--spec/graphql/resolvers/concerns/resolves_groups_spec.rb9
-rw-r--r--spec/graphql/types/commit_signatures/verification_status_enum_spec.rb8
-rw-r--r--spec/graphql/types/group_type_spec.rb3
3 files changed, 10 insertions, 10 deletions
diff --git a/spec/graphql/resolvers/concerns/resolves_groups_spec.rb b/spec/graphql/resolvers/concerns/resolves_groups_spec.rb
index 8f0918b3a50..72e86d54dea 100644
--- a/spec/graphql/resolvers/concerns/resolves_groups_spec.rb
+++ b/spec/graphql/resolvers/concerns/resolves_groups_spec.rb
@@ -22,21 +22,24 @@ RSpec.describe ResolvesGroups do
end
end
- let_it_be(:lookahead_fields) do
+ let_it_be(:preloaded_fields) do
<<~FIELDS
containerRepositoriesCount
customEmoji { nodes { id } }
fullPath
+ groupMembersCount
path
dependencyProxyBlobCount
dependencyProxyBlobs { nodes { fileName } }
dependencyProxyImageCount
dependencyProxyImageTtlPolicy { enabled }
dependencyProxySetting { enabled }
+ descendantGroupsCount
+ projectsCount
FIELDS
end
- it 'avoids N+1 queries on the fields marked with lookahead' do
+ it 'avoids N+1 queries on the preloaded fields' do
group_ids = groups.map(&:id)
allow_next(resolver).to receive(:resolve_groups).and_return(Group.id_in(group_ids))
@@ -55,7 +58,7 @@ RSpec.describe ResolvesGroups do
end
def query_groups(limit:)
- query_string = "{ groups(first: #{limit}) { nodes { id #{lookahead_fields} } } }"
+ query_string = "{ groups(first: #{limit}) { nodes { id #{preloaded_fields} } } }"
data = execute_query(query_type, graphql: query_string)
diff --git a/spec/graphql/types/commit_signatures/verification_status_enum_spec.rb b/spec/graphql/types/commit_signatures/verification_status_enum_spec.rb
index 7fc600745df..a51f15f2b82 100644
--- a/spec/graphql/types/commit_signatures/verification_status_enum_spec.rb
+++ b/spec/graphql/types/commit_signatures/verification_status_enum_spec.rb
@@ -2,15 +2,11 @@
require 'spec_helper'
-RSpec.describe GitlabSchema.types['VerificationStatus'] do
+RSpec.describe GitlabSchema.types['VerificationStatus'], feature_category: :source_code_management do
specify { expect(described_class.graphql_name).to eq('VerificationStatus') }
it 'exposes all signature verification states' do
expect(described_class.values.keys)
- .to match_array(%w[
- UNVERIFIED UNVERIFIED_KEY VERIFIED
- SAME_USER_DIFFERENT_EMAIL OTHER_USER UNKNOWN_KEY
- MULTIPLE_SIGNATURES REVOKED_KEY VERIFIED_SYSTEM
- ])
+ .to match_array(Enums::CommitSignature.verification_statuses.map { |status| status.first.to_s.upcase })
end
end
diff --git a/spec/graphql/types/group_type_spec.rb b/spec/graphql/types/group_type_spec.rb
index d3f9053faf3..51a9476f449 100644
--- a/spec/graphql/types/group_type_spec.rb
+++ b/spec/graphql/types/group_type_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe GitlabSchema.types['Group'] do
+RSpec.describe GitlabSchema.types['Group'], feature_category: :groups_and_projects do
include GraphqlHelpers
specify { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Group) }
@@ -16,6 +16,7 @@ RSpec.describe GitlabSchema.types['Group'] do
id name path full_name full_path description description_html visibility
lfs_enabled request_access_enabled projects root_storage_statistics
web_url avatar_url share_with_group_lock project_creation_level
+ descendant_groups_count group_members_count projects_count
subgroup_creation_level require_two_factor_authentication
two_factor_grace_period auto_devops_enabled emails_disabled
mentions_disabled parent boards milestones group_members