summaryrefslogtreecommitdiff
path: root/qa/qa
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2018-01-16 15:13:14 -0600
committerEric Eastwood <contact@ericeastwood.com>2018-02-05 13:09:29 -0600
commit3be32027b6c543287b94b5be34bf53039d86f88c (patch)
tree6b883f46148f4f6a2f8c127cdefbb205acb2609b /qa/qa
parent79570ce24fa93709db7a7bdd4fae2532a7235486 (diff)
downloadgitlab-ce-3be32027b6c543287b94b5be34bf53039d86f88c.tar.gz
Use dynamic variable list in scheduled pipelines and group/project CI secret variables
See https://gitlab.com/gitlab-org/gitlab-ce/issues/39118 Conflicts: app/views/ci/variables/_form.html.haml app/views/ci/variables/_table.html.haml ee/app/views/ci/variables/_environment_scope.html.haml spec/javascripts/ci_variable_list/ci_variable_list_ee_spec.js spec/javascripts/fixtures/projects.rb
Diffstat (limited to 'qa/qa')
-rw-r--r--qa/qa/factory/resource/secret_variable.rb2
-rw-r--r--qa/qa/page/project/settings/secret_variables.rb43
2 files changed, 18 insertions, 27 deletions
diff --git a/qa/qa/factory/resource/secret_variable.rb b/qa/qa/factory/resource/secret_variable.rb
index 54ef4d8d964..af0fa8af2df 100644
--- a/qa/qa/factory/resource/secret_variable.rb
+++ b/qa/qa/factory/resource/secret_variable.rb
@@ -31,7 +31,7 @@ module QA
page.fill_variable_key(key)
page.fill_variable_value(value)
- page.add_variable
+ page.save_variables
end
end
end
diff --git a/qa/qa/page/project/settings/secret_variables.rb b/qa/qa/page/project/settings/secret_variables.rb
index e3bfbfcf080..fea4acb389a 100644
--- a/qa/qa/page/project/settings/secret_variables.rb
+++ b/qa/qa/page/project/settings/secret_variables.rb
@@ -5,49 +5,40 @@ module QA
class SecretVariables < Page::Base
include Common
- view 'app/views/ci/variables/_table.html.haml' do
- element :variable_key, '.variable-key'
- element :variable_value, '.variable-value'
+ view 'app/views/ci/variables/_variable_row.html.haml' do
+ element :variable_key, '.js-ci-variable-input-key'
+ element :variable_value, '.js-ci-variable-input-value'
end
view 'app/views/ci/variables/_index.html.haml' do
- element :add_new_variable, 'btn_text: "Add new variable"'
- end
-
- view 'app/assets/javascripts/behaviors/secret_values.js' do
- element :reveal_value, 'Reveal value'
- element :hide_value, 'Hide value'
+ element :save_variables, '.js-secret-variables-save-button'
end
def fill_variable_key(key)
- fill_in 'variable_key', with: key
+ page.within('.js-ci-variable-list-section .js-row:nth-child(1)') do
+ page.find('.js-ci-variable-input-key').set(key)
+ end
end
def fill_variable_value(value)
- fill_in 'variable_value', with: value
+ page.within('.js-ci-variable-list-section .js-row:nth-child(1)') do
+ page.find('.js-ci-variable-input-value').set(value)
+ end
end
- def add_variable
- click_on 'Add new variable'
+ def save_variables
+ click_button('Save variables')
end
def variable_key
- page.find('.variable-key').text
- end
-
- def variable_value
- reveal_value do
- page.find('.variable-value').text
+ page.within('.js-ci-variable-list-section .js-row:nth-child(1)') do
+ page.find('.js-ci-variable-input-key').value
end
end
- private
-
- def reveal_value
- click_button('Reveal value')
-
- yield.tap do
- click_button('Hide value')
+ def variable_value
+ page.within('.js-ci-variable-list-section .js-row:nth-child(1)') do
+ page.find('.js-ci-variable-input-value').value
end
end
end