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
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
......
......@@ -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
......
......@@ -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
......
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