qa.rb 10.2 KB
Newer Older
1 2
# frozen_string_literal: true

3
$: << File.expand_path(File.dirname(__FILE__))
4

5 6
Encoding.default_external = 'UTF-8'

7 8 9 10 11
module QA
  ##
  # GitLab QA runtime classes, mostly singletons.
  #
  module Runtime
12
    autoload :Release, 'qa/runtime/release'
13 14
    autoload :User, 'qa/runtime/user'
    autoload :Namespace, 'qa/runtime/namespace'
15
    autoload :Scenario, 'qa/runtime/scenario'
16
    autoload :Browser, 'qa/runtime/browser'
17
    autoload :Env, 'qa/runtime/env'
18
    autoload :Address, 'qa/runtime/address'
19 20
    autoload :Path, 'qa/runtime/path'
    autoload :Fixtures, 'qa/runtime/fixtures'
Mark Lapierre's avatar
Mark Lapierre committed
21
    autoload :Logger, 'qa/runtime/logger'
22 23 24 25 26

    module API
      autoload :Client, 'qa/runtime/api/client'
      autoload :Request, 'qa/runtime/api/request'
    end
27 28

    module Key
29
      autoload :Base, 'qa/runtime/key/base'
30
      autoload :RSA, 'qa/runtime/key/rsa'
31 32
      autoload :ECDSA, 'qa/runtime/key/ecdsa'
      autoload :ED25519, 'qa/runtime/key/ed25519'
33
    end
34 35
  end

36 37 38
  ##
  # GitLab QA fabrication mechanisms
  #
39 40 41
  module Resource
    autoload :ApiFabricator, 'qa/resource/api_fabricator'
    autoload :Base, 'qa/resource/base'
42

43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
    autoload :Sandbox, 'qa/resource/sandbox'
    autoload :Group, 'qa/resource/group'
    autoload :Issue, 'qa/resource/issue'
    autoload :Project, 'qa/resource/project'
    autoload :Label, 'qa/resource/label'
    autoload :MergeRequest, 'qa/resource/merge_request'
    autoload :ProjectImportedFromGithub, 'qa/resource/project_imported_from_github'
    autoload :MergeRequestFromFork, 'qa/resource/merge_request_from_fork'
    autoload :DeployKey, 'qa/resource/deploy_key'
    autoload :DeployToken, 'qa/resource/deploy_token'
    autoload :Branch, 'qa/resource/branch'
    autoload :CiVariable, 'qa/resource/ci_variable'
    autoload :Runner, 'qa/resource/runner'
    autoload :PersonalAccessToken, 'qa/resource/personal_access_token'
    autoload :KubernetesCluster, 'qa/resource/kubernetes_cluster'
    autoload :User, 'qa/resource/user'
    autoload :ProjectMilestone, 'qa/resource/project_milestone'
    autoload :Wiki, 'qa/resource/wiki'
    autoload :File, 'qa/resource/file'
    autoload :Fork, 'qa/resource/fork'
    autoload :SSHKey, 'qa/resource/ssh_key'
64 65

    module Repository
66 67 68
      autoload :Push, 'qa/resource/repository/push'
      autoload :ProjectPush, 'qa/resource/repository/project_push'
      autoload :WikiPush, 'qa/resource/repository/wiki_push'
69 70 71
    end

    module Settings
72
      autoload :HashedStorage, 'qa/resource/settings/hashed_storage'
73 74 75
    end
  end

76 77 78 79 80 81 82
  ##
  # GitLab QA Scenarios
  #
  module Scenario
    ##
    # Support files
    #
83
    autoload :Bootable, 'qa/scenario/bootable'
84 85 86 87 88 89 90
    autoload :Actable, 'qa/scenario/actable'
    autoload :Template, 'qa/scenario/template'

    ##
    # Test scenario entrypoints.
    #
    module Test
91
      autoload :Instance, 'qa/scenario/test/instance'
92 93 94 95
      module Instance
        autoload :All, 'qa/scenario/test/instance/all'
        autoload :Smoke, 'qa/scenario/test/instance/smoke'
      end
96 97

      module Integration
98
        autoload :Github, 'qa/scenario/test/integration/github'
Sanad Liaquat's avatar
Sanad Liaquat committed
99 100
        autoload :LDAPNoTLS, 'qa/scenario/test/integration/ldap_no_tls'
        autoload :LDAPTLS, 'qa/scenario/test/integration/ldap_tls'
Sanad Liaquat's avatar
Sanad Liaquat committed
101
        autoload :InstanceSAML, 'qa/scenario/test/integration/instance_saml'
102
        autoload :Kubernetes, 'qa/scenario/test/integration/kubernetes'
103
        autoload :Mattermost, 'qa/scenario/test/integration/mattermost'
104
        autoload :ObjectStorage, 'qa/scenario/test/integration/object_storage'
105
      end
106 107

      module Sanity
108
        autoload :Framework, 'qa/scenario/test/sanity/framework'
109 110
        autoload :Selectors, 'qa/scenario/test/sanity/selectors'
      end
111 112 113 114 115 116 117 118 119 120
    end
  end

  ##
  # Classes describing structure of GitLab, pages, menus etc.
  #
  # Needed to execute click-driven-only black-box tests.
  #
  module Page
    autoload :Base, 'qa/page/base'
121 122
    autoload :View, 'qa/page/view'
    autoload :Element, 'qa/page/element'
123
    autoload :Validator, 'qa/page/validator'
124 125

    module Main
126
      autoload :Login, 'qa/page/main/login'
sliaquat's avatar
sliaquat committed
127
      autoload :Menu, 'qa/page/main/menu'
128
      autoload :OAuth, 'qa/page/main/oauth'
129
      autoload :SignUp, 'qa/page/main/sign_up'
130 131
    end

132 133 134 135
    module Settings
      autoload :Common, 'qa/page/settings/common'
    end

136
    module Dashboard
137
      autoload :Projects, 'qa/page/dashboard/projects'
138 139 140 141
      autoload :Groups, 'qa/page/dashboard/groups'
    end

    module Group
142
      autoload :New, 'qa/page/group/new'
143
      autoload :Show, 'qa/page/group/show'
144 145
    end

146 147 148 149 150 151 152 153 154
    module File
      autoload :Form, 'qa/page/file/form'
      autoload :Show, 'qa/page/file/show'

      module Shared
        autoload :CommitMessage, 'qa/page/file/shared/commit_message'
      end
    end

155 156 157
    module Project
      autoload :New, 'qa/page/project/new'
      autoload :Show, 'qa/page/project/show'
Filipe Freire's avatar
Filipe Freire committed
158
      autoload :Activity, 'qa/page/project/activity'
sliaquat's avatar
sliaquat committed
159
      autoload :Menu, 'qa/page/project/menu'
160

161 162 163 164
      module Commit
        autoload :Show, 'qa/page/project/commit/show'
      end

165 166 167 168
      module Import
        autoload :Github, 'qa/page/project/import/github'
      end

169 170 171 172 173
      module Pipeline
        autoload :Index, 'qa/page/project/pipeline/index'
        autoload :Show, 'qa/page/project/pipeline/show'
      end

Lin Jen-Shin's avatar
WIP  
Lin Jen-Shin committed
174 175 176 177
      module Job
        autoload :Show, 'qa/page/project/job/show'
      end

178
      module Settings
179
        autoload :Common, 'qa/page/project/settings/common'
180 181
        autoload :Advanced, 'qa/page/project/settings/advanced'
        autoload :Main, 'qa/page/project/settings/main'
182
        autoload :Repository, 'qa/page/project/settings/repository'
183
        autoload :CICD, 'qa/page/project/settings/ci_cd'
184
        autoload :DeployKeys, 'qa/page/project/settings/deploy_keys'
185
        autoload :DeployTokens, 'qa/page/project/settings/deploy_tokens'
186
        autoload :ProtectedBranches, 'qa/page/project/settings/protected_branches'
187
        autoload :CiVariables, 'qa/page/project/settings/ci_variables'
188
        autoload :Runners, 'qa/page/project/settings/runners'
Felipe Artur's avatar
Felipe Artur committed
189
        autoload :MergeRequest, 'qa/page/project/settings/merge_request'
190
        autoload :Members, 'qa/page/project/settings/members'
191
        autoload :MirroringRepositories, 'qa/page/project/settings/mirroring_repositories'
192
      end
193 194 195 196 197 198

      module Issue
        autoload :New, 'qa/page/project/issue/new'
        autoload :Show, 'qa/page/project/issue/show'
        autoload :Index, 'qa/page/project/issue/index'
      end
199

200 201 202 203
      module Fork
        autoload :New, 'qa/page/project/fork/new'
      end

Dan Davison's avatar
Dan Davison committed
204 205 206 207 208
      module Milestone
        autoload :New, 'qa/page/project/milestone/new'
        autoload :Index, 'qa/page/project/milestone/index'
      end

209
      module Operations
210 211 212 213 214
        module Environments
          autoload :Index, 'qa/page/project/operations/environments/index'
          autoload :Show, 'qa/page/project/operations/environments/show'
        end

215 216 217 218 219 220 221
        module Kubernetes
          autoload :Index, 'qa/page/project/operations/kubernetes/index'
          autoload :Add, 'qa/page/project/operations/kubernetes/add'
          autoload :AddExisting, 'qa/page/project/operations/kubernetes/add_existing'
          autoload :Show, 'qa/page/project/operations/kubernetes/show'
        end
      end
222 223 224 225 226 227

      module Wiki
        autoload :Edit, 'qa/page/project/wiki/edit'
        autoload :New, 'qa/page/project/wiki/new'
        autoload :Show, 'qa/page/project/wiki/show'
      end
228 229 230 231

      module WebIDE
        autoload :Edit, 'qa/page/project/web_ide/edit'
      end
232 233
    end

234
    module Profile
sliaquat's avatar
sliaquat committed
235
      autoload :Menu, 'qa/page/profile/menu'
236
      autoload :PersonalAccessTokens, 'qa/page/profile/personal_access_tokens'
237
      autoload :SSHKeys, 'qa/page/profile/ssh_keys'
238 239
    end

240
    module Issuable
241
      autoload :Sidebar, 'qa/page/issuable/sidebar'
242 243
    end

244 245 246 247
    module Layout
      autoload :Banner, 'qa/page/layout/banner'
    end

248 249 250 251 252
    module Label
      autoload :New, 'qa/page/label/new'
      autoload :Index, 'qa/page/label/index'
    end

Felipe Artur's avatar
Felipe Artur committed
253 254
    module MergeRequest
      autoload :New, 'qa/page/merge_request/new'
Felipe Artur's avatar
Felipe Artur committed
255
      autoload :Show, 'qa/page/merge_request/show'
Felipe Artur's avatar
Felipe Artur committed
256 257
    end

258
    module Admin
sliaquat's avatar
sliaquat committed
259 260
      autoload :Menu, 'qa/page/admin/menu'

261
      module Settings
262 263 264 265 266
        autoload :Repository, 'qa/page/admin/settings/repository'

        module Component
          autoload :RepositoryStorage, 'qa/page/admin/settings/component/repository_storage'
        end
267
      end
268
    end
269 270 271 272 273

    module Mattermost
      autoload :Main, 'qa/page/mattermost/main'
      autoload :Login, 'qa/page/mattermost/login'
    end
274 275 276 277 278

    ##
    # Classes describing components that are used by several pages.
    #
    module Component
279
      autoload :ClonePanel, 'qa/page/component/clone_panel'
280
      autoload :LegacyClonePanel, 'qa/page/component/legacy_clone_panel'
281
      autoload :Dropzone, 'qa/page/component/dropzone'
282
      autoload :GroupsFilter, 'qa/page/component/groups_filter'
283
      autoload :Select2, 'qa/page/component/select2'
284
      autoload :DropdownFilter, 'qa/page/component/dropdown_filter'
285
      autoload :UsersSelect, 'qa/page/component/users_select'
286

287 288 289
      module Issuable
        autoload :Common, 'qa/page/component/issuable/common'
      end
290
    end
291 292 293 294 295 296 297
  end

  ##
  # Classes describing operations on Git repositories.
  #
  module Git
    autoload :Repository, 'qa/git/repository'
298
    autoload :Location, 'qa/git/location'
299 300
  end

301
  ##
302 303
  # Classes describing services being part of GitLab and how we can interact
  # with these services, like through the shell.
304
  #
305
  module Service
306
    autoload :Shellout, 'qa/service/shellout'
307
    autoload :KubernetesCluster, 'qa/service/kubernetes_cluster'
308 309
    autoload :Omnibus, 'qa/service/omnibus'
    autoload :Runner, 'qa/service/runner'
310 311
  end

312 313 314 315 316 317 318
  ##
  # Classes that make it possible to execute features tests.
  #
  module Specs
    autoload :Config, 'qa/specs/config'
    autoload :Runner, 'qa/specs/runner'
  end
Sanad Liaquat's avatar
Sanad Liaquat committed
319 320 321 322 323 324 325 326 327 328 329 330

  ##
  # Classes that describe the structure of vendor/third party application pages
  #
  module Vendor
    module SAMLIdp
      module Page
        autoload :Base, 'qa/vendor/saml_idp/page/base'
        autoload :Login, 'qa/vendor/saml_idp/page/login'
      end
    end
  end
Mark Lapierre's avatar
Mark Lapierre committed
331 332 333 334 335 336 337

  # Classes that provide support to other parts of the framework.
  #
  module Support
    module Page
      autoload :Logging, 'qa/support/page/logging'
    end
Sanad Liaquat's avatar
Sanad Liaquat committed
338
    autoload :Api, 'qa/support/api'
Mark Lapierre's avatar
Mark Lapierre committed
339
  end
340
end
341

342
QA::Runtime::Release.extend_autoloads!