diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2018-02-12 12:48:31 -0600 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2018-02-12 12:48:31 -0600 |
commit | c833a09d9156e26851746250460ddd2f091e73cd (patch) | |
tree | 01791c2a8461b53c797b3d5b91858f98b07eb477 /qa/qa/page/project/settings/secret_variables.rb | |
parent | 46ae03628de47d1bef2683a3a5fe4963b3df7d52 (diff) | |
parent | 0a22ff267b2d3d787d3da44d927caac7bd442832 (diff) | |
download | gitlab-ce-c833a09d9156e26851746250460ddd2f091e73cd.tar.gz |
Merge branch 'master' into jivl-update-katex
Diffstat (limited to 'qa/qa/page/project/settings/secret_variables.rb')
-rw-r--r-- | qa/qa/page/project/settings/secret_variables.rb | 43 |
1 files changed, 17 insertions, 26 deletions
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 |