Commit 4c86b4e2 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Properly fill variable pair to the last fields

parent 8d4ad0c7
...@@ -16,8 +16,7 @@ module QA ...@@ -16,8 +16,7 @@ module QA
Page::Project::Settings::CICD.perform do |setting| Page::Project::Settings::CICD.perform do |setting|
setting.expand_secret_variables do |page| setting.expand_secret_variables do |page|
page.fill_variable_key(key) page.fill_variable(key, value)
page.fill_variable_value(value)
page.save_variables page.save_variables
end end
......
...@@ -18,12 +18,11 @@ module QA ...@@ -18,12 +18,11 @@ module QA
element :reveal_values, '.js-secret-value-reveal-button' element :reveal_values, '.js-secret-value-reveal-button'
end end
def fill_variable_key(key) def fill_variable(key, value)
fill_in('Input variable key', with: key, match: :first) all('.js-ci-variable-input-key')[-1].set(key)
end # After we fill the key, JS would generate another field so
# we need to fill the one before last one instead of last one
def fill_variable_value(value) all('.js-ci-variable-input-value')[-2].set(value)
fill_in('Input variable value', with: value, match: :first)
end end
def save_variables def save_variables
......
...@@ -65,7 +65,9 @@ module QA ...@@ -65,7 +65,9 @@ module QA
- ssh-add -D - ssh-add -D
- echo "$#{deploy_key_name}" | ssh-add - - echo "$#{deploy_key_name}" | ssh-add -
- git clone #{@repository_uri.git_uri} - 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: tags:
- qa - qa
- docker - docker
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment