qa.rb 8.99 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'
21 22 23 24 25

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

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

35 36 37 38 39
  ##
  # GitLab QA fabrication mechanisms
  #
  module Factory
    autoload :Base, 'qa/factory/base'
40 41
    autoload :Dependency, 'qa/factory/dependency'
    autoload :Product, 'qa/factory/product'
42 43 44 45

    module Resource
      autoload :Sandbox, 'qa/factory/resource/sandbox'
      autoload :Group, 'qa/factory/resource/group'
46
      autoload :Issue, 'qa/factory/resource/issue'
47
      autoload :Project, 'qa/factory/resource/project'
Felipe Artur's avatar
Felipe Artur committed
48
      autoload :MergeRequest, 'qa/factory/resource/merge_request'
49
      autoload :ProjectImportedFromGithub, 'qa/factory/resource/project_imported_from_github'
50
      autoload :MergeRequestFromFork, 'qa/factory/resource/merge_request_from_fork'
51
      autoload :DeployKey, 'qa/factory/resource/deploy_key'
52
      autoload :Branch, 'qa/factory/resource/branch'
53
      autoload :SecretVariable, 'qa/factory/resource/secret_variable'
54
      autoload :Runner, 'qa/factory/resource/runner'
55
      autoload :PersonalAccessToken, 'qa/factory/resource/personal_access_token'
56
      autoload :KubernetesCluster, 'qa/factory/resource/kubernetes_cluster'
57
      autoload :User, 'qa/factory/resource/user'
Dan Davison's avatar
Dan Davison committed
58
      autoload :ProjectMilestone, 'qa/factory/resource/project_milestone'
59
      autoload :Wiki, 'qa/factory/resource/wiki'
60
      autoload :File, 'qa/factory/resource/file'
61
      autoload :Fork, 'qa/factory/resource/fork'
62
      autoload :SSHKey, 'qa/factory/resource/ssh_key'
63 64 65 66
    end

    module Repository
      autoload :Push, 'qa/factory/repository/push'
67 68
      autoload :ProjectPush, 'qa/factory/repository/project_push'
      autoload :WikiPush, 'qa/factory/repository/wiki_push'
69 70 71 72 73 74 75
    end

    module Settings
      autoload :HashedStorage, 'qa/factory/settings/hashed_storage'
    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'
99
        autoload :LDAP, 'qa/scenario/test/integration/ldap'
100
        autoload :Kubernetes, 'qa/scenario/test/integration/kubernetes'
101
        autoload :Mattermost, 'qa/scenario/test/integration/mattermost'
102
        autoload :ObjectStorage, 'qa/scenario/test/integration/object_storage'
103
      end
104 105

      module Sanity
106
        autoload :Framework, 'qa/scenario/test/sanity/framework'
107 108
        autoload :Selectors, 'qa/scenario/test/sanity/selectors'
      end
109 110 111 112 113 114 115 116 117 118
    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'
119 120
    autoload :View, 'qa/page/view'
    autoload :Element, 'qa/page/element'
121
    autoload :Validator, 'qa/page/validator'
122 123

    module Main
124
      autoload :Login, 'qa/page/main/login'
125
      autoload :OAuth, 'qa/page/main/oauth'
126
      autoload :SignUp, 'qa/page/main/sign_up'
127 128
    end

129 130 131 132
    module Settings
      autoload :Common, 'qa/page/settings/common'
    end

Lin Jen-Shin's avatar
Lin Jen-Shin committed
133
    module Menu
134
      autoload :Main, 'qa/page/menu/main'
Lin Jen-Shin's avatar
Lin Jen-Shin committed
135
      autoload :Side, 'qa/page/menu/side'
136
      autoload :Admin, 'qa/page/menu/admin'
137
      autoload :Profile, 'qa/page/menu/profile'
Lin Jen-Shin's avatar
Lin Jen-Shin committed
138 139
    end

140
    module Dashboard
141
      autoload :Projects, 'qa/page/dashboard/projects'
142 143 144 145
      autoload :Groups, 'qa/page/dashboard/groups'
    end

    module Group
146
      autoload :New, 'qa/page/group/new'
147
      autoload :Show, 'qa/page/group/show'
148 149
    end

150 151 152 153 154 155 156 157 158
    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

159 160 161
    module Project
      autoload :New, 'qa/page/project/new'
      autoload :Show, 'qa/page/project/show'
Filipe Freire's avatar
Filipe Freire committed
162
      autoload :Activity, 'qa/page/project/activity'
163

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

168 169 170 171 172
      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
173 174 175 176
      module Job
        autoload :Show, 'qa/page/project/job/show'
      end

177
      module Settings
178
        autoload :Common, 'qa/page/project/settings/common'
179 180
        autoload :Advanced, 'qa/page/project/settings/advanced'
        autoload :Main, 'qa/page/project/settings/main'
181
        autoload :Repository, 'qa/page/project/settings/repository'
182
        autoload :CICD, 'qa/page/project/settings/ci_cd'
183
        autoload :DeployKeys, 'qa/page/project/settings/deploy_keys'
184
        autoload :ProtectedBranches, 'qa/page/project/settings/protected_branches'
185
        autoload :SecretVariables, 'qa/page/project/settings/secret_variables'
186
        autoload :Runners, 'qa/page/project/settings/runners'
Felipe Artur's avatar
Felipe Artur committed
187
        autoload :MergeRequest, 'qa/page/project/settings/merge_request'
188
      end
189 190 191 192 193 194

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

196 197 198 199
      module Fork
        autoload :New, 'qa/page/project/fork/new'
      end

Dan Davison's avatar
Dan Davison committed
200 201 202 203 204
      module Milestone
        autoload :New, 'qa/page/project/milestone/new'
        autoload :Index, 'qa/page/project/milestone/index'
      end

205 206 207 208 209 210 211 212
      module Operations
        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
213 214 215 216 217 218

      module Wiki
        autoload :Edit, 'qa/page/project/wiki/edit'
        autoload :New, 'qa/page/project/wiki/new'
        autoload :Show, 'qa/page/project/wiki/show'
      end
219 220 221 222

      module WebIDE
        autoload :Edit, 'qa/page/project/web_ide/edit'
      end
223 224
    end

225 226
    module Profile
      autoload :PersonalAccessTokens, 'qa/page/profile/personal_access_tokens'
227
      autoload :SSHKeys, 'qa/page/profile/ssh_keys'
228 229
    end

230
    module Issuable
231
      autoload :Sidebar, 'qa/page/issuable/sidebar'
232 233
    end

234 235 236 237
    module Layout
      autoload :Banner, 'qa/page/layout/banner'
    end

Felipe Artur's avatar
Felipe Artur committed
238 239
    module MergeRequest
      autoload :New, 'qa/page/merge_request/new'
Felipe Artur's avatar
Felipe Artur committed
240
      autoload :Show, 'qa/page/merge_request/show'
Felipe Artur's avatar
Felipe Artur committed
241 242
    end

243
    module Admin
244
      module Settings
245 246 247 248 249
        autoload :Repository, 'qa/page/admin/settings/repository'

        module Component
          autoload :RepositoryStorage, 'qa/page/admin/settings/component/repository_storage'
        end
250
      end
251
    end
252 253 254 255 256

    module Mattermost
      autoload :Main, 'qa/page/mattermost/main'
      autoload :Login, 'qa/page/mattermost/login'
    end
257 258 259 260 261

    ##
    # Classes describing components that are used by several pages.
    #
    module Component
262
      autoload :ClonePanel, 'qa/page/component/clone_panel'
263
      autoload :Dropzone, 'qa/page/component/dropzone'
264
      autoload :GroupsFilter, 'qa/page/component/groups_filter'
265
      autoload :Select2, 'qa/page/component/select2'
266 267
      autoload :DropdownFilter, 'qa/page/component/dropdown_filter'

268 269 270
      module Issuable
        autoload :Common, 'qa/page/component/issuable/common'
      end
271
    end
272 273 274 275 276 277 278
  end

  ##
  # Classes describing operations on Git repositories.
  #
  module Git
    autoload :Repository, 'qa/git/repository'
279
    autoload :Location, 'qa/git/location'
280 281
  end

282
  ##
283 284
  # Classes describing services being part of GitLab and how we can interact
  # with these services, like through the shell.
285
  #
286
  module Service
287
    autoload :Shellout, 'qa/service/shellout'
288
    autoload :KubernetesCluster, 'qa/service/kubernetes_cluster'
289 290
    autoload :Omnibus, 'qa/service/omnibus'
    autoload :Runner, 'qa/service/runner'
291 292
  end

293 294 295 296 297 298 299 300
  ##
  # Classes that make it possible to execute features tests.
  #
  module Specs
    autoload :Config, 'qa/specs/config'
    autoload :Runner, 'qa/specs/runner'
  end
end
301

302
QA::Runtime::Release.extend_autoloads!