diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-04-21 01:18:18 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-04-21 01:18:18 +0800 |
commit | 0446419a83b6e2641b5d1356f36945017102e97c (patch) | |
tree | 396ec177f9de9696b58010b7418d8a5b8ced59b3 /app/views | |
parent | f718ccf2025765cdf631a105b093fcfd72ea8cae (diff) | |
download | gitlab-ce-0446419a83b6e2641b5d1356f36945017102e97c.tar.gz |
Use qa selectors for secret variables
The problem of using .js-ci-variable-input-value is that,
whenever the value is hidden, then this selector won't be set,
instead, .js-secret-value-placeholder would be set.
If we just fill the value, the value is revealed. But if
we visit this later, the values were be hidden. This means
we don't have a consistent way to count the values.
Adding an unique qa selector to both revealed and hidden
values would make it easier to track the values.
To make it look more consistent, let's also do the same
for the key.
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/ci/variables/_variable_row.html.haml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/ci/variables/_variable_row.html.haml b/app/views/ci/variables/_variable_row.html.haml index 440623b34f5..571eb28f195 100644 --- a/app/views/ci/variables/_variable_row.html.haml +++ b/app/views/ci/variables/_variable_row.html.haml @@ -17,14 +17,14 @@ .ci-variable-row-body %input.js-ci-variable-input-id{ type: "hidden", name: id_input_name, value: id } %input.js-ci-variable-input-destroy{ type: "hidden", name: destroy_input_name } - %input.js-ci-variable-input-key.ci-variable-body-item.form-control{ type: "text", + %input.js-ci-variable-input-key.ci-variable-body-item.qa-ci-variable-input-key.form-control{ type: "text", name: key_input_name, value: key, placeholder: s_('CiVariables|Input variable key') } .ci-variable-body-item - .form-control.js-secret-value-placeholder{ class: ('hide' unless id) } + .form-control.js-secret-value-placeholder.qa-ci-variable-input-value{ class: ('hide' unless id) } = '*' * 20 - %textarea.js-ci-variable-input-value.js-secret-value.form-control{ class: ('hide' if id), + %textarea.js-ci-variable-input-value.js-secret-value.qa-ci-variable-input-value.form-control{ class: ('hide' if id), rows: 1, name: value_input_name, placeholder: s_('CiVariables|Input variable value') } |