summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features/browser_ui/4_verify
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-14 18:08:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-14 18:08:45 +0000
commit26a50872e9da9509c52c70f74dc21698fec906db (patch)
treeb1bd36bd72e701e346ef880fc7a905f6186525e7 /qa/qa/specs/features/browser_ui/4_verify
parentb3a736ed88a1db0391cd9881e70b987bab7d89d1 (diff)
downloadgitlab-ce-26a50872e9da9509c52c70f74dc21698fec906db.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/qa/specs/features/browser_ui/4_verify')
-rw-r--r--qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_ci_variable_spec.rb38
-rw-r--r--qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb59
2 files changed, 59 insertions, 38 deletions
diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_ci_variable_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_ci_variable_spec.rb
deleted file mode 100644
index c813484347e..00000000000
--- a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_ci_variable_spec.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-# frozen_string_literal: true
-
-module QA
- context 'Verify' do
- describe 'CI variable support' do
- it 'user adds a CI variable', :smoke do
- Flow::Login.sign_in
-
- project = Resource::Project.fabricate_via_api! do |project|
- project.name = 'project-with-ci-variables'
- project.description = 'project with CI variables'
- end
-
- Resource::CiVariable.fabricate_via_api! do |resource|
- resource.project = project
- resource.key = 'VARIABLE_KEY'
- resource.value = 'some_CI_variable'
- resource.masked = false
- end
-
- project.visit!
-
- Page::Project::Menu.perform(&:go_to_ci_cd_settings)
-
- Page::Project::Settings::CICD.perform do |settings|
- settings.expand_ci_variables do |page|
- expect(page).to have_field(with: 'VARIABLE_KEY')
- expect(page).not_to have_field(with: 'some_CI_variable')
-
- page.reveal_variables
-
- expect(page).to have_field(with: 'some_CI_variable')
- end
- end
- end
- end
- end
-end
diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb
new file mode 100644
index 00000000000..9dad5ad8fb5
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb
@@ -0,0 +1,59 @@
+# frozen_string_literal: true
+
+module QA
+ context 'Verify' do
+ describe 'Add or Remove CI variable via UI', :smoke do
+ let!(:project) do
+ Resource::Project.fabricate_via_api! do |project|
+ project.name = 'project-with-ci-variables'
+ project.description = 'project with CI variables'
+ end
+ end
+
+ before do
+ Flow::Login.sign_in
+ add_ci_variable
+ open_ci_cd_settings
+ end
+
+ it 'user adds a CI variable' do
+ Page::Project::Settings::CICD.perform do |settings|
+ settings.expand_ci_variables do |page|
+ expect(page).to have_field(with: 'VARIABLE_KEY')
+ expect(page).not_to have_field(with: 'some_CI_variable')
+
+ page.reveal_variables
+
+ expect(page).to have_field(with: 'some_CI_variable')
+ end
+ end
+ end
+
+ it 'user removes a CI variable' do
+ Page::Project::Settings::CICD.perform do |settings|
+ settings.expand_ci_variables do |page|
+ page.remove_variable
+
+ expect(page).not_to have_field(with: 'VARIABLE_KEY')
+ end
+ end
+ end
+
+ private
+
+ def add_ci_variable
+ Resource::CiVariable.fabricate_via_browser_ui! do |ci_variable|
+ ci_variable.project = project
+ ci_variable.key = 'VARIABLE_KEY'
+ ci_variable.value = 'some_CI_variable'
+ ci_variable.masked = false
+ end
+ end
+
+ def open_ci_cd_settings
+ project.visit!
+ Page::Project::Menu.perform(&:go_to_ci_cd_settings)
+ end
+ end
+ end
+end