From 0446419a83b6e2641b5d1356f36945017102e97c Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Sat, 21 Apr 2018 01:18:18 +0800 Subject: 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. --- app/views/ci/variables/_variable_row.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views') 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') } -- cgit v1.2.1