chemlab 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chemlab.rb +35 -0
- data/lib/chemlab/api_fabricator.rb +134 -0
- data/lib/chemlab/attributable.rb +25 -0
- data/lib/chemlab/component.rb +87 -0
- data/lib/chemlab/configuration.rb +39 -0
- data/lib/chemlab/element.rb +22 -0
- data/lib/chemlab/page.rb +13 -0
- data/lib/chemlab/resource.rb +169 -0
- data/lib/chemlab/runtime/api_client.rb +18 -0
- data/lib/chemlab/runtime/browser.rb +66 -0
- data/lib/chemlab/runtime/env.rb +22 -0
- data/{qa → lib/chemlab}/runtime/logger.rb +1 -1
- data/{qa → lib/chemlab}/support/api.rb +2 -2
- data/lib/chemlab/support/logging.rb +176 -0
- data/{qa → lib/chemlab}/support/repeater.rb +1 -1
- data/{qa → lib/chemlab}/support/waiter.rb +2 -2
- data/lib/chemlab/version.rb +1 -1
- metadata +56 -629
- data/.gitignore +0 -4
- data/.rspec +0 -3
- data/.rspec_parallel +0 -5
- data/Dockerfile +0 -68
- data/Gemfile +0 -23
- data/Gemfile.lock +0 -137
- data/README.md +0 -201
- data/Rakefile +0 -47
- data/bin/qa +0 -7
- data/bin/test +0 -3
- data/chemlab.gemspec +0 -43
- data/knapsack/master_report.json +0 -54
- data/qa.rb +0 -513
- data/qa/ce/strategy.rb +0 -21
- data/qa/ee.rb +0 -234
- data/qa/ee/fixtures/gpg/admin.asc +0 -0
- data/qa/ee/fixtures/secure_license_files/.gitlab-ci.yml +0 -12
- data/qa/ee/fixtures/secure_license_files/gl-license-management-report.json +0 -24
- data/qa/ee/fixtures/secure_premade_reports/.gitlab-ci.yml +0 -61
- data/qa/ee/fixtures/secure_premade_reports/gl-container-scanning-report.json +0 -105
- data/qa/ee/fixtures/secure_premade_reports/gl-dast-report.json +0 -1
- data/qa/ee/fixtures/secure_premade_reports/gl-dependency-scanning-report.json +0 -226
- data/qa/ee/fixtures/secure_premade_reports/gl-license-management-report.json +0 -42
- data/qa/ee/fixtures/secure_premade_reports/gl-sast-report.json +0 -152
- data/qa/ee/fixtures/secure_premade_reports/yarn.lock +0 -10024
- data/qa/ee/page/admin/geo/nodes/new.rb +0 -36
- data/qa/ee/page/admin/geo/nodes/show.rb +0 -23
- data/qa/ee/page/admin/license.rb +0 -41
- data/qa/ee/page/admin/menu.rb +0 -55
- data/qa/ee/page/admin/monitoring/audit_log.rb +0 -27
- data/qa/ee/page/admin/overview/groups/edit.rb +0 -27
- data/qa/ee/page/admin/settings/component/elasticsearch.rb +0 -38
- data/qa/ee/page/admin/settings/component/email.rb +0 -35
- data/qa/ee/page/admin/settings/integration.rb +0 -25
- data/qa/ee/page/admin/settings/preferences.rb +0 -25
- data/qa/ee/page/admin/settings/templates.rb +0 -40
- data/qa/ee/page/component/design_management.rb +0 -80
- data/qa/ee/page/component/issue_board/show.rb +0 -154
- data/qa/ee/page/component/license_management.rb +0 -62
- data/qa/ee/page/component/secure_report.rb +0 -38
- data/qa/ee/page/component/web_ide/web_terminal_panel.rb +0 -58
- data/qa/ee/page/dashboard/projects.rb +0 -54
- data/qa/ee/page/file/show.rb +0 -49
- data/qa/ee/page/group/contribution_analytics.rb +0 -29
- data/qa/ee/page/group/epic/index.rb +0 -46
- data/qa/ee/page/group/epic/show.rb +0 -74
- data/qa/ee/page/group/issues_analytics.rb +0 -33
- data/qa/ee/page/group/members.rb +0 -19
- data/qa/ee/page/group/menu.rb +0 -117
- data/qa/ee/page/group/roadmap.rb +0 -34
- data/qa/ee/page/group/saml_sso_sign_in.rb +0 -22
- data/qa/ee/page/group/saml_sso_sign_up.rb +0 -34
- data/qa/ee/page/group/secure/show.rb +0 -24
- data/qa/ee/page/group/settings/general.rb +0 -112
- data/qa/ee/page/group/settings/ldap_sync.rb +0 -38
- data/qa/ee/page/group/settings/saml_sso.rb +0 -93
- data/qa/ee/page/insights/show.rb +0 -51
- data/qa/ee/page/main/banner.rb +0 -19
- data/qa/ee/page/merge_request/new.rb +0 -74
- data/qa/ee/page/merge_request/show.rb +0 -326
- data/qa/ee/page/profile/menu.rb +0 -15
- data/qa/ee/page/project/issue/index.rb +0 -46
- data/qa/ee/page/project/issue/show.rb +0 -97
- data/qa/ee/page/project/menu.rb +0 -17
- data/qa/ee/page/project/milestone/show.rb +0 -41
- data/qa/ee/page/project/new.rb +0 -56
- data/qa/ee/page/project/operations/kubernetes/show.rb +0 -50
- data/qa/ee/page/project/operations/metrics/show.rb +0 -101
- data/qa/ee/page/project/packages/index.rb +0 -30
- data/qa/ee/page/project/packages/show.rb +0 -29
- data/qa/ee/page/project/path_locks/index.rb +0 -30
- data/qa/ee/page/project/pipeline/show.rb +0 -34
- data/qa/ee/page/project/secure/dependency_list.rb +0 -19
- data/qa/ee/page/project/secure/show.rb +0 -17
- data/qa/ee/page/project/settings/ci_cd.rb +0 -25
- data/qa/ee/page/project/settings/integrations.rb +0 -21
- data/qa/ee/page/project/settings/license_compliance.rb +0 -67
- data/qa/ee/page/project/settings/merge_request.rb +0 -27
- data/qa/ee/page/project/settings/mirroring_repositories.rb +0 -30
- data/qa/ee/page/project/settings/protected_branches.rb +0 -37
- data/qa/ee/page/project/settings/push_rules.rb +0 -82
- data/qa/ee/page/project/settings/repository.rb +0 -27
- data/qa/ee/page/project/settings/services/jenkins.rb +0 -56
- data/qa/ee/page/project/show.rb +0 -35
- data/qa/ee/page/project/sub_menus/packages.rb +0 -27
- data/qa/ee/page/project/sub_menus/project.rb +0 -21
- data/qa/ee/page/project/sub_menus/repository.rb +0 -29
- data/qa/ee/page/project/sub_menus/security_compliance.rb +0 -44
- data/qa/ee/page/project/sub_menus/settings.rb +0 -42
- data/qa/ee/page/project/wiki/show.rb +0 -31
- data/qa/ee/resource/board/base_board.rb +0 -26
- data/qa/ee/resource/board/board_list/group/board_list.rb +0 -57
- data/qa/ee/resource/board/board_list/project/assignee_board_list.rb +0 -23
- data/qa/ee/resource/board/board_list/project/base_board_list.rb +0 -50
- data/qa/ee/resource/board/board_list/project/label_board_list.rb +0 -28
- data/qa/ee/resource/board/board_list/project/milestone_board_list.rb +0 -28
- data/qa/ee/resource/board/group_board.rb +0 -25
- data/qa/ee/resource/board/project_board.rb +0 -25
- data/qa/ee/resource/epic.rb +0 -60
- data/qa/ee/resource/geo/node.rb +0 -31
- data/qa/ee/resource/group_label.rb +0 -50
- data/qa/ee/resource/license.rb +0 -21
- data/qa/ee/resource/project_milestone.rb +0 -20
- data/qa/ee/resource/settings/elasticsearch.rb +0 -60
- data/qa/ee/runtime/env.rb +0 -30
- data/qa/ee/runtime/geo.rb +0 -28
- data/qa/ee/runtime/saml.rb +0 -37
- data/qa/ee/scenario/test/geo.rb +0 -211
- data/qa/ee/scenario/test/integration/elasticsearch.rb +0 -15
- data/qa/ee/scenario/test/integration/group_saml.rb +0 -17
- data/qa/ee/scenario/test/sanity/selectors.rb +0 -17
- data/qa/ee/strategy.rb +0 -28
- data/qa/fixtures/auto_devops_rack/Dockerfile +0 -9
- data/qa/fixtures/auto_devops_rack/Gemfile +0 -3
- data/qa/fixtures/auto_devops_rack/Gemfile.lock +0 -15
- data/qa/fixtures/auto_devops_rack/Rakefile +0 -7
- data/qa/fixtures/auto_devops_rack/config.ru +0 -1
- data/qa/fixtures/ldap/admin/1_add_nodes.ldif +0 -7
- data/qa/fixtures/ldap/admin/2_add_users.ldif +0 -63
- data/qa/fixtures/ldap/admin/3_add_groups.ldif +0 -16
- data/qa/fixtures/ldap/non_admin/1_add_nodes.ldif +0 -7
- data/qa/fixtures/ldap/non_admin/2_add_users.ldif +0 -61
- data/qa/fixtures/ldap/non_admin/3_add_groups.ldif +0 -16
- data/qa/fixtures/monitored_auto_devops/.gitlab-ci.yml +0 -337
- data/qa/flow/login.rb +0 -39
- data/qa/flow/project.rb +0 -19
- data/qa/flow/saml.rb +0 -72
- data/qa/flow/user.rb +0 -26
- data/qa/git/location.rb +0 -34
- data/qa/git/repository.rb +0 -269
- data/qa/page/admin/menu.rb +0 -110
- data/qa/page/admin/new_session.rb +0 -22
- data/qa/page/admin/overview/groups/edit.rb +0 -23
- data/qa/page/admin/overview/groups/index.rb +0 -32
- data/qa/page/admin/overview/groups/show.rb +0 -21
- data/qa/page/admin/overview/users/index.rb +0 -35
- data/qa/page/admin/overview/users/show.rb +0 -31
- data/qa/page/admin/settings/component/account_and_limit.rb +0 -26
- data/qa/page/admin/settings/component/ip_limits.rb +0 -30
- data/qa/page/admin/settings/component/outbound_requests.rb +0 -33
- data/qa/page/admin/settings/component/performance_bar.rb +0 -27
- data/qa/page/admin/settings/component/repository_storage.rb +0 -26
- data/qa/page/admin/settings/general.rb +0 -23
- data/qa/page/admin/settings/metrics_and_profiling.rb +0 -23
- data/qa/page/admin/settings/network.rb +0 -30
- data/qa/page/admin/settings/repository.rb +0 -23
- data/qa/page/alert/auto_devops_alert.rb +0 -13
- data/qa/page/base.rb +0 -348
- data/qa/page/component/breadcrumbs.rb +0 -19
- data/qa/page/component/ci_badge_link.rb +0 -49
- data/qa/page/component/clone_panel.rb +0 -38
- data/qa/page/component/confirm_modal.rb +0 -25
- data/qa/page/component/dropdown_filter.rb +0 -16
- data/qa/page/component/dropzone.rb +0 -33
- data/qa/page/component/groups_filter.rb +0 -37
- data/qa/page/component/issuable/common.rb +0 -31
- data/qa/page/component/lazy_loader.rb +0 -15
- data/qa/page/component/legacy_clone_panel.rb +0 -47
- data/qa/page/component/note.rb +0 -84
- data/qa/page/component/select2.rb +0 -48
- data/qa/page/component/users_select.rb +0 -14
- data/qa/page/component/web_ide/alert.rb +0 -27
- data/qa/page/dashboard/groups.rb +0 -34
- data/qa/page/dashboard/projects.rb +0 -37
- data/qa/page/dashboard/snippet/index.rb +0 -21
- data/qa/page/dashboard/snippet/new.rb +0 -70
- data/qa/page/dashboard/snippet/show.rb +0 -63
- data/qa/page/dashboard/welcome.rb +0 -17
- data/qa/page/element.rb +0 -55
- data/qa/page/file/edit.rb +0 -13
- data/qa/page/file/form.rb +0 -49
- data/qa/page/file/shared/commit_button.rb +0 -25
- data/qa/page/file/shared/commit_message.rb +0 -21
- data/qa/page/file/shared/editor.rb +0 -33
- data/qa/page/file/show.rb +0 -36
- data/qa/page/group/menu.rb +0 -52
- data/qa/page/group/new.rb +0 -37
- data/qa/page/group/settings/general.rb +0 -115
- data/qa/page/group/show.rb +0 -74
- data/qa/page/group/sub_menus/common.rb +0 -27
- data/qa/page/group/sub_menus/members.rb +0 -45
- data/qa/page/issuable/sidebar.rb +0 -27
- data/qa/page/label/index.rb +0 -34
- data/qa/page/label/new.rb +0 -32
- data/qa/page/layout/banner.rb +0 -19
- data/qa/page/layout/performance_bar.rb +0 -41
- data/qa/page/main/login.rb +0 -181
- data/qa/page/main/menu.rb +0 -150
- data/qa/page/main/oauth.rb +0 -21
- data/qa/page/main/sign_up.rb +0 -37
- data/qa/page/main/terms.rb +0 -21
- data/qa/page/mattermost/login.rb +0 -28
- data/qa/page/mattermost/main.rb +0 -15
- data/qa/page/merge_request/new.rb +0 -68
- data/qa/page/merge_request/show.rb +0 -232
- data/qa/page/profile/emails.rb +0 -29
- data/qa/page/profile/menu.rb +0 -52
- data/qa/page/profile/password.rb +0 -23
- data/qa/page/profile/personal_access_tokens.rb +0 -67
- data/qa/page/profile/ssh_keys.rb +0 -42
- data/qa/page/profile/two_factor_auth.rb +0 -17
- data/qa/page/project/activity.rb +0 -17
- data/qa/page/project/branches/show.rb +0 -56
- data/qa/page/project/commit/show.rb +0 -32
- data/qa/page/project/fork/new.rb +0 -19
- data/qa/page/project/import/github.rb +0 -78
- data/qa/page/project/issue/index.rb +0 -71
- data/qa/page/project/issue/new.rb +0 -35
- data/qa/page/project/issue/show.rb +0 -168
- data/qa/page/project/job/show.rb +0 -53
- data/qa/page/project/menu.rb +0 -43
- data/qa/page/project/milestone/index.rb +0 -19
- data/qa/page/project/milestone/new.rb +0 -29
- data/qa/page/project/new.rb +0 -76
- data/qa/page/project/operations/environments/index.rb +0 -21
- data/qa/page/project/operations/environments/show.rb +0 -23
- data/qa/page/project/operations/kubernetes/add.rb +0 -21
- data/qa/page/project/operations/kubernetes/add_existing.rb +0 -46
- data/qa/page/project/operations/kubernetes/index.rb +0 -25
- data/qa/page/project/operations/kubernetes/show.rb +0 -81
- data/qa/page/project/operations/metrics/show.rb +0 -87
- data/qa/page/project/pipeline/index.rb +0 -43
- data/qa/page/project/pipeline/show.rb +0 -76
- data/qa/page/project/settings/advanced.rb +0 -75
- data/qa/page/project/settings/auto_devops.rb +0 -21
- data/qa/page/project/settings/ci_cd.rb +0 -39
- data/qa/page/project/settings/ci_variables.rb +0 -56
- data/qa/page/project/settings/common.rb +0 -13
- data/qa/page/project/settings/deploy_keys.rb +0 -69
- data/qa/page/project/settings/deploy_tokens.rb +0 -64
- data/qa/page/project/settings/main.rb +0 -60
- data/qa/page/project/settings/members.rb +0 -62
- data/qa/page/project/settings/merge_request.rb +0 -32
- data/qa/page/project/settings/mirroring_repositories.rb +0 -132
- data/qa/page/project/settings/protected_branches.rb +0 -72
- data/qa/page/project/settings/repository.rb +0 -55
- data/qa/page/project/settings/runners.rb +0 -37
- data/qa/page/project/settings/visibility_features_permissions.rb +0 -26
- data/qa/page/project/show.rb +0 -165
- data/qa/page/project/sub_menus/ci_cd.rb +0 -27
- data/qa/page/project/sub_menus/common.rb +0 -19
- data/qa/page/project/sub_menus/issues.rb +0 -63
- data/qa/page/project/sub_menus/operations.rb +0 -58
- data/qa/page/project/sub_menus/project.rb +0 -29
- data/qa/page/project/sub_menus/repository.rb +0 -48
- data/qa/page/project/sub_menus/settings.rb +0 -81
- data/qa/page/project/web_ide/edit.rb +0 -139
- data/qa/page/project/wiki/edit.rb +0 -21
- data/qa/page/project/wiki/git_access.rb +0 -13
- data/qa/page/project/wiki/new.rb +0 -61
- data/qa/page/project/wiki/show.rb +0 -31
- data/qa/page/search/results.rb +0 -55
- data/qa/page/settings/common.rb +0 -26
- data/qa/page/sub_menus/common.rb +0 -50
- data/qa/page/validatable.rb +0 -21
- data/qa/page/validator.rb +0 -52
- data/qa/page/view.rb +0 -59
- data/qa/resource/api_fabricator.rb +0 -137
- data/qa/resource/base.rb +0 -170
- data/qa/resource/ci_variable.rb +0 -57
- data/qa/resource/deploy_key.rb +0 -39
- data/qa/resource/deploy_token.rb +0 -48
- data/qa/resource/events/base.rb +0 -42
- data/qa/resource/events/project.rb +0 -25
- data/qa/resource/file.rb +0 -63
- data/qa/resource/fork.rb +0 -92
- data/qa/resource/group.rb +0 -83
- data/qa/resource/issue.rb +0 -61
- data/qa/resource/kubernetes_cluster/base.rb +0 -40
- data/qa/resource/kubernetes_cluster/project_cluster.rb +0 -72
- data/qa/resource/label.rb +0 -61
- data/qa/resource/members.rb +0 -36
- data/qa/resource/merge_request.rb +0 -105
- data/qa/resource/merge_request_from_fork.rb +0 -33
- data/qa/resource/personal_access_token.rb +0 -31
- data/qa/resource/project.rb +0 -179
- data/qa/resource/project_imported_from_github.rb +0 -31
- data/qa/resource/project_member.rb +0 -35
- data/qa/resource/project_milestone.rb +0 -34
- data/qa/resource/protected_branch.rb +0 -76
- data/qa/resource/repository/commit.rb +0 -81
- data/qa/resource/repository/project_push.rb +0 -44
- data/qa/resource/repository/push.rb +0 -113
- data/qa/resource/repository/wiki_push.rb +0 -38
- data/qa/resource/runner.rb +0 -75
- data/qa/resource/sandbox.rb +0 -79
- data/qa/resource/settings/hashed_storage.rb +0 -26
- data/qa/resource/snippet.rb +0 -30
- data/qa/resource/ssh_key.rb +0 -57
- data/qa/resource/tag.rb +0 -30
- data/qa/resource/user.rb +0 -150
- data/qa/resource/user_gpg.rb +0 -46
- data/qa/resource/visibility.rb +0 -17
- data/qa/resource/wiki.rb +0 -48
- data/qa/runtime/address.rb +0 -29
- data/qa/runtime/api/client.rb +0 -90
- data/qa/runtime/api/request.rb +0 -49
- data/qa/runtime/application_settings.rb +0 -46
- data/qa/runtime/browser.rb +0 -220
- data/qa/runtime/env.rb +0 -330
- data/qa/runtime/feature.rb +0 -87
- data/qa/runtime/fixtures.rb +0 -43
- data/qa/runtime/gpg.rb +0 -37
- data/qa/runtime/ip_address.rb +0 -33
- data/qa/runtime/key/base.rb +0 -38
- data/qa/runtime/key/ecdsa.rb +0 -13
- data/qa/runtime/key/ed25519.rb +0 -13
- data/qa/runtime/key/rsa.rb +0 -13
- data/qa/runtime/mail_hog.rb +0 -15
- data/qa/runtime/namespace.rb +0 -27
- data/qa/runtime/path.rb +0 -13
- data/qa/runtime/release.rb +0 -40
- data/qa/runtime/scenario.rb +0 -38
- data/qa/runtime/search.rb +0 -124
- data/qa/runtime/user.rb +0 -57
- data/qa/scenario/actable.rb +0 -25
- data/qa/scenario/bootable.rb +0 -53
- data/qa/scenario/shared_attributes.rb +0 -14
- data/qa/scenario/template.rb +0 -64
- data/qa/scenario/test/instance.rb +0 -36
- data/qa/scenario/test/instance/all.rb +0 -18
- data/qa/scenario/test/instance/smoke.rb +0 -20
- data/qa/scenario/test/integration/github.rb +0 -20
- data/qa/scenario/test/integration/instance_saml.rb +0 -13
- data/qa/scenario/test/integration/kubernetes.rb +0 -13
- data/qa/scenario/test/integration/ldap_no_server.rb +0 -13
- data/qa/scenario/test/integration/ldap_no_tls.rb +0 -13
- data/qa/scenario/test/integration/ldap_tls.rb +0 -13
- data/qa/scenario/test/integration/mattermost.rb +0 -26
- data/qa/scenario/test/integration/object_storage.rb +0 -13
- data/qa/scenario/test/integration/smtp.rb +0 -13
- data/qa/scenario/test/sanity/framework.rb +0 -19
- data/qa/scenario/test/sanity/selectors.rb +0 -61
- data/qa/service/cluster_provider/base.rb +0 -41
- data/qa/service/cluster_provider/gcloud.rb +0 -115
- data/qa/service/cluster_provider/k3d.rb +0 -134
- data/qa/service/cluster_provider/k3s.rb +0 -94
- data/qa/service/cluster_provider/minikube.rb +0 -26
- data/qa/service/docker_run/base.rb +0 -47
- data/qa/service/docker_run/gitlab_runner.rb +0 -58
- data/qa/service/docker_run/jenkins.rb +0 -43
- data/qa/service/docker_run/k3s.rb +0 -46
- data/qa/service/docker_run/ldap.rb +0 -41
- data/qa/service/docker_run/maven.rb +0 -44
- data/qa/service/docker_run/node_js.rb +0 -38
- data/qa/service/docker_run/saml_idp.rb +0 -69
- data/qa/service/kubernetes_cluster.rb +0 -107
- data/qa/service/omnibus.rb +0 -23
- data/qa/service/shellout.rb +0 -31
- data/qa/specs/features/api/1_manage/.gitkeep +0 -0
- data/qa/specs/features/api/1_manage/rate_limits_spec.rb +0 -17
- data/qa/specs/features/api/1_manage/users_spec.rb +0 -35
- data/qa/specs/features/api/2_plan/.gitkeep +0 -0
- data/qa/specs/features/api/2_plan/closes_issue_via_pushing_a_commit_spec.rb +0 -48
- data/qa/specs/features/api/3_create/repository/files_spec.rb +0 -106
- data/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb +0 -74
- data/qa/specs/features/api/4_verify/.gitkeep +0 -0
- data/qa/specs/features/api/5_package/.gitkeep +0 -0
- data/qa/specs/features/api/6_release/.gitkeep +0 -0
- data/qa/specs/features/api/7_configure/.gitkeep +0 -0
- data/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb +0 -20
- data/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb +0 -56
- data/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb +0 -25
- data/qa/specs/features/browser_ui/1_manage/login/log_into_gitlab_via_ldap_spec.rb +0 -15
- data/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb +0 -20
- data/qa/specs/features/browser_ui/1_manage/login/login_via_instance_wide_saml_sso_spec.rb +0 -19
- data/qa/specs/features/browser_ui/1_manage/login/register_spec.rb +0 -27
- data/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb +0 -24
- data/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb +0 -23
- data/qa/specs/features/browser_ui/1_manage/project/dashboard_images_spec.rb +0 -57
- data/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb +0 -117
- data/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb +0 -22
- data/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb +0 -46
- data/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb +0 -45
- data/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb +0 -35
- data/qa/specs/features/browser_ui/2_plan/issue/comment_issue_spec.rb +0 -29
- data/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb +0 -40
- data/qa/specs/features/browser_ui/2_plan/issue/export_as_csv_spec.rb +0 -40
- data/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb +0 -36
- data/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb +0 -28
- data/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb +0 -35
- data/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb +0 -64
- data/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb +0 -26
- data/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb +0 -49
- data/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb +0 -52
- data/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb +0 -35
- data/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb +0 -68
- data/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb +0 -88
- data/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb +0 -30
- data/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb +0 -51
- data/qa/specs/features/browser_ui/3_create/repository/create_edit_delete_file_via_web_spec.rb +0 -58
- data/qa/specs/features/browser_ui/3_create/repository/move_project_create_fork_spec.rb +0 -53
- data/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb +0 -48
- data/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb +0 -74
- data/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb +0 -34
- data/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb +0 -43
- data/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb +0 -81
- data/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb +0 -44
- data/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb +0 -63
- data/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb +0 -37
- data/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb +0 -66
- data/qa/specs/features/browser_ui/3_create/snippet/create_snippet_spec.rb +0 -29
- data/qa/specs/features/browser_ui/3_create/web_ide/add_file_template_spec.rb +0 -69
- data/qa/specs/features/browser_ui/3_create/web_ide/review_merge_request_spec.rb +0 -43
- data/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb +0 -42
- data/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb +0 -60
- data/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb +0 -89
- data/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb +0 -34
- data/qa/specs/features/browser_ui/5_package/.gitkeep +0 -0
- data/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb +0 -28
- data/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb +0 -102
- data/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb +0 -22
- data/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_dependent_relationship_spec.rb +0 -122
- data/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_independent_relationship_spec.rb +0 -121
- data/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb +0 -147
- data/qa/specs/features/browser_ui/7_configure/kubernetes/kubernetes_integration_spec.rb +0 -38
- data/qa/specs/features/browser_ui/8_monitor/apm/dashboards_spec.rb +0 -97
- data/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb +0 -38
- data/qa/specs/features/ee/api/1_manage/.gitkeep +0 -0
- data/qa/specs/features/ee/api/2_plan/.gitkeep +0 -0
- data/qa/specs/features/ee/api/2_plan/epics_milestone_dates_spec.rb +0 -173
- data/qa/specs/features/ee/api/3_create/.gitkeep +0 -0
- data/qa/specs/features/ee/api/4_verify/.gitkeep +0 -0
- data/qa/specs/features/ee/api/5_package/.gitkeep +0 -0
- data/qa/specs/features/ee/api/6_release/.gitkeep +0 -0
- data/qa/specs/features/ee/api/7_configure/.gitkeep +0 -0
- data/qa/specs/features/ee/api/enablement/elasticsearch/advanced_global_advanced_syntax_search_spec.rb +0 -70
- data/qa/specs/features/ee/api/enablement/elasticsearch/elasticsearch_api_spec.rb +0 -84
- data/qa/specs/features/ee/api/geo/geo_nodes_spec.rb +0 -91
- data/qa/specs/features/ee/browser_ui/1_manage/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_audit_logs_1_spec.rb +0 -155
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_audit_logs_2_spec.rb +0 -103
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_file_template_spec.rb +0 -141
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_ldap_sync_spec.rb +0 -183
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_saml_enforced_sso_spec.rb +0 -115
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_saml_group_managed_accounts_spec.rb +0 -178
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_saml_non_enforced_sso_spec.rb +0 -87
- data/qa/specs/features/ee/browser_ui/1_manage/group/restrict_by_ip_address_spec.rb +0 -107
- data/qa/specs/features/ee/browser_ui/1_manage/insights/default_insights_spec.rb +0 -48
- data/qa/specs/features/ee/browser_ui/1_manage/instance/instance_audit_logs_spec.rb +0 -124
- data/qa/specs/features/ee/browser_ui/1_manage/ldap/admin_ldap_sync_spec.rb +0 -63
- data/qa/specs/features/ee/browser_ui/1_manage/project/project_audit_logs_spec.rb +0 -127
- data/qa/specs/features/ee/browser_ui/1_manage/project/project_templates_spec.rb +0 -165
- data/qa/specs/features/ee/browser_ui/2_plan/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/2_plan/burndown_chart/burndown_chart_spec.rb +0 -46
- data/qa/specs/features/ee/browser_ui/2_plan/custom_email/custom_email_spec.rb +0 -28
- data/qa/specs/features/ee/browser_ui/2_plan/epic/epics_management_spec.rb +0 -96
- data/qa/specs/features/ee/browser_ui/2_plan/epic/promote_issue_to_epic_spec.rb +0 -40
- data/qa/specs/features/ee/browser_ui/2_plan/epic/roadmap_spec.rb +0 -31
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/configurable_issue_board_spec.rb +0 -28
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/configure_issue_board_by_label_spec.rb +0 -44
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/create_group_issue_board_spec.rb +0 -31
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/focus_mode_spec.rb +0 -28
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/group_issue_boards_spec.rb +0 -48
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/project_issue_boards_spec.rb +0 -103
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/read_only_board_configuration_spec.rb +0 -37
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/sum_of_issues_weights_spec.rb +0 -40
- data/qa/specs/features/ee/browser_ui/2_plan/issues_analytics/issues_analytics_spec.rb +0 -35
- data/qa/specs/features/ee/browser_ui/2_plan/issues_weight/issue_weight_visualization_spec.rb +0 -46
- data/qa/specs/features/ee/browser_ui/2_plan/multiple_assignees_for_issues/four_assignees_spec.rb +0 -45
- data/qa/specs/features/ee/browser_ui/2_plan/multiple_assignees_for_issues/more_than_four_assignees_spec.rb +0 -70
- data/qa/specs/features/ee/browser_ui/2_plan/related_issues/related_issues_spec.rb +0 -50
- data/qa/specs/features/ee/browser_ui/2_plan/scoped_labels/editing_scoped_labels_spec.rb +0 -58
- data/qa/specs/features/ee/browser_ui/3_create/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/3_create/contribution_analytics_spec.rb +0 -53
- data/qa/specs/features/ee/browser_ui/3_create/design_management_spec.rb +0 -29
- data/qa/specs/features/ee/browser_ui/3_create/jenkins/jenkins_build_status_spec.rb +0 -158
- data/qa/specs/features/ee/browser_ui/3_create/merge_request/add_batch_comments_in_merge_request_spec.rb +0 -80
- data/qa/specs/features/ee/browser_ui/3_create/merge_request/approval_rules_spec.rb +0 -97
- data/qa/specs/features/ee/browser_ui/3_create/repository/assign_code_owners_spec.rb +0 -83
- data/qa/specs/features/ee/browser_ui/3_create/repository/code_owners_spec.rb +0 -75
- data/qa/specs/features/ee/browser_ui/3_create/repository/file_locking_spec.rb +0 -161
- data/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_http_spec.rb +0 -52
- data/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_ssh_with_key_spec.rb +0 -71
- data/qa/specs/features/ee/browser_ui/3_create/repository/push_rules_spec.rb +0 -202
- data/qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb +0 -120
- data/qa/specs/features/ee/browser_ui/3_create/web_ide/web_terminal_spec.rb +0 -80
- data/qa/specs/features/ee/browser_ui/4_verify/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/5_package/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/5_package/maven_repository_spec.rb +0 -102
- data/qa/specs/features/ee/browser_ui/5_package/npm_registry_spec.rb +0 -75
- data/qa/specs/features/ee/browser_ui/6_release/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/6_release/multi-project_pipelines_spec.rb +0 -98
- data/qa/specs/features/ee/browser_ui/6_release/pipelines_for_merged_results_and_merge_trains_spec.rb +0 -137
- data/qa/specs/features/ee/browser_ui/7_configure/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/8_monitor/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/8_monitor/apm/metrics_spec.rb +0 -68
- data/qa/specs/features/ee/browser_ui/8_monitor/health/alerting_spec.rb +0 -106
- data/qa/specs/features/ee/browser_ui/8_monitor/health/cluster_health_spec.rb +0 -52
- data/qa/specs/features/ee/browser_ui/enablement/elasticsearch/elasticsearch_reindexing_spec.rb +0 -78
- data/qa/specs/features/ee/browser_ui/geo/attachment_replication_spec.rb +0 -63
- data/qa/specs/features/ee/browser_ui/geo/database_delete_replication_spec.rb +0 -60
- data/qa/specs/features/ee/browser_ui/geo/http_push_spec.rb +0 -121
- data/qa/specs/features/ee/browser_ui/geo/http_push_to_secondary_spec.rb +0 -174
- data/qa/specs/features/ee/browser_ui/geo/rename_replication_spec.rb +0 -75
- data/qa/specs/features/ee/browser_ui/geo/ssh_push_spec.rb +0 -151
- data/qa/specs/features/ee/browser_ui/geo/ssh_push_to_secondary_spec.rb +0 -189
- data/qa/specs/features/ee/browser_ui/geo/wiki_http_push_spec.rb +0 -68
- data/qa/specs/features/ee/browser_ui/geo/wiki_http_push_to_secondary_spec.rb +0 -105
- data/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_spec.rb +0 -93
- data/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_to_secondary_spec.rb +0 -110
- data/qa/specs/features/ee/browser_ui/secure/create_merge_request_with_secure_spec.rb +0 -79
- data/qa/specs/features/ee/browser_ui/secure/license_compliance_spec.rb +0 -98
- data/qa/specs/features/ee/browser_ui/secure/merge_request_license_widget_spec.rb +0 -134
- data/qa/specs/features/ee/browser_ui/secure/security_reports_spec.rb +0 -143
- data/qa/specs/features/ee/browser_ui/secure/vulnerability_management_spec.rb +0 -101
- data/qa/specs/features/sanity/framework_spec.rb +0 -21
- data/qa/specs/helpers/quarantine.rb +0 -84
- data/qa/specs/loop_runner.rb +0 -21
- data/qa/specs/parallel_runner.rb +0 -33
- data/qa/specs/runner.rb +0 -78
- data/qa/support/dates.rb +0 -21
- data/qa/support/page/logging.rb +0 -178
- data/qa/support/retrier.rb +0 -64
- data/qa/support/wait_for_requests.rb +0 -25
- data/qa/tools/delete_subgroups.rb +0 -66
- data/qa/tools/delete_test_ssh_keys.rb +0 -61
- data/qa/tools/generate_perf_testdata.rb +0 -301
- data/qa/tools/revoke_all_personal_access_tokens.rb +0 -44
- data/qa/vendor/jenkins/page/base.rb +0 -24
- data/qa/vendor/jenkins/page/configure.rb +0 -48
- data/qa/vendor/jenkins/page/configure_job.rb +0 -72
- data/qa/vendor/jenkins/page/last_job_console.rb +0 -44
- data/qa/vendor/jenkins/page/login.rb +0 -31
- data/qa/vendor/jenkins/page/new_credentials.rb +0 -50
- data/qa/vendor/jenkins/page/new_job.rb +0 -38
- data/qa/vendor/saml_idp/page/base.rb +0 -14
- data/qa/vendor/saml_idp/page/login.rb +0 -31
@@ -1,31 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module QA
|
4
|
-
module Page
|
5
|
-
module Project
|
6
|
-
module Wiki
|
7
|
-
class Show < Page::Base
|
8
|
-
include Page::Component::LegacyClonePanel
|
9
|
-
|
10
|
-
view 'app/views/projects/wikis/pages.html.haml' do
|
11
|
-
element :clone_repository_link, 'Clone repository' # rubocop:disable QA/ElementWithPattern
|
12
|
-
end
|
13
|
-
|
14
|
-
view 'app/views/projects/wikis/show.html.haml' do
|
15
|
-
element :wiki_page_content
|
16
|
-
end
|
17
|
-
|
18
|
-
def click_clone_repository
|
19
|
-
click_on 'Clone repository'
|
20
|
-
end
|
21
|
-
|
22
|
-
def wiki_text
|
23
|
-
find_element(:wiki_page_content).text
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
QA::Page::Project::Wiki::Show.prepend_if_ee('QA::EE::Page::Project::Wiki::Show')
|
data/qa/page/search/results.rb
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module QA::Page
|
4
|
-
module Search
|
5
|
-
class Results < QA::Page::Base
|
6
|
-
view 'app/views/search/_category.html.haml' do
|
7
|
-
element :code_tab
|
8
|
-
element :projects_tab
|
9
|
-
end
|
10
|
-
|
11
|
-
view 'app/views/search/results/_blob_data.html.haml' do
|
12
|
-
element :result_item_content
|
13
|
-
element :file_title_content
|
14
|
-
element :file_text_content
|
15
|
-
end
|
16
|
-
|
17
|
-
view 'app/views/shared/projects/_project.html.haml' do
|
18
|
-
element :project
|
19
|
-
end
|
20
|
-
|
21
|
-
def switch_to_code
|
22
|
-
switch_to_tab(:code_tab)
|
23
|
-
end
|
24
|
-
|
25
|
-
def switch_to_projects
|
26
|
-
switch_to_tab(:projects_tab)
|
27
|
-
end
|
28
|
-
|
29
|
-
def has_file_in_project?(file_name, project_name)
|
30
|
-
has_element?(:result_item_content, text: "#{project_name}: #{file_name}")
|
31
|
-
end
|
32
|
-
|
33
|
-
def has_file_with_content?(file_name, file_text)
|
34
|
-
within_element_by_index(:result_item_content, 0) do
|
35
|
-
break false unless has_element?(:file_title_content, text: file_name)
|
36
|
-
|
37
|
-
has_element?(:file_text_content, text: file_text)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def has_project?(project_name)
|
42
|
-
has_element?(:project, project_name: project_name)
|
43
|
-
end
|
44
|
-
|
45
|
-
private
|
46
|
-
|
47
|
-
def switch_to_tab(tab)
|
48
|
-
retry_until do
|
49
|
-
click_element(tab)
|
50
|
-
has_active_element?(tab)
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
data/qa/page/settings/common.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module QA
|
4
|
-
module Page
|
5
|
-
module Settings
|
6
|
-
module Common
|
7
|
-
# Click the Expand button present in the specified section
|
8
|
-
#
|
9
|
-
# @param [Symbol] element_name `element` name defined in a `view` block
|
10
|
-
def expand_section(element_name)
|
11
|
-
within_element(element_name) do
|
12
|
-
# Because it is possible to click the button before the JS toggle code is bound
|
13
|
-
wait_until(reload: false) do
|
14
|
-
click_button 'Expand' unless has_css?('button', text: 'Collapse', wait: 1)
|
15
|
-
|
16
|
-
has_content?('Collapse')
|
17
|
-
finished_loading?
|
18
|
-
end
|
19
|
-
|
20
|
-
yield if block_given?
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
data/qa/page/sub_menus/common.rb
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module QA
|
4
|
-
module Page
|
5
|
-
module SubMenus
|
6
|
-
module Common
|
7
|
-
def hover_element(element)
|
8
|
-
within_sidebar do
|
9
|
-
find_element(element).hover
|
10
|
-
yield
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def within_sidebar
|
15
|
-
within_element(sidebar_element) do
|
16
|
-
yield
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def within_submenu(element = nil)
|
21
|
-
if element
|
22
|
-
within_element(element) do
|
23
|
-
yield
|
24
|
-
end
|
25
|
-
else
|
26
|
-
within_submenu_without_element do
|
27
|
-
yield
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def within_submenu_without_element
|
35
|
-
if has_css?('.fly-out-list')
|
36
|
-
within('.fly-out-list') do
|
37
|
-
yield
|
38
|
-
end
|
39
|
-
else
|
40
|
-
yield
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def sidebar_element
|
45
|
-
raise NotImplementedError
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
data/qa/page/validatable.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module QA
|
4
|
-
module Page
|
5
|
-
module Validatable
|
6
|
-
PageValidationError = Class.new(StandardError)
|
7
|
-
|
8
|
-
def validate_elements_present!
|
9
|
-
base_page = self.new
|
10
|
-
|
11
|
-
base_page.wait_if_retry_later
|
12
|
-
|
13
|
-
required_elements.each do |element|
|
14
|
-
unless base_page.has_element?(element.name, wait: QA::Support::Repeater::DEFAULT_MAX_WAIT_TIME)
|
15
|
-
raise Validatable::PageValidationError, "#{element.name} did not appear on #{self.name} as expected"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
data/qa/page/validator.rb
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module QA
|
4
|
-
module Page
|
5
|
-
class Validator
|
6
|
-
ValidationError = Class.new(StandardError)
|
7
|
-
|
8
|
-
Error = Struct.new(:page, :message) do
|
9
|
-
def to_s
|
10
|
-
"Error: #{page} - #{message}"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def initialize(constant)
|
15
|
-
@module = constant
|
16
|
-
end
|
17
|
-
|
18
|
-
def constants
|
19
|
-
@consts ||= @module.constants.map do |const|
|
20
|
-
@module.const_get(const, false)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def descendants
|
25
|
-
@descendants ||= constants.flat_map do |const|
|
26
|
-
case const
|
27
|
-
when Class
|
28
|
-
const if const < Page::Base
|
29
|
-
when Module
|
30
|
-
Page::Validator.new(const).descendants
|
31
|
-
end
|
32
|
-
end.compact
|
33
|
-
end
|
34
|
-
|
35
|
-
def errors
|
36
|
-
[].tap do |errors|
|
37
|
-
descendants.each do |page|
|
38
|
-
page.errors.each do |message|
|
39
|
-
errors.push(Error.new(page.name, message))
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def validate!
|
46
|
-
return if errors.none?
|
47
|
-
|
48
|
-
raise ValidationError, 'Page views / elements validation error!'
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
data/qa/page/view.rb
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'pathname'
|
4
|
-
|
5
|
-
module QA
|
6
|
-
module Page
|
7
|
-
class View
|
8
|
-
attr_reader :path, :elements
|
9
|
-
|
10
|
-
def initialize(path, elements)
|
11
|
-
@path = path
|
12
|
-
@elements = elements
|
13
|
-
end
|
14
|
-
|
15
|
-
def pathname
|
16
|
-
@pathname ||= ::Pathname.new(::File.join(__dir__, '../../../', @path))
|
17
|
-
.cleanpath.expand_path
|
18
|
-
end
|
19
|
-
|
20
|
-
def errors
|
21
|
-
unless pathname.readable?
|
22
|
-
return ["Missing view partial `#{pathname}`!"]
|
23
|
-
end
|
24
|
-
|
25
|
-
##
|
26
|
-
# Reduce required elements by streaming view and making assertions on
|
27
|
-
# elements' existence.
|
28
|
-
#
|
29
|
-
@missing ||= @elements.dup.tap do |elements|
|
30
|
-
::File.foreach(pathname.to_s) do |line|
|
31
|
-
elements.reject! { |element| element.matches?(line) }
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
@missing.map do |missing|
|
36
|
-
"Missing element `#{missing.name}` in `#{pathname}` view partial!"
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def self.evaluate(&block)
|
41
|
-
Page::View::DSL.new.tap do |evaluator|
|
42
|
-
evaluator.instance_exec(&block) if block_given?
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
class DSL
|
47
|
-
attr_reader :elements
|
48
|
-
|
49
|
-
def initialize
|
50
|
-
@elements = []
|
51
|
-
end
|
52
|
-
|
53
|
-
def element(name, *args)
|
54
|
-
@elements.push(Page::Element.new(name, *args))
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
@@ -1,137 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'active_support/core_ext/object/deep_dup'
|
4
|
-
require 'capybara/dsl'
|
5
|
-
|
6
|
-
module QA
|
7
|
-
module Resource
|
8
|
-
module ApiFabricator
|
9
|
-
include Capybara::DSL
|
10
|
-
|
11
|
-
ResourceFabricationFailedError = Class.new(RuntimeError)
|
12
|
-
ResourceNotDeletedError = Class.new(RuntimeError)
|
13
|
-
ResourceNotFoundError = Class.new(RuntimeError)
|
14
|
-
ResourceQueryError = Class.new(RuntimeError)
|
15
|
-
ResourceUpdateFailedError = Class.new(RuntimeError)
|
16
|
-
ResourceURLMissingError = Class.new(RuntimeError)
|
17
|
-
InternalServerError = Class.new(RuntimeError)
|
18
|
-
|
19
|
-
attr_reader :api_resource, :api_response
|
20
|
-
attr_writer :api_client
|
21
|
-
attr_accessor :user
|
22
|
-
|
23
|
-
def api_support?
|
24
|
-
respond_to?(:api_get_path) &&
|
25
|
-
(respond_to?(:api_post_path) && respond_to?(:api_post_body)) ||
|
26
|
-
(respond_to?(:api_put_path) && respond_to?(:api_put_body))
|
27
|
-
end
|
28
|
-
|
29
|
-
def fabricate_via_api!
|
30
|
-
unless api_support?
|
31
|
-
raise NotImplementedError, "Resource #{self.class.name} does not support fabrication via the API!"
|
32
|
-
end
|
33
|
-
|
34
|
-
resource_web_url(api_post)
|
35
|
-
end
|
36
|
-
|
37
|
-
def reload!
|
38
|
-
api_get
|
39
|
-
|
40
|
-
self
|
41
|
-
end
|
42
|
-
|
43
|
-
def remove_via_api!
|
44
|
-
api_delete
|
45
|
-
end
|
46
|
-
|
47
|
-
def eager_load_api_client!
|
48
|
-
return unless api_client.nil?
|
49
|
-
|
50
|
-
api_client.tap do |client|
|
51
|
-
# Eager-load the API client so that the personal token creation isn't
|
52
|
-
# taken in account in the actual resource creation timing.
|
53
|
-
client.user = user
|
54
|
-
client.personal_access_token
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
include Support::Api
|
59
|
-
attr_writer :api_resource, :api_response
|
60
|
-
|
61
|
-
def api_put(body = api_put_body)
|
62
|
-
response = put(
|
63
|
-
Runtime::API::Request.new(api_client, api_put_path).url,
|
64
|
-
body)
|
65
|
-
|
66
|
-
unless response.code == HTTP_STATUS_OK
|
67
|
-
raise ResourceFabricationFailedError, "Updating #{self.class.name} using the API failed (#{response.code}) with `#{response}`."
|
68
|
-
end
|
69
|
-
|
70
|
-
process_api_response(parse_body(response))
|
71
|
-
end
|
72
|
-
|
73
|
-
private
|
74
|
-
|
75
|
-
def resource_web_url(resource)
|
76
|
-
resource.fetch(:web_url) do
|
77
|
-
raise ResourceURLMissingError, "API resource for #{self.class.name} does not expose a `web_url` property: `#{resource}`."
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def api_get
|
82
|
-
process_api_response(parse_body(api_get_from(api_get_path)))
|
83
|
-
end
|
84
|
-
|
85
|
-
def api_get_from(get_path)
|
86
|
-
url = Runtime::API::Request.new(api_client, get_path).url
|
87
|
-
response = get(url)
|
88
|
-
|
89
|
-
if response.code == HTTP_STATUS_SERVER_ERROR
|
90
|
-
raise InternalServerError, "Failed to GET #{url} - (#{response.code}): `#{response}`."
|
91
|
-
elsif response.code != HTTP_STATUS_OK
|
92
|
-
raise ResourceNotFoundError, "Resource at #{url} could not be found (#{response.code}): `#{response}`."
|
93
|
-
end
|
94
|
-
|
95
|
-
response
|
96
|
-
end
|
97
|
-
|
98
|
-
def api_post
|
99
|
-
response = post(
|
100
|
-
Runtime::API::Request.new(api_client, api_post_path).url,
|
101
|
-
api_post_body)
|
102
|
-
|
103
|
-
unless response.code == HTTP_STATUS_CREATED
|
104
|
-
raise ResourceFabricationFailedError, "Fabrication of #{self.class.name} using the API failed (#{response.code}) with `#{response}`."
|
105
|
-
end
|
106
|
-
|
107
|
-
process_api_response(parse_body(response))
|
108
|
-
end
|
109
|
-
|
110
|
-
def api_delete
|
111
|
-
url = Runtime::API::Request.new(api_client, api_delete_path).url
|
112
|
-
response = delete(url)
|
113
|
-
|
114
|
-
unless [HTTP_STATUS_NO_CONTENT, HTTP_STATUS_ACCEPTED].include? response.code
|
115
|
-
raise ResourceNotDeletedError, "Resource at #{url} could not be deleted (#{response.code}): `#{response}`."
|
116
|
-
end
|
117
|
-
|
118
|
-
response
|
119
|
-
end
|
120
|
-
|
121
|
-
def api_client
|
122
|
-
@api_client ||= begin
|
123
|
-
Runtime::API::Client.new(:gitlab, is_new_session: !current_url.start_with?('http'), user: user)
|
124
|
-
end
|
125
|
-
end
|
126
|
-
|
127
|
-
def process_api_response(parsed_response)
|
128
|
-
self.api_response = parsed_response
|
129
|
-
self.api_resource = transform_api_resource(parsed_response.deep_dup)
|
130
|
-
end
|
131
|
-
|
132
|
-
def transform_api_resource(api_resource)
|
133
|
-
api_resource
|
134
|
-
end
|
135
|
-
end
|
136
|
-
end
|
137
|
-
end
|
data/qa/resource/base.rb
DELETED
@@ -1,170 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'forwardable'
|
4
|
-
require 'capybara/dsl'
|
5
|
-
require 'active_support/core_ext/array/extract_options'
|
6
|
-
|
7
|
-
module QA
|
8
|
-
module Resource
|
9
|
-
class Base
|
10
|
-
extend SingleForwardable
|
11
|
-
include ApiFabricator
|
12
|
-
extend Capybara::DSL
|
13
|
-
|
14
|
-
NoValueError = Class.new(RuntimeError)
|
15
|
-
|
16
|
-
def_delegators :evaluator, :attribute
|
17
|
-
|
18
|
-
def self.fabricate!(*args, &prepare_block)
|
19
|
-
fabricate_via_api!(*args, &prepare_block)
|
20
|
-
rescue NotImplementedError
|
21
|
-
fabricate_via_browser_ui!(*args, &prepare_block)
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.fabricate_via_browser_ui!(*args, &prepare_block)
|
25
|
-
options = args.extract_options!
|
26
|
-
resource = options.fetch(:resource) { new }
|
27
|
-
parents = options.fetch(:parents) { [] }
|
28
|
-
|
29
|
-
do_fabricate!(resource: resource, prepare_block: prepare_block, parents: parents) do
|
30
|
-
log_fabrication(:browser_ui, resource, parents, args) { resource.fabricate!(*args) }
|
31
|
-
|
32
|
-
current_url
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def self.fabricate_via_api!(*args, &prepare_block)
|
37
|
-
options = args.extract_options!
|
38
|
-
resource = options.fetch(:resource) { new }
|
39
|
-
parents = options.fetch(:parents) { [] }
|
40
|
-
|
41
|
-
raise NotImplementedError unless resource.api_support?
|
42
|
-
|
43
|
-
resource.eager_load_api_client!
|
44
|
-
|
45
|
-
do_fabricate!(resource: resource, prepare_block: prepare_block, parents: parents) do
|
46
|
-
log_fabrication(:api, resource, parents, args) { resource.fabricate_via_api! }
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def self.remove_via_api!(*args, &prepare_block)
|
51
|
-
options = args.extract_options!
|
52
|
-
resource = options.fetch(:resource) { new }
|
53
|
-
parents = options.fetch(:parents) { [] }
|
54
|
-
|
55
|
-
resource.eager_load_api_client!
|
56
|
-
|
57
|
-
do_fabricate!(resource: resource, prepare_block: prepare_block, parents: parents) do
|
58
|
-
log_fabrication(:api, resource, parents, args) { resource.remove_via_api! }
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
def fabricate!(*_args)
|
63
|
-
raise NotImplementedError
|
64
|
-
end
|
65
|
-
|
66
|
-
def visit!
|
67
|
-
Runtime::Logger.debug(%Q[Visiting #{self.class.name} at "#{web_url}"])
|
68
|
-
|
69
|
-
# Just in case an async action is not yet complete
|
70
|
-
Support::WaitForRequests.wait_for_requests
|
71
|
-
|
72
|
-
Support::Retrier.retry_until do
|
73
|
-
visit(web_url)
|
74
|
-
wait_until { current_url.include?(URI.parse(web_url).path.split('/').last || web_url) }
|
75
|
-
end
|
76
|
-
|
77
|
-
# Wait until the new page is ready for us to interact with it
|
78
|
-
Support::WaitForRequests.wait_for_requests
|
79
|
-
end
|
80
|
-
|
81
|
-
def populate(*attributes)
|
82
|
-
attributes.each(&method(:public_send))
|
83
|
-
end
|
84
|
-
|
85
|
-
def wait_until(max_duration: 60, sleep_interval: 0.1)
|
86
|
-
QA::Support::Waiter.wait_until(max_duration: max_duration, sleep_interval: sleep_interval) do
|
87
|
-
yield
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
private
|
92
|
-
|
93
|
-
def populate_attribute(name, block)
|
94
|
-
value = attribute_value(name, block)
|
95
|
-
|
96
|
-
raise NoValueError, "No value was computed for #{name} of #{self.class.name}." unless value
|
97
|
-
|
98
|
-
value
|
99
|
-
end
|
100
|
-
|
101
|
-
def attribute_value(name, block)
|
102
|
-
api_value = api_resource&.dig(name)
|
103
|
-
|
104
|
-
if api_value && block
|
105
|
-
log_having_both_api_result_and_block(name, api_value)
|
106
|
-
end
|
107
|
-
|
108
|
-
api_value || (block && instance_exec(&block))
|
109
|
-
end
|
110
|
-
|
111
|
-
def log_having_both_api_result_and_block(name, api_value)
|
112
|
-
QA::Runtime::Logger.info "<#{self.class}> Attribute #{name.inspect} has both API response `#{api_value}` and a block. API response will be picked. Block will be ignored."
|
113
|
-
end
|
114
|
-
|
115
|
-
def self.do_fabricate!(resource:, prepare_block:, parents: [])
|
116
|
-
prepare_block.call(resource) if prepare_block
|
117
|
-
|
118
|
-
resource_web_url = yield
|
119
|
-
resource.web_url = resource_web_url
|
120
|
-
|
121
|
-
resource
|
122
|
-
end
|
123
|
-
private_class_method :do_fabricate!
|
124
|
-
|
125
|
-
def self.log_fabrication(method, resource, parents, args)
|
126
|
-
return yield unless Runtime::Env.debug?
|
127
|
-
|
128
|
-
start = Time.now
|
129
|
-
prefix = "==#{'=' * parents.size}>"
|
130
|
-
msg = [prefix]
|
131
|
-
msg << "Built a #{name}"
|
132
|
-
msg << "as a dependency of #{parents.last}" if parents.any?
|
133
|
-
msg << "via #{method}"
|
134
|
-
|
135
|
-
yield.tap do
|
136
|
-
msg << "in #{Time.now - start} seconds"
|
137
|
-
puts msg.join(' ')
|
138
|
-
puts if parents.empty?
|
139
|
-
end
|
140
|
-
end
|
141
|
-
private_class_method :log_fabrication
|
142
|
-
|
143
|
-
def self.evaluator
|
144
|
-
@evaluator ||= Base::DSL.new(self)
|
145
|
-
end
|
146
|
-
private_class_method :evaluator
|
147
|
-
|
148
|
-
class DSL
|
149
|
-
def initialize(base)
|
150
|
-
@base = base
|
151
|
-
end
|
152
|
-
|
153
|
-
def attribute(name, &block)
|
154
|
-
@base.module_eval do
|
155
|
-
attr_writer(name)
|
156
|
-
|
157
|
-
define_method(name) do
|
158
|
-
instance_variable_get("@#{name}") ||
|
159
|
-
instance_variable_set(
|
160
|
-
"@#{name}",
|
161
|
-
populate_attribute(name, block))
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
165
|
-
end
|
166
|
-
|
167
|
-
attribute :web_url
|
168
|
-
end
|
169
|
-
end
|
170
|
-
end
|