Commit d02ccea8 authored by Andrejs Cunskis's avatar Andrejs Cunskis Committed by Dan Davison

E2E: Autoload QA classes with zeitwerk

parent 4305f7af
...@@ -8,6 +8,12 @@ info: To determine the technical writer assigned to the Stage/Group associated w ...@@ -8,6 +8,12 @@ info: To determine the technical writer assigned to the Stage/Group associated w
This is a tailored extension of the Best Practices [found in the testing guide](../best_practices.md). This is a tailored extension of the Best Practices [found in the testing guide](../best_practices.md).
## Class and module naming
The QA framework uses [Zeitwerk](https://github.com/fxn/zeitwerk) for class and module autoloading. The default Zeitwerk [inflector](https://github.com/fxn/zeitwerk#zeitwerkinflector) simply converts snake_cased file names to PascalCased module or class names. It is advised to stick to this pattern to avoid manual maintenance of inflections.
In case custom inflection logic is needed, custom inflectors are added in the [qa.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/qa.rb) file in the `loader.inflector.inflect` method invocation.
## Link a test to its test-case issue ## Link a test to its test-case issue
Every test should have a corresponding issue in the [Quality Test Cases project](https://gitlab.com/gitlab-org/quality/testcases/). Every test should have a corresponding issue in the [Quality Test Cases project](https://gitlab.com/gitlab-org/quality/testcases/).
...@@ -342,7 +348,7 @@ end ...@@ -342,7 +348,7 @@ end
When something requires waiting to be matched, use `eventually_` matchers with clear wait duration definition. When something requires waiting to be matched, use `eventually_` matchers with clear wait duration definition.
`Eventually` matchers use the following naming pattern: `eventually_${rspec_matcher_name}`. They are defined in [eventually_matcher.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/spec/support/matchers/eventually_matcher.rb). `Eventually` matchers use the following naming pattern: `eventually_${rspec_matcher_name}`. They are defined in [eventually_matcher.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/qa/support/matchers/eventually_matcher.rb).
```ruby ```ruby
expect { async_value }.to eventually_eq(value).within(max_duration: 120, max_attempts: 60, reload_page: page) expect { async_value }.to eventually_eq(value).within(max_duration: 120, max_attempts: 60, reload_page: page)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'gitlab-qa' gem 'gitlab-qa', require: 'gitlab/qa'
gem 'activesupport', '~> 6.1.3.2' # This should stay in sync with the root's Gemfile gem 'activesupport', '~> 6.1.3.2' # This should stay in sync with the root's Gemfile
gem 'allure-rspec', '~> 2.14.1' gem 'allure-rspec', '~> 2.14.1'
gem 'capybara', '~> 3.35.0' gem 'capybara', '~> 3.35.0'
...@@ -10,10 +10,9 @@ gem 'capybara-screenshot', '~> 1.0.23' ...@@ -10,10 +10,9 @@ gem 'capybara-screenshot', '~> 1.0.23'
gem 'rake', '~> 12.3.3' gem 'rake', '~> 12.3.3'
gem 'rspec', '~> 3.10' gem 'rspec', '~> 3.10'
gem 'selenium-webdriver', '~> 4.0.0.beta4' gem 'selenium-webdriver', '~> 4.0.0.beta4'
gem 'airborne', '~> 0.3.4' gem 'airborne', '~> 0.3.4', require: false # airborne is messing with rspec sandboxed mode so not requiring by default
gem 'rest-client', '~> 2.1.0' gem 'rest-client', '~> 2.1.0'
gem 'nokogiri', '~> 1.11.7' gem 'rspec-retry', '~> 0.6.1', require: 'rspec/retry'
gem 'rspec-retry', '~> 0.6.1'
gem 'rspec_junit_formatter', '~> 0.4.1' gem 'rspec_junit_formatter', '~> 0.4.1'
gem 'faker', '~> 1.6', '>= 1.6.6' gem 'faker', '~> 1.6', '>= 1.6.6'
gem 'knapsack', '~> 1.17' gem 'knapsack', '~> 1.17'
...@@ -24,6 +23,7 @@ gem 'parallel', '~> 1.19' ...@@ -24,6 +23,7 @@ gem 'parallel', '~> 1.19'
gem 'rspec-parameterized', '~> 0.4.2' gem 'rspec-parameterized', '~> 0.4.2'
gem 'octokit', '~> 4.21' gem 'octokit', '~> 4.21'
gem 'webdrivers', '~> 4.6' gem 'webdrivers', '~> 4.6'
gem 'zeitwerk', '~> 2.4'
gem 'chemlab', '~> 0.7' gem 'chemlab', '~> 0.7'
gem 'chemlab-library-www-gitlab-com', '~> 0.1' gem 'chemlab-library-www-gitlab-com', '~> 0.1'
......
...@@ -221,7 +221,6 @@ DEPENDENCIES ...@@ -221,7 +221,6 @@ DEPENDENCIES
faker (~> 1.6, >= 1.6.6) faker (~> 1.6, >= 1.6.6)
gitlab-qa gitlab-qa
knapsack (~> 1.17) knapsack (~> 1.17)
nokogiri (~> 1.11.7)
octokit (~> 4.21) octokit (~> 4.21)
parallel (~> 1.19) parallel (~> 1.19)
parallel_tests (~> 2.29) parallel_tests (~> 2.29)
...@@ -237,6 +236,7 @@ DEPENDENCIES ...@@ -237,6 +236,7 @@ DEPENDENCIES
selenium-webdriver (~> 4.0.0.beta4) selenium-webdriver (~> 4.0.0.beta4)
timecop (~> 0.9.1) timecop (~> 0.9.1)
webdrivers (~> 4.6) webdrivers (~> 4.6)
zeitwerk (~> 2.4)
BUNDLED WITH BUNDLED WITH
2.2.22 2.2.22
This diff is collapsed.
...@@ -5,10 +5,6 @@ module QA ...@@ -5,10 +5,6 @@ module QA
module Strategy module Strategy
extend self extend self
def extend_autoloads!
# noop
end
def perform_before_hooks def perform_before_hooks
# The login page could take some time to load the first time it is visited. # The login page could take some time to load the first time it is visited.
# We visit the login page and wait for it to properly load only once before the tests. # We visit the login page and wait for it to properly load only once before the tests.
......
# frozen_string_literal: true
module QA
##
# GitLab EE extensions
#
module EE
module Runtime
autoload :Env, 'qa/ee/runtime/env'
autoload :Geo, 'qa/ee/runtime/geo'
autoload :Saml, 'qa/ee/runtime/saml'
end
module Page
autoload :OperationsDashboard, 'qa/ee/page/operations_dashboard'
module Component
autoload :LicenseManagement, 'qa/ee/page/component/license_management'
autoload :SecureReport, 'qa/ee/page/component/secure_report'
module IssueBoard
autoload :Show, 'qa/ee/page/component/issue_board/show'
end
module WebIDE
autoload :WebTerminalPanel, 'qa/ee/page/component/web_ide/web_terminal_panel'
end
end
module Dashboard
autoload :Projects, 'qa/ee/page/dashboard/projects'
end
module Group
autoload :Menu, 'qa/ee/page/group/menu'
autoload :SamlSSOSignIn, 'qa/ee/page/group/saml_sso_sign_in'
autoload :SamlSSOSignUp, 'qa/ee/page/group/saml_sso_sign_up'
autoload :Members, 'qa/ee/page/group/members'
autoload :ContributionAnalytics, 'qa/ee/page/group/contribution_analytics'
module Iteration
autoload :Index, 'qa/ee/page/group/iteration/index'
autoload :New, 'qa/ee/page/group/iteration/new'
autoload :Show, 'qa/ee/page/group/iteration/show'
end
module Settings
autoload :SamlSSO, 'qa/ee/page/group/settings/saml_sso'
autoload :LDAPSync, 'qa/ee/page/group/settings/ldap_sync'
autoload :General, 'qa/ee/page/group/settings/general'
end
module Wiki
autoload :Show, 'qa/ee/page/group/wiki/show'
autoload :Edit, 'qa/ee/page/group/wiki/edit'
end
end
module File
autoload :Show, 'qa/ee/page/file/show'
end
module Main
autoload :Banner, 'qa/ee/page/main/banner'
end
module Registration
autoload :Welcome, 'qa/ee/page/registration/welcome'
end
module Admin
autoload :Menu, 'qa/ee/page/admin/menu'
autoload :License, 'qa/ee/page/admin/license'
module Geo
module Nodes
autoload :Show, 'qa/ee/page/admin/geo/nodes/show'
autoload :New, 'qa/ee/page/admin/geo/nodes/new'
end
end
module Monitoring
autoload :AuditLog, 'qa/ee/page/admin/monitoring/audit_log.rb'
end
module Settings
autoload :Templates, 'qa/ee/page/admin/settings/templates'
autoload :Preferences, 'qa/ee/page/admin/settings/preferences'
module Component
autoload :Email, 'qa/ee/page/admin/settings/component/email'
autoload :Elasticsearch, 'qa/ee/page/admin/settings/component/elasticsearch'
end
end
module Overview
module Groups
autoload :Edit, 'qa/ee/page/admin/overview/groups/edit'
end
end
end
module Milestone
autoload :Show, 'qa/ee/page/milestone/show'
end
module Profile
autoload :Menu, 'qa/ee/page/profile/menu'
end
module Project
autoload :New, 'qa/ee/page/project/new'
autoload :Show, 'qa/ee/page/project/show'
autoload :Menu, 'qa/ee/page/project/menu'
module SubMenus
autoload :SecurityCompliance, 'qa/ee/page/project/sub_menus/security_compliance'
autoload :Repository, 'qa/ee/page/project/sub_menus/repository'
autoload :Settings, 'qa/ee/page/project/sub_menus/settings'
autoload :Analytics, 'qa/ee/page/project/sub_menus/analytics'
autoload :LicenseCompliance, 'qa/ee/page/project/sub_menus/license_compliance'
end
module Issue
autoload :Index, 'qa/ee/page/project/issue/index'
autoload :Show, 'qa/ee/page/project/issue/show'
end
module Wiki
autoload :Show, 'qa/ee/page/project/wiki/show'
end
module Settings
autoload :ProtectedBranches, 'qa/ee/page/project/settings/protected_branches'
autoload :Main, 'qa/ee/page/project/settings/main'
autoload :MirroringRepositories, 'qa/ee/page/project/settings/mirroring_repositories'
autoload :ProtectedTags, 'qa/ee/page/project/settings/protected_tags'
autoload :MergeRequest, 'qa/ee/page/project/settings/merge_request'
autoload :MergeRequestApprovals, 'qa/ee/page/project/settings/merge_request_approvals'
autoload :Integrations, 'qa/ee/page/project/settings/integrations'
autoload :Repository, 'qa/ee/page/project/settings/repository'
autoload :PushRules, 'qa/ee/page/project/settings/push_rules'
autoload :IssueTemplateDefault, 'qa/ee/page/project/settings/issue_template_default.rb'
autoload :CICD, 'qa/ee/page/project/settings/ci_cd'
autoload :PipelineSubscriptions, 'qa/ee/page/project/settings/pipeline_subscriptions'
end
module Monitor
module Metrics
autoload :Show, 'qa/ee/page/project/monitor/metrics/show'
end
end
module Pipeline
autoload :Show, 'qa/ee/page/project/pipeline/show'
autoload :Index, 'qa/ee/page/project/pipeline/index'
end
module Secure
autoload :Show, 'qa/ee/page/project/secure/show'
autoload :DependencyList, 'qa/ee/page/project/secure/dependency_list'
autoload :SecurityDashboard, 'qa/ee/page/project/secure/security_dashboard'
autoload :VulnerabilityDetails, 'qa/ee/page/project/secure/vulnerability_details'
autoload :LicenseCompliance, 'qa/ee/page/project/secure/license_compliance'
autoload :ConfigurationForm, 'qa/ee/page/project/secure/configuration_form'
end
module PathLocks
autoload :Index, 'qa/ee/page/project/path_locks/index'
end
module Packages
autoload :Index, 'qa/ee/page/project/packages/index'
end
module Snippet
autoload :Index, 'qa/ee/page/project/snippet/index'
end
module Job
autoload :Show, 'qa/ee/page/project/job/show'
end
module ThreatMonitoring
autoload :Index, 'qa/ee/page/project/threat_monitoring/index'
autoload :AlertsList, 'qa/ee/page/project/threat_monitoring/alerts_list'
end
end
module MergeRequest
autoload :New, 'qa/ee/page/merge_request/new'
autoload :Show, 'qa/ee/page/merge_request/show'
end
module Group
autoload :IssuesAnalytics, 'qa/ee/page/group/issues_analytics'
autoload :Roadmap, 'qa/ee/page/group/roadmap'
module Epic
autoload :Index, 'qa/ee/page/group/epic/index'
autoload :New, 'qa/ee/page/group/epic/new'
autoload :Show, 'qa/ee/page/group/epic/show'
end
module Secure
autoload :Show, 'qa/ee/page/group/secure/show'
end
end
module Insights
autoload :Show, 'qa/ee/page/insights/show'
end
end
module Resource
autoload :License, 'qa/ee/resource/license'
autoload :Epic, 'qa/ee/resource/epic'
autoload :GroupIteration, 'qa/ee/resource/group_iteration'
autoload :ImportRepoWithCiCd, 'qa/ee/resource/import_repo_with_ci_cd'
autoload :PipelineSubscriptions, 'qa/ee/resource/pipeline_subscriptions'
autoload :GroupBase, 'qa/ee/resource/group_base'
module Board
autoload :BaseBoard, 'qa/ee/resource/board/base_board'
autoload :GroupBoard, 'qa/ee/resource/board/group_board'
autoload :ProjectBoard, 'qa/ee/resource/board/project_board'
module BoardList
module Group
autoload :BoardList, 'qa/ee/resource/board/board_list/group/board_list'
end
module Project
autoload :BaseBoardList, 'qa/ee/resource/board/board_list/project/base_board_list'
autoload :AssigneeBoardList, 'qa/ee/resource/board/board_list/project/assignee_board_list'
autoload :LabelBoardList, 'qa/ee/resource/board/board_list/project/label_board_list'
autoload :MilestoneBoardList, 'qa/ee/resource/board/board_list/project/milestone_board_list'
end
end
end
module Geo
autoload :Node, 'qa/ee/resource/geo/node'
end
module Settings
autoload :Elasticsearch, 'qa/ee/resource/settings/elasticsearch'
end
end
module Scenario
module Test
autoload :Geo, 'qa/ee/scenario/test/geo'
module Integration
autoload :GroupSAML, 'qa/ee/scenario/test/integration/group_saml'
autoload :Elasticsearch, 'qa/ee/scenario/test/integration/elasticsearch'
end
module Sanity
autoload :Selectors, 'qa/ee/scenario/test/sanity/selectors'
end
end
end
end
end
...@@ -5,7 +5,7 @@ module QA ...@@ -5,7 +5,7 @@ module QA
module Page module Page
module Project module Project
module Settings module Settings
module CICD module CiCd
extend QA::Page::PageConcern extend QA::Page::PageConcern
def self.prepended(base) def self.prepended(base)
......
...@@ -9,7 +9,7 @@ module QA ...@@ -9,7 +9,7 @@ module QA
def fabricate! def fabricate!
QA::Page::Project::Menu.perform(&:go_to_ci_cd_settings) QA::Page::Project::Menu.perform(&:go_to_ci_cd_settings)
QA::Page::Project::Settings::CICD.perform do |setting| QA::Page::Project::Settings::CiCd.perform do |setting|
setting.expand_pipeline_subscriptions do |page| setting.expand_pipeline_subscriptions do |page|
page.subscribe(project_path) page.subscribe(project_path)
end end
......
...@@ -5,11 +5,6 @@ module QA ...@@ -5,11 +5,6 @@ module QA
module Strategy module Strategy
extend self extend self
def extend_autoloads!
require 'qa/ce/strategy'
require 'qa/ee'
end
def perform_before_hooks def perform_before_hooks
# Without a license, perform the CE before hooks only. # Without a license, perform the CE before hooks only.
unless ENV['EE_LICENSE'] unless ENV['EE_LICENSE']
......
...@@ -67,7 +67,7 @@ module QA ...@@ -67,7 +67,7 @@ module QA
end end
def login_to_idp_if_required(username, password) def login_to_idp_if_required(username, password)
Vendor::SAMLIdp::Page::Login.perform { |login_page| login_page.login_if_required(username, password) } Vendor::SamlIdp::Page::Login.perform { |login_page| login_page.login_if_required(username, password) }
end end
end end
end end
......
...@@ -4,7 +4,6 @@ require 'cgi' ...@@ -4,7 +4,6 @@ require 'cgi'
require 'uri' require 'uri'
require 'fileutils' require 'fileutils'
require 'tmpdir' require 'tmpdir'
require 'securerandom'
module QA module QA
module Git module Git
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Page module Page
module Project module Project
......
...@@ -4,7 +4,7 @@ module QA ...@@ -4,7 +4,7 @@ module QA
module Page module Page
module Project module Project
module Settings module Settings
class CICD < Page::Base class CiCd < Page::Base
include QA::Page::Settings::Common include QA::Page::Settings::Common
view 'app/views/projects/settings/ci_cd/show.html.haml' do view 'app/views/projects/settings/ci_cd/show.html.haml' do
...@@ -43,4 +43,4 @@ module QA ...@@ -43,4 +43,4 @@ module QA
end end
end end
QA::Page::Project::Settings::CICD.prepend_mod_with("Page::Project::Settings::CICD", namespace: QA) QA::Page::Project::Settings::CiCd.prepend_mod_with("Page::Project::Settings::CiCd", namespace: QA)
# frozen_string_literal: true # frozen_string_literal: true
require 'pathname'
module QA module QA
module Page module Page
class View class View
......
...@@ -55,7 +55,7 @@ module QA ...@@ -55,7 +55,7 @@ module QA
end end
end end
include Support::Api include Support::API
attr_writer :api_resource, :api_response attr_writer :api_resource, :api_response
def api_put(body = api_put_body) def api_put(body = api_put_body)
......
...@@ -22,7 +22,7 @@ module QA ...@@ -22,7 +22,7 @@ module QA
Page::Project::Menu.perform(&:go_to_ci_cd_settings) Page::Project::Menu.perform(&:go_to_ci_cd_settings)
Page::Project::Settings::CICD.perform do |setting| Page::Project::Settings::CiCd.perform do |setting|
setting.expand_ci_variables do |page| setting.expand_ci_variables do |page|
page.click_add_variable page.click_add_variable
page.fill_variable(key, value, masked) page.fill_variable(key, value, masked)
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
class Issue < Base class Issue < Base
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
module KubernetesCluster module KubernetesCluster
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
# Base label class for GroupLabel and ProjectLabel # Base label class for GroupLabel and ProjectLabel
......
...@@ -12,7 +12,7 @@ module QA ...@@ -12,7 +12,7 @@ module QA
QA::Runtime::Logger.debug(%Q[Adding user #{user.username} to #{full_path} #{self.class.name}]) QA::Runtime::Logger.debug(%Q[Adding user #{user.username} to #{full_path} #{self.class.name}])
response = post Runtime::API::Request.new(api_client, api_members_path).url, { user_id: user.id, access_level: access_level } response = post Runtime::API::Request.new(api_client, api_members_path).url, { user_id: user.id, access_level: access_level }
response.code == QA::Support::Api::HTTP_STATUS_CREATED response.code == QA::Support::API::HTTP_STATUS_CREATED
end end
end end
...@@ -31,7 +31,7 @@ module QA ...@@ -31,7 +31,7 @@ module QA
QA::Runtime::Logger.debug(%Q[Sharing #{self.class.name} with #{group.name}]) QA::Runtime::Logger.debug(%Q[Sharing #{self.class.name} with #{group.name}])
response = post Runtime::API::Request.new(api_client, api_share_path).url, { group_id: group.id, group_access: access_level } response = post Runtime::API::Request.new(api_client, api_share_path).url, { group_id: group.id, group_access: access_level }
response.code == QA::Support::Api::HTTP_STATUS_CREATED response.code == QA::Support::API::HTTP_STATUS_CREATED
end end
end end
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
class MergeRequest < Base class MergeRequest < Base
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
class MergeRequestFromFork < MergeRequest class MergeRequestFromFork < MergeRequest
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
class Package < Base class Package < Base
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
class Project < Base class Project < Base
......
# frozen_string_literal: true # frozen_string_literal: true
require 'octokit'
module QA module QA
module Resource module Resource
class ProjectImportedFromGithub < Resource::Project class ProjectImportedFromGithub < Resource::Project
...@@ -68,7 +66,7 @@ module QA ...@@ -68,7 +66,7 @@ module QA
response = post(request_url(api_trigger_mirror_pull_path), nil) response = post(request_url(api_trigger_mirror_pull_path), nil)
Runtime::Logger.info "Mirror pull request response: #{response}" Runtime::Logger.info "Mirror pull request response: #{response}"
response.code == Support::Api::HTTP_STATUS_OK response.code == Support::API::HTTP_STATUS_OK
end end
end end
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
class ProjectImportedFromURL < Resource::Project class ProjectImportedFromURL < Resource::Project
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
class ProjectIssueNote < Base class ProjectIssueNote < Base
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
class ProtectedBranch < Base class ProtectedBranch < Base
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
class RegistryRepository < Base class RegistryRepository < Base
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
module Repository module Repository
......
# frozen_string_literal: true # frozen_string_literal: true
require 'pathname'
require 'securerandom'
module QA module QA
module Resource module Resource
module Repository module Repository
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
class Runner < Base class Runner < Base
......
...@@ -72,7 +72,7 @@ module QA ...@@ -72,7 +72,7 @@ module QA
Support::Retrier.retry_until(max_duration: QA::EE::Runtime::Geo.max_db_replication_time, sleep_interval: 3) do Support::Retrier.retry_until(max_duration: QA::EE::Runtime::Geo.max_db_replication_time, sleep_interval: 3) do
response = get Runtime::API::Request.new(api_client, api_get_path).url response = get Runtime::API::Request.new(api_client, api_get_path).url
response.code == QA::Support::Api::HTTP_STATUS_OK && response.code == QA::Support::API::HTTP_STATUS_OK &&
parse_body(response)[:title].include?(title) parse_body(response)[:title].include?(title)
end end
end end
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
class User < Base class User < Base
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Resource module Resource
module Wiki module Wiki
......
...@@ -12,8 +12,6 @@ module QA ...@@ -12,8 +12,6 @@ module QA
def configure! def configure!
return unless Env.generate_allure_report? return unless Env.generate_allure_report?
require 'allure-rspec'
configure_allure configure_allure
configure_attachments configure_attachments
configure_rspec configure_rspec
......
...@@ -5,7 +5,7 @@ module QA ...@@ -5,7 +5,7 @@ module QA
module API module API
module RepositoryStorageMoves module RepositoryStorageMoves
extend self extend self
extend Support::Api extend Support::API
RepositoryStorageMovesError = Class.new(RuntimeError) RepositoryStorageMovesError = Class.new(RuntimeError)
......
...@@ -4,7 +4,7 @@ module QA ...@@ -4,7 +4,7 @@ module QA
module Runtime module Runtime
class ApplicationSettings class ApplicationSettings
class << self class << self
include Support::Api include Support::API
APPLICATION_SETTINGS_PATH = '/application/settings' APPLICATION_SETTINGS_PATH = '/application/settings'
...@@ -18,7 +18,7 @@ module QA ...@@ -18,7 +18,7 @@ module QA
QA::Runtime::Logger.info("Setting application settings: #{application_settings}") QA::Runtime::Logger.info("Setting application settings: #{application_settings}")
r = put(Runtime::API::Request.new(api_client, APPLICATION_SETTINGS_PATH).url, **application_settings) r = put(Runtime::API::Request.new(api_client, APPLICATION_SETTINGS_PATH).url, **application_settings)
raise "Couldn't set application settings #{application_settings.inspect}" unless r.code == QA::Support::Api::HTTP_STATUS_OK raise "Couldn't set application settings #{application_settings.inspect}" unless r.code == QA::Support::API::HTTP_STATUS_OK
end end
def get_application_settings def get_application_settings
......
...@@ -4,7 +4,6 @@ require 'rspec/core' ...@@ -4,7 +4,6 @@ require 'rspec/core'
require 'rspec/expectations' require 'rspec/expectations'
require 'capybara/rspec' require 'capybara/rspec'
require 'capybara-screenshot/rspec' require 'capybara-screenshot/rspec'
require 'selenium-webdriver'
require 'webdrivers/chromedriver' require 'webdrivers/chromedriver'
require 'webdrivers/geckodriver' require 'webdrivers/geckodriver'
......
# frozen_string_literal: true # frozen_string_literal: true
require 'active_support/deprecation' require 'active_support/deprecation'
require 'gitlab/qa'
require 'uri' require 'uri'
module QA module QA
......
...@@ -8,7 +8,7 @@ module QA ...@@ -8,7 +8,7 @@ module QA
class << self class << self
# Documentation: https://docs.gitlab.com/ee/api/features.html # Documentation: https://docs.gitlab.com/ee/api/features.html
include Support::Api include Support::API
SetFeatureError = Class.new(RuntimeError) SetFeatureError = Class.new(RuntimeError)
AuthorizationError = Class.new(RuntimeError) AuthorizationError = Class.new(RuntimeError)
...@@ -17,7 +17,7 @@ module QA ...@@ -17,7 +17,7 @@ module QA
def remove(key) def remove(key)
request = Runtime::API::Request.new(api_client, "/features/#{key}") request = Runtime::API::Request.new(api_client, "/features/#{key}")
response = delete(request.url) response = delete(request.url)
unless response.code == QA::Support::Api::HTTP_STATUS_NO_CONTENT unless response.code == QA::Support::API::HTTP_STATUS_NO_CONTENT
raise SetFeatureError, "Deleting feature flag #{key} failed with `#{response}`." raise SetFeatureError, "Deleting feature flag #{key} failed with `#{response}`."
end end
end end
...@@ -100,7 +100,7 @@ module QA ...@@ -100,7 +100,7 @@ module QA
scopes[:user] = scopes[:user].username if scopes.key?(:user) scopes[:user] = scopes[:user].username if scopes.key?(:user)
request = Runtime::API::Request.new(api_client, "/features/#{key}") request = Runtime::API::Request.new(api_client, "/features/#{key}")
response = post(request.url, scopes.merge({ value: value })) response = post(request.url, scopes.merge({ value: value }))
unless response.code == QA::Support::Api::HTTP_STATUS_CREATED unless response.code == QA::Support::API::HTTP_STATUS_CREATED
raise SetFeatureError, "Setting feature flag #{key} to #{value} failed with `#{response}`." raise SetFeatureError, "Setting feature flag #{key} to #{value} failed with `#{response}`."
end end
end end
......
...@@ -5,7 +5,7 @@ require 'tmpdir' ...@@ -5,7 +5,7 @@ require 'tmpdir'
module QA module QA
module Runtime module Runtime
module Fixtures module Fixtures
include Support::Api include Support::API
TemplateNotFoundError = Class.new(RuntimeError) TemplateNotFoundError = Class.new(RuntimeError)
......
...@@ -4,7 +4,7 @@ require 'socket' ...@@ -4,7 +4,7 @@ require 'socket'
module QA module QA
module Runtime module Runtime
module IPAddress module IPAddress
include Support::Api include Support::API
HostUnreachableError = Class.new(StandardError) HostUnreachableError = Class.new(StandardError)
LOOPBACK_ADDRESS = '127.0.0.1' LOOPBACK_ADDRESS = '127.0.0.1'
...@@ -15,7 +15,7 @@ module QA ...@@ -15,7 +15,7 @@ module QA
# we use the public facing IP address # we use the public facing IP address
ip_address = if Env.running_in_ci? && !URI.parse(Scenario.gitlab_address).host.include?('test') ip_address = if Env.running_in_ci? && !URI.parse(Scenario.gitlab_address).host.include?('test')
response = get(PUBLIC_IP_ADDRESS_API) response = get(PUBLIC_IP_ADDRESS_API)
raise HostUnreachableError, "#{PUBLIC_IP_ADDRESS_API} is unreachable" unless response.code == Support::Api::HTTP_STATUS_OK raise HostUnreachableError, "#{PUBLIC_IP_ADDRESS_API} is unreachable" unless response.code == Support::API::HTTP_STATUS_OK
response.body response.body
elsif page.current_host.include?('localhost') elsif page.current_host.include?('localhost')
......
...@@ -13,10 +13,6 @@ module QA ...@@ -13,10 +13,6 @@ module QA
# CE to EE. # CE to EE.
# #
class Release class Release
def initialize
require "qa/#{version.downcase}/strategy"
end
def version def version
@version ||= ::File.directory?("#{__dir__}/../ee") ? :EE : :CE @version ||= ::File.directory?("#{__dir__}/../ee") ? :EE : :CE
end end
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
module Runtime module Runtime
module Search module Search
extend self extend self
extend Support::Api extend Support::API
RETRY_MAX_ITERATION = 10 RETRY_MAX_ITERATION = 10
RETRY_SLEEP_INTERVAL = 12 RETRY_SLEEP_INTERVAL = 12
......
# frozen_string_literal: true # frozen_string_literal: true
require 'resolv' require 'resolv'
require 'securerandom'
module QA module QA
module Service module Service
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
require 'mkmf' require 'mkmf'
require 'pathname'
module QA module QA
module Service module Service
......
# frozen_string_literal: true # frozen_string_literal: true
require 'octokit'
# rubocop:disable Rails/Pluck # rubocop:disable Rails/Pluck
module QA module QA
# Only executes in custom job/pipeline # Only executes in custom job/pipeline
......
...@@ -4,7 +4,7 @@ require 'airborne' ...@@ -4,7 +4,7 @@ require 'airborne'
module QA module QA
RSpec.describe 'Plan' do RSpec.describe 'Plan' do
include Support::Api include Support::API
describe 'Issue' do describe 'Issue' do
let(:issue) do let(:issue) do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Create' do RSpec.describe 'Create' do
describe 'Default branch name instance setting', :requires_admin, :skip_live_env do describe 'Default branch name instance setting', :requires_admin, :skip_live_env do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'airborne' require 'airborne'
require 'securerandom'
module QA module QA
RSpec.describe 'API basics' do RSpec.describe 'API basics' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'airborne' require 'airborne'
require 'securerandom'
require 'digest' require 'digest'
module QA module QA
RSpec.describe 'Create' do RSpec.describe 'Create' do
describe 'Compare archives of different user projects with the same name and check they\'re different' do describe 'Compare archives of different user projects with the same name and check they\'re different' do
include Support::Api include Support::API
let(:project_name) { "project-archive-download-#{SecureRandom.hex(8)}" } let(:project_name) { "project-archive-download-#{SecureRandom.hex(8)}" }
let(:archive_types) { %w(tar.gz tar.bz2 tar zip) } let(:archive_types) { %w(tar.gz tar.bz2 tar zip) }
......
...@@ -4,7 +4,7 @@ require 'airborne' ...@@ -4,7 +4,7 @@ require 'airborne'
module QA module QA
RSpec.describe 'Package', only: { subdomain: %i[staging pre] } do RSpec.describe 'Package', only: { subdomain: %i[staging pre] } do
include Support::Api include Support::API
describe 'Container Registry' do describe 'Container Registry' do
let(:api_client) { Runtime::API::Client.new(:gitlab) } let(:api_client) { Runtime::API::Client.new(:gitlab) }
......
...@@ -3,12 +3,15 @@ ...@@ -3,12 +3,15 @@
module QA module QA
RSpec.describe 'Manage', :orchestrated, :instance_saml do RSpec.describe 'Manage', :orchestrated, :instance_saml do
describe 'Instance wide SAML SSO' do describe 'Instance wide SAML SSO' do
it 'user logs in to gitlab with SAML SSO', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/671' do it(
'user logs in to gitlab with SAML SSO',
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/671'
) do
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_with_saml) Page::Main::Login.perform(&:sign_in_with_saml)
Vendor::SAMLIdp::Page::Login.perform do |login_page| Vendor::SamlIdp::Page::Login.perform do |login_page|
login_page.login('user1', 'user1pass') login_page.login('user1', 'user1pass')
end end
......
# frozen_string_literal: true # frozen_string_literal: true
require 'nokogiri'
module QA module QA
RSpec.describe 'Manage', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/212145', type: :stale } do RSpec.describe 'Manage', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/212145', type: :stale } do
describe 'Check for broken images', :requires_admin do describe 'Check for broken images', :requires_admin do
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
RSpec.describe 'Plan', :orchestrated, :smtp, :requires_admin do RSpec.describe 'Plan', :orchestrated, :smtp, :requires_admin do
describe 'Email Notification' do describe 'Email Notification' do
include Support::Api include Support::API
let!(:user) do let!(:user) do
Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1)
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Plan', :reliable do RSpec.describe 'Plan', :reliable do
describe 'Issues list' do describe 'Issues list' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Create', :requires_admin, :skip_live_env, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/195179', type: :flaky } do RSpec.describe 'Create', :requires_admin, :skip_live_env, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/195179', type: :flaky } do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module QA module QA
RSpec.describe 'Create' do RSpec.describe 'Create' do
include Support::Api include Support::API
describe 'Jira integration', :jira, :orchestrated, :requires_admin do describe 'Jira integration', :jira, :orchestrated, :requires_admin do
let(:jira_project_key) { 'JITP' } let(:jira_project_key) { 'JITP' }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Create' do RSpec.describe 'Create' do
describe 'File templates' do describe 'File templates' do
......
...@@ -9,7 +9,7 @@ module QA ...@@ -9,7 +9,7 @@ module QA
# tests are run in parallel). # tests are run in parallel).
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/218620#note_361634705 # See: https://gitlab.com/gitlab-org/gitlab/-/issues/218620#note_361634705
include Support::Api include Support::API
before(:context) do before(:context) do
@project = Resource::Project.fabricate_via_api! do |p| @project = Resource::Project.fabricate_via_api! do |p|
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Create' do RSpec.describe 'Create' do
describe 'Web IDE file templates' do describe 'Web IDE file templates' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'faker'
module QA module QA
RSpec.describe 'Verify', :runner do RSpec.describe 'Verify', :runner do
describe 'Pipeline with protected variable' do describe 'Pipeline with protected variable' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'faker'
module QA module QA
RSpec.describe 'Verify', :runner do RSpec.describe 'Verify', :runner do
describe 'Include multiple files from a project' do describe 'Include multiple files from a project' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'faker'
module QA module QA
RSpec.describe 'Verify', :runner do RSpec.describe 'Verify', :runner do
context 'When pipeline is blocked' do context 'When pipeline is blocked' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'faker'
module QA module QA
RSpec.describe 'Verify', :runner do RSpec.describe 'Verify', :runner do
context 'When job is configured to only run on merge_request_events' do context 'When job is configured to only run on merge_request_events' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'faker'
module QA module QA
RSpec.describe 'Verify', :runner do RSpec.describe 'Verify', :runner do
describe 'Pass dotenv variables to downstream via bridge' do describe 'Pass dotenv variables to downstream via bridge' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'faker'
module QA module QA
RSpec.describe 'Verify', :runner do RSpec.describe 'Verify', :runner do
describe "Trigger child pipeline with 'when:manual'" do describe "Trigger child pipeline with 'when:manual'" do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'faker'
module QA module QA
RSpec.describe 'Verify', :runner do RSpec.describe 'Verify', :runner do
describe 'Trigger matrix' do describe 'Trigger matrix' do
......
...@@ -21,7 +21,7 @@ module QA ...@@ -21,7 +21,7 @@ module QA
runner.project.visit! runner.project.visit!
Page::Project::Menu.perform(&:go_to_ci_cd_settings) Page::Project::Menu.perform(&:go_to_ci_cd_settings)
Page::Project::Settings::CICD.perform do |settings| Page::Project::Settings::CiCd.perform do |settings|
sleep 5 # Runner should register within 5 seconds sleep 5 # Runner should register within 5 seconds
settings.expand_runners_settings do |page| settings.expand_runners_settings do |page|
......
...@@ -49,7 +49,7 @@ module QA ...@@ -49,7 +49,7 @@ module QA
def configure_code_coverage(coverage_tool_pattern) def configure_code_coverage(coverage_tool_pattern)
Page::Project::Menu.perform(&:go_to_ci_cd_settings) Page::Project::Menu.perform(&:go_to_ci_cd_settings)
Page::Project::Settings::CICD.perform do |settings| Page::Project::Settings::CiCd.perform do |settings|
settings.expand_general_pipelines do |coverage| settings.expand_general_pipelines do |coverage|
coverage.configure_coverage_regex(coverage_tool_pattern) coverage.configure_coverage_regex(coverage_tool_pattern)
end end
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Package', :orchestrated, :packages, :object_storage do RSpec.describe 'Package', :orchestrated, :packages, :object_storage do
describe 'Composer Repository' do describe 'Composer Repository' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Package', :orchestrated, :packages, :reliable, :object_storage do RSpec.describe 'Package', :orchestrated, :packages, :reliable, :object_storage do
describe 'Maven Repository' do describe 'Maven Repository' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Package', :orchestrated, :packages, :object_storage do RSpec.describe 'Package', :orchestrated, :packages, :object_storage do
describe 'NuGet Repository' do describe 'NuGet Repository' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'pathname'
module QA module QA
RSpec.describe 'Configure' do RSpec.describe 'Configure' do
let(:project) do let(:project) do
...@@ -102,7 +100,7 @@ module QA ...@@ -102,7 +100,7 @@ module QA
project.visit! project.visit!
Page::Project::Menu.perform(&:go_to_ci_cd_settings) Page::Project::Menu.perform(&:go_to_ci_cd_settings)
Page::Project::Settings::CICD.perform(&:expand_auto_devops) Page::Project::Settings::CiCd.perform(&:expand_auto_devops)
Page::Project::Settings::AutoDevops.perform(&:enable_autodevops) Page::Project::Settings::AutoDevops.perform(&:enable_autodevops)
# Create AutoDevOps repo # Create AutoDevOps repo
......
# frozen_string_literal: true # frozen_string_literal: true
require 'airborne' require 'airborne'
require 'securerandom'
module QA module QA
RSpec.describe 'Enablement:Search' do RSpec.describe 'Enablement:Search' do
...@@ -52,7 +51,7 @@ module QA ...@@ -52,7 +51,7 @@ module QA
def expect_search_to_find_project(search_term) def expect_search_to_find_project(search_term)
QA::Support::Retrier.retry_on_exception(max_attempts: 10, sleep_interval: 12) do QA::Support::Retrier.retry_on_exception(max_attempts: 10, sleep_interval: 12) do
get Runtime::Search.create_search_request(api_client, 'projects', search_term).url get Runtime::Search.create_search_request(api_client, 'projects', search_term).url
expect_status(QA::Support::Api::HTTP_STATUS_OK) expect_status(QA::Support::API::HTTP_STATUS_OK)
raise 'Empty search result returned' if json_body.empty? raise 'Empty search result returned' if json_body.empty?
......
# frozen_string_literal: true # frozen_string_literal: true
require 'airborne' require 'airborne'
require 'securerandom'
module QA module QA
RSpec.describe 'Enablement:Search' do RSpec.describe 'Enablement:Search' do
...@@ -54,7 +53,7 @@ module QA ...@@ -54,7 +53,7 @@ module QA
it 'does not find a blob as an non-member user', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/746' do it 'does not find a blob as an non-member user', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/746' do
QA::Support::Retrier.retry_on_exception(max_attempts: 10, sleep_interval: 12) do QA::Support::Retrier.retry_on_exception(max_attempts: 10, sleep_interval: 12) do
get Runtime::Search.create_search_request(non_member_api_client, 'blobs', project_file_content).url get Runtime::Search.create_search_request(non_member_api_client, 'blobs', project_file_content).url
expect_status(QA::Support::Api::HTTP_STATUS_OK) expect_status(QA::Support::API::HTTP_STATUS_OK)
expect(json_body).to be_empty expect(json_body).to be_empty
end end
end end
...@@ -65,7 +64,7 @@ module QA ...@@ -65,7 +64,7 @@ module QA
def successful_search(api_client) def successful_search(api_client)
QA::Support::Retrier.retry_on_exception(max_attempts: 10, sleep_interval: 12) do QA::Support::Retrier.retry_on_exception(max_attempts: 10, sleep_interval: 12) do
get Runtime::Search.create_search_request(api_client, 'blobs', project_file_content).url get Runtime::Search.create_search_request(api_client, 'blobs', project_file_content).url
expect_status(QA::Support::Api::HTTP_STATUS_OK) expect_status(QA::Support::API::HTTP_STATUS_OK)
raise 'Empty search result returned' if json_body.empty? raise 'Empty search result returned' if json_body.empty?
......
# frozen_string_literal: true # frozen_string_literal: true
require 'airborne' require 'airborne'
require 'securerandom'
module QA module QA
RSpec.describe 'Enablement:Search' do RSpec.describe 'Enablement:Search' do
...@@ -44,7 +43,7 @@ module QA ...@@ -44,7 +43,7 @@ module QA
start_time = Time.now start_time = Time.now
while (Time.now - start_time) / 60 < p1_threshold while (Time.now - start_time) / 60 < p1_threshold
get Runtime::Search.create_search_request(api_client, 'blobs', project_file_content).url get Runtime::Search.create_search_request(api_client, 'blobs', project_file_content).url
expect_status(QA::Support::Api::HTTP_STATUS_OK) expect_status(QA::Support::API::HTTP_STATUS_OK)
if !json_body.empty? && json_body[0][:data].match(project_file_content) && json_body[0][:project_id].equal?(project.id) if !json_body.empty? && json_body[0][:data].match(project_file_content) && json_body[0][:project_id].equal?(project.id)
break break
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Manage' do RSpec.describe 'Manage' do
include Support::Api include Support::API
let(:api_client) { Runtime::API::Client.new(:gitlab) } let(:api_client) { Runtime::API::Client.new(:gitlab) }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Manage' do RSpec.describe 'Manage' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Manage' do RSpec.describe 'Manage' do
describe 'Group file templates', :requires_admin do describe 'Group file templates', :requires_admin do
include Support::Api include Support::API
templates = [ templates = [
{ {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
RSpec.describe 'Manage', :orchestrated, :ldap_tls, :ldap_no_tls, :requires_admin do RSpec.describe 'Manage', :orchestrated, :ldap_tls, :ldap_no_tls, :requires_admin do
describe 'LDAP Group sync' do describe 'LDAP Group sync' do
include Support::Api include Support::API
let(:group) do let(:group) do
Resource::Group.fabricate_via_api! do |resource| Resource::Group.fabricate_via_api! do |resource|
......
...@@ -4,7 +4,7 @@ module QA ...@@ -4,7 +4,7 @@ module QA
# TODO: Remove :requires_admin meta when the `Runtime::Feature.enable` method call is removed # TODO: Remove :requires_admin meta when the `Runtime::Feature.enable` method call is removed
RSpec.describe 'Manage', :group_saml, :orchestrated, :requires_admin do RSpec.describe 'Manage', :group_saml, :orchestrated, :requires_admin do
describe 'Group SAML SSO - Enforced SSO' do describe 'Group SAML SSO - Enforced SSO' do
include Support::Api include Support::API
let!(:group) do let!(:group) do
Resource::Sandbox.fabricate_via_api! do |sandbox_group| Resource::Sandbox.fabricate_via_api! do |sandbox_group|
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
RSpec.describe 'Manage', :group_saml, :orchestrated, :requires_admin do RSpec.describe 'Manage', :group_saml, :orchestrated, :requires_admin do
describe 'Group SAML SSO - Enforced SSO' do describe 'Group SAML SSO - Enforced SSO' do
include Support::Api include Support::API
let!(:group) do let!(:group) do
Resource::Sandbox.fabricate_via_api! do |sandbox_group| Resource::Sandbox.fabricate_via_api! do |sandbox_group|
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
RSpec.describe 'Manage', :group_saml, :orchestrated, :requires_admin do RSpec.describe 'Manage', :group_saml, :orchestrated, :requires_admin do
describe 'Group SAML SSO - Non enforced SSO' do describe 'Group SAML SSO - Non enforced SSO' do
include Support::Api include Support::API
let(:user) { Resource::User.fabricate_via_api! } let(:user) { Resource::User.fabricate_via_api! }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Manage' do RSpec.describe 'Manage' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
# Issue to enable this test in live environments: https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/614 # Issue to enable this test in live environments: https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/614
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Manage' do RSpec.describe 'Manage' do
describe 'Project templates' do describe 'Project templates' do
include Support::Api include Support::API
before(:all) do before(:all) do
@files = [ @files = [
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Plan', :reliable do RSpec.describe 'Plan', :reliable do
describe 'Custom email', :requires_admin do describe 'Custom email', :requires_admin do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Plan', :reliable do RSpec.describe 'Plan', :reliable do
describe 'Group issue boards' do describe 'Group issue boards' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Plan', :reliable do RSpec.describe 'Plan', :reliable do
describe 'Group issue boards' do describe 'Group issue boards' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'faker'
module QA module QA
RSpec.describe 'Verify' do RSpec.describe 'Verify' do
describe 'Cancelling merge request in merge train', :runner, :requires_admin do describe 'Cancelling merge request in merge train', :runner, :requires_admin do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'faker'
module QA module QA
RSpec.describe 'Verify', :docker, :runner do RSpec.describe 'Verify', :docker, :runner do
describe 'In merge trains' do describe 'In merge trains' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'octokit'
require 'faker'
require 'base64' require 'base64'
module QA module QA
......
# frozen_string_literal: true # frozen_string_literal: true
require 'faker'
module QA module QA
RSpec.describe 'Verify', :runner, :reliable do RSpec.describe 'Verify', :runner, :reliable do
describe 'Pipelines for merged results and merge trains' do describe 'Pipelines for merged results and merge trains' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Verify', :runner, :transient do RSpec.describe 'Verify', :runner, :transient do
describe 'Merge trains transient bugs' do describe 'Merge trains transient bugs' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Release' do RSpec.describe 'Release' do
describe 'Multi-project pipelines' do describe 'Multi-project pipelines' do
......
# frozen_string_literal: true # frozen_string_literal: true
require 'pathname'
require_relative '../../../browser_ui/8_monitor/cluster_with_prometheus' require_relative '../../../browser_ui/8_monitor/cluster_with_prometheus'
module QA module QA
......
# frozen_string_literal: true # frozen_string_literal: true
require 'securerandom'
module QA module QA
RSpec.describe 'Fulfillment', :requires_admin, only: { subdomain: :staging } do RSpec.describe 'Fulfillment', :requires_admin, only: { subdomain: :staging } do
describe 'Purchase' do describe 'Purchase' do
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
RSpec.describe 'Geo', :orchestrated, :geo do RSpec.describe 'Geo', :orchestrated, :geo do
describe 'GitLab Geo project deletion replication' do describe 'GitLab Geo project deletion replication' do
include Support::Api include Support::API
deleted_project_name = nil deleted_project_name = nil
deleted_project_id = nil deleted_project_id = nil
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment