diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-20 13:43:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-20 13:43:29 +0300 |
commit | 3b1af5cc7ed2666ff18b718ce5d30fa5a2756674 (patch) | |
tree | 3bc4a40e0ee51ec27eabf917c537033c0c5b14d4 /spec/graphql/types | |
parent | 9bba14be3f2c211bf79e15769cd9b77bc73a13bc (diff) |
Add latest changes from gitlab-org/gitlab@16-1-stable-eev16.1.0-rc42
Diffstat (limited to 'spec/graphql/types')
16 files changed, 55 insertions, 28 deletions
diff --git a/spec/graphql/types/audit_events/definition_type_spec.rb b/spec/graphql/types/audit_events/definition_type_spec.rb new file mode 100644 index 00000000000..250c0661c6a --- /dev/null +++ b/spec/graphql/types/audit_events/definition_type_spec.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe GitlabSchema.types['AuditEventDefinition'], feature_category: :audit_events do + let(:fields) do + %i[ + name description introduced_by_issue introduced_by_mr + feature_category milestone saved_to_database streamed + ] + end + + specify { expect(described_class.graphql_name).to eq('AuditEventDefinition') } + specify { expect(described_class).to have_graphql_fields(fields) } +end diff --git a/spec/graphql/types/ci/catalog/resource_type_spec.rb b/spec/graphql/types/ci/catalog/resource_type_spec.rb deleted file mode 100644 index d0bb45a4f1d..00000000000 --- a/spec/graphql/types/ci/catalog/resource_type_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Types::Ci::Catalog::ResourceType, feature_category: :pipeline_composition do - specify { expect(described_class.graphql_name).to eq('CiCatalogResource') } - - it 'exposes the expected fields' do - expected_fields = %i[ - id - name - description - icon - ] - - expect(described_class).to have_graphql_fields(*expected_fields) - end -end diff --git a/spec/graphql/types/ci/group_environment_scope_type_spec.rb b/spec/graphql/types/ci/group_environment_scope_type_spec.rb new file mode 100644 index 00000000000..3e3f52ca4bb --- /dev/null +++ b/spec/graphql/types/ci/group_environment_scope_type_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe GitlabSchema.types['CiGroupEnvironmentScope'], feature_category: :secrets_management do + specify do + expect(described_class).to have_graphql_fields( + :name + ).at_least + end +end diff --git a/spec/graphql/types/ci/job_type_spec.rb b/spec/graphql/types/ci/job_type_spec.rb index e927bac431c..f31c0d5255c 100644 --- a/spec/graphql/types/ci/job_type_spec.rb +++ b/spec/graphql/types/ci/job_type_spec.rb @@ -60,6 +60,12 @@ RSpec.describe Types::Ci::JobType, feature_category: :continuous_integration do failure_message ] + if Gitlab.ee? + expected_fields += %i[ + aiFailureAnalysis + ] + end + expect(described_class).to have_graphql_fields(*expected_fields) end diff --git a/spec/graphql/types/ci/runner_manager_type_spec.rb b/spec/graphql/types/ci/runner_manager_type_spec.rb index 240e1edbf78..6f73171cd8f 100644 --- a/spec/graphql/types/ci/runner_manager_type_spec.rb +++ b/spec/graphql/types/ci/runner_manager_type_spec.rb @@ -13,6 +13,6 @@ RSpec.describe GitlabSchema.types['CiRunnerManager'], feature_category: :runner_ runner status system_id version ] - expect(described_class).to have_graphql_fields(*expected_fields) + expect(described_class).to include_graphql_fields(*expected_fields) end end diff --git a/spec/graphql/types/dependency_proxy/image_ttl_group_policy_type_spec.rb b/spec/graphql/types/dependency_proxy/image_ttl_group_policy_type_spec.rb index af0f91a844e..2a81e9508e7 100644 --- a/spec/graphql/types/dependency_proxy/image_ttl_group_policy_type_spec.rb +++ b/spec/graphql/types/dependency_proxy/image_ttl_group_policy_type_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe GitlabSchema.types['DependencyProxyImageTtlGroupPolicy'] do +RSpec.describe GitlabSchema.types['DependencyProxyImageTtlGroupPolicy'], feature_category: :dependency_proxy do it { expect(described_class.graphql_name).to eq('DependencyProxyImageTtlGroupPolicy') } it { expect(described_class.description).to eq('Group-level Dependency Proxy TTL policy settings') } diff --git a/spec/graphql/types/environment_type_spec.rb b/spec/graphql/types/environment_type_spec.rb index 4471735876a..721c20efc81 100644 --- a/spec/graphql/types/environment_type_spec.rb +++ b/spec/graphql/types/environment_type_spec.rb @@ -10,6 +10,7 @@ RSpec.describe GitlabSchema.types['Environment'] do expected_fields = %w[ name id state metrics_dashboard latest_opened_most_severe_alert path external_url deployments slug createdAt updatedAt autoStopAt autoDeleteAt tier environmentType lastDeployment deployFreezes + clusterAgent ] expect(described_class).to include_graphql_fields(*expected_fields) diff --git a/spec/graphql/types/member_access_level_enum_spec.rb b/spec/graphql/types/member_access_level_enum_spec.rb index 54aef667695..cb079f848e0 100644 --- a/spec/graphql/types/member_access_level_enum_spec.rb +++ b/spec/graphql/types/member_access_level_enum_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Types::MemberAccessLevelEnum, feature_category: :subgroups do +RSpec.describe Types::MemberAccessLevelEnum, feature_category: :groups_and_projects do specify { expect(described_class.graphql_name).to eq('MemberAccessLevel') } it 'exposes all the existing access levels' do diff --git a/spec/graphql/types/namespace/package_settings_type_spec.rb b/spec/graphql/types/namespace/package_settings_type_spec.rb index 5039f2d6153..40048b7dfa6 100644 --- a/spec/graphql/types/namespace/package_settings_type_spec.rb +++ b/spec/graphql/types/namespace/package_settings_type_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe GitlabSchema.types['PackageSettings'] do +RSpec.describe GitlabSchema.types['PackageSettings'], feature_category: :package_registry do specify { expect(described_class.graphql_name).to eq('PackageSettings') } specify { expect(described_class.description).to eq('Namespace-level Package Registry settings') } diff --git a/spec/graphql/types/notes/note_type_spec.rb b/spec/graphql/types/notes/note_type_spec.rb index a9e45b29eea..8aabdb78562 100644 --- a/spec/graphql/types/notes/note_type_spec.rb +++ b/spec/graphql/types/notes/note_type_spec.rb @@ -8,6 +8,7 @@ RSpec.describe GitlabSchema.types['Note'], feature_category: :team_planning do author body body_html + award_emoji confidential internal created_at @@ -27,6 +28,8 @@ RSpec.describe GitlabSchema.types['Note'], feature_category: :team_planning do last_edited_at last_edited_by system_note_metadata + max_access_level_of_author + author_is_contributor ] expect(described_class).to have_graphql_fields(*expected_fields) diff --git a/spec/graphql/types/packages/package_type_enum_spec.rb b/spec/graphql/types/packages/package_type_enum_spec.rb index fb93b1c8c8a..027ce660679 100644 --- a/spec/graphql/types/packages/package_type_enum_spec.rb +++ b/spec/graphql/types/packages/package_type_enum_spec.rb @@ -4,6 +4,6 @@ require 'spec_helper' RSpec.describe GitlabSchema.types['PackageTypeEnum'] do it 'exposes all package types' do - expect(described_class.values.keys).to contain_exactly(*%w[MAVEN NPM CONAN NUGET PYPI COMPOSER GENERIC GOLANG DEBIAN RUBYGEMS HELM TERRAFORM_MODULE RPM]) + expect(described_class.values.keys).to contain_exactly(*%w[MAVEN NPM CONAN NUGET PYPI COMPOSER GENERIC GOLANG DEBIAN RUBYGEMS HELM TERRAFORM_MODULE RPM ML_MODEL]) end end diff --git a/spec/graphql/types/permission_types/work_item_spec.rb b/spec/graphql/types/permission_types/work_item_spec.rb index 7e16b43a12f..3ee42e2e3ad 100644 --- a/spec/graphql/types/permission_types/work_item_spec.rb +++ b/spec/graphql/types/permission_types/work_item_spec.rb @@ -6,7 +6,7 @@ RSpec.describe Types::PermissionTypes::WorkItem do it do expected_permissions = [ :read_work_item, :update_work_item, :delete_work_item, :admin_work_item, - :admin_parent_link, :set_work_item_metadata + :admin_parent_link, :set_work_item_metadata, :create_note ] expected_permissions.each do |permission| diff --git a/spec/graphql/types/projects/service_type_enum_spec.rb b/spec/graphql/types/projects/service_type_enum_spec.rb index 8b444a08c3b..a5b1ba24a44 100644 --- a/spec/graphql/types/projects/service_type_enum_spec.rb +++ b/spec/graphql/types/projects/service_type_enum_spec.rb @@ -15,6 +15,7 @@ RSpec.describe GitlabSchema.types['ServiceType'] do BUGZILLA_SERVICE BUILDKITE_SERVICE CAMPFIRE_SERVICE + CLICKUP_SERVICE CONFLUENCE_SERVICE CUSTOM_ISSUE_TRACKER_SERVICE DATADOG_SERVICE diff --git a/spec/graphql/types/root_storage_statistics_type_spec.rb b/spec/graphql/types/root_storage_statistics_type_spec.rb index 5dde6aa8b14..56f58825db0 100644 --- a/spec/graphql/types/root_storage_statistics_type_spec.rb +++ b/spec/graphql/types/root_storage_statistics_type_spec.rb @@ -7,9 +7,9 @@ RSpec.describe GitlabSchema.types['RootStorageStatistics'] do it 'has all the required fields' do expect(described_class).to have_graphql_fields(:storage_size, :repository_size, :lfs_objects_size, - :build_artifacts_size, :packages_size, :wiki_size, :snippets_size, - :pipeline_artifacts_size, :uploads_size, :dependency_proxy_size, - :container_registry_size, :registry_size_estimated) + :build_artifacts_size, :packages_size, :wiki_size, :snippets_size, + :pipeline_artifacts_size, :uploads_size, :dependency_proxy_size, + :container_registry_size, :registry_size_estimated) end specify { expect(described_class).to require_graphql_authorizations(:read_statistics) } diff --git a/spec/graphql/types/subscription_type_spec.rb b/spec/graphql/types/subscription_type_spec.rb index a57a8e751ac..d3e5b6ffa3a 100644 --- a/spec/graphql/types/subscription_type_spec.rb +++ b/spec/graphql/types/subscription_type_spec.rb @@ -15,6 +15,7 @@ RSpec.describe GitlabSchema.types['Subscription'] do merge_request_reviewers_updated merge_request_merge_status_updated merge_request_approval_state_updated + work_item_updated ] expect(described_class).to include_graphql_fields(*expected_fields) diff --git a/spec/graphql/types/user_type_spec.rb b/spec/graphql/types/user_type_spec.rb index 0b0dcf2fb6a..777972df88b 100644 --- a/spec/graphql/types/user_type_spec.rb +++ b/spec/graphql/types/user_type_spec.rb @@ -47,7 +47,14 @@ RSpec.describe GitlabSchema.types['User'], feature_category: :user_profile do profileEnableGitpodPath savedReplies savedReply - user_achievements + userAchievements + bio + linkedin + twitter + discord + organization + jobTitle + createdAt ] expect(described_class).to include_graphql_fields(*expected_fields) |