diff options
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/factory/resource/secret_variable.rb | 3 | ||||
-rw-r--r-- | qa/qa/page/project/settings/secret_variables.rb | 11 | ||||
-rw-r--r-- | qa/qa/specs/features/project/deploy_key_clone_spec.rb | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/qa/qa/factory/resource/secret_variable.rb b/qa/qa/factory/resource/secret_variable.rb index c734d739b4a..12a830da116 100644 --- a/qa/qa/factory/resource/secret_variable.rb +++ b/qa/qa/factory/resource/secret_variable.rb @@ -16,8 +16,7 @@ module QA Page::Project::Settings::CICD.perform do |setting| setting.expand_secret_variables do |page| - page.fill_variable_key(key) - page.fill_variable_value(value) + page.fill_variable(key, value) page.save_variables end diff --git a/qa/qa/page/project/settings/secret_variables.rb b/qa/qa/page/project/settings/secret_variables.rb index c95c79f137d..89f1424a5fa 100644 --- a/qa/qa/page/project/settings/secret_variables.rb +++ b/qa/qa/page/project/settings/secret_variables.rb @@ -18,12 +18,11 @@ module QA element :reveal_values, '.js-secret-value-reveal-button' end - def fill_variable_key(key) - fill_in('Input variable key', with: key, match: :first) - end - - def fill_variable_value(value) - fill_in('Input variable value', with: value, match: :first) + def fill_variable(key, value) + all('.js-ci-variable-input-key')[-1].set(key) + # After we fill the key, JS would generate another field so + # we need to fill the one before last one instead of last one + all('.js-ci-variable-input-value')[-2].set(value) end def save_variables diff --git a/qa/qa/specs/features/project/deploy_key_clone_spec.rb b/qa/qa/specs/features/project/deploy_key_clone_spec.rb index 1fb3e85a338..42588d1181d 100644 --- a/qa/qa/specs/features/project/deploy_key_clone_spec.rb +++ b/qa/qa/specs/features/project/deploy_key_clone_spec.rb @@ -65,7 +65,9 @@ module QA - ssh-add -D - echo "$#{deploy_key_name}" | ssh-add - - git clone #{@repository_uri.git_uri} - - sha1sum #{@project.name}/.gitlab-ci.yml + - cd #{@project.name} + - git checkout #{deploy_key_name} + - sha1sum .gitlab-ci.yml tags: - qa - docker |