Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-18 00:09:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-18 00:09:39 +0300
commit63b9a1e5bd6f67dd375e00c44eedf6a526f6653d (patch)
tree224c640358c560f6b827a3a7efff6df2d774bb70 /qa
parent708ee0bcb2c20cc73db53c092a26f916139d15d4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/main/sign_up.rb12
-rw-r--r--qa/qa/specs/features/sanity/version_spec.rb37
2 files changed, 42 insertions, 7 deletions
diff --git a/qa/qa/page/main/sign_up.rb b/qa/qa/page/main/sign_up.rb
index 01bcd0a8f57..b7808afb209 100644
--- a/qa/qa/page/main/sign_up.rb
+++ b/qa/qa/page/main/sign_up.rb
@@ -13,6 +13,10 @@ module QA
element :new_user_accept_terms_checkbox
end
+ view 'app/views/registrations/welcome.html.haml' do
+ element :get_started_button
+ end
+
def sign_up!(user)
fill_element :new_user_name_field, user.name
fill_element :new_user_username_field, user.username
@@ -24,19 +28,13 @@ module QA
signed_in = retry_until do
click_element :new_user_register_button if has_element?(:new_user_register_button)
- click_get_started_button
+ click_element :get_started_button if has_element?(:get_started_button)
Page::Main::Menu.perform(&:has_personal_area?)
end
raise "Failed to register and sign in" unless signed_in
end
-
- private
-
- # overridden in EE
- def click_get_started_button
- end
end
end
end
diff --git a/qa/qa/specs/features/sanity/version_spec.rb b/qa/qa/specs/features/sanity/version_spec.rb
new file mode 100644
index 00000000000..cace46c3590
--- /dev/null
+++ b/qa/qa/specs/features/sanity/version_spec.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: true
+
+require 'airborne'
+
+module QA
+ # This test ensures that the version described by the `DEPLOY_VERSION`
+ # environment variable is the version actually running.
+ #
+ # See https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/1179
+ RSpec.describe 'Version sanity check', :smoke do
+ let(:api_client) { Runtime::API::Client.new(:gitlab) }
+ let(:request) { Runtime::API::Request.new(api_client, '/version') }
+
+ it 'is the specified version' do
+ # The `DEPLOY_VERSION` variable will only be provided for deploys to the
+ # `pre` and `release` environments, which only receive packaged releases.
+ #
+ # For these releases, `deploy_version` will be a package string (e.g.,
+ # `13.1.3-ee.0`), and the reported version will be something like
+ # `13.1.3-ee`, so we only compare the leading SemVer string.
+ #
+ # | Package | Version |
+ # | ---------------- | -------------- |
+ # | 13.3.5-ee.0 | 13.3.5-ee |
+ # | 13.3.0-rc42.ee.0 | 13.3.0-rc42-ee |
+ deploy = Runtime::Env.deploy_version&.gsub(/\A(\d+\.\d+\.\d+).*\z/, '\1')
+
+ skip('No deploy version provided') if deploy.nil? || deploy.empty?
+
+ get request.url
+
+ expect_status(200)
+ expect(json_body).to have_key(:version)
+ expect(json_body[:version]).to start_with(deploy)
+ end
+ end
+end