diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-11-29 08:52:39 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-11-29 08:52:39 +0300 |
commit | e0a46540c3ab4774fd0c39ba5f28ca8909ce76b6 (patch) | |
tree | f058fd729261230046365d7a40f98d8a8f6f03f3 /spec | |
parent | 25c1256736db8a9b1fc72885eb273552416851e8 (diff) | |
parent | 59fa98dd8462fa2f7865828275b5e80e362e4a6e (diff) |
Merge branch 'hide-project-variables' into 'master'
Hide project variables values by default
Add a button to reveal/hide the values to help prevent accidental disclosure of sensitive information from wandering on a page.
![hide-vars](/uploads/5b5eeef9b4650776b529b780998bbb1b/hide-vars.gif)
Closes #21358
See merge request !7731
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/variables_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/features/variables_spec.rb b/spec/features/variables_spec.rb index d7880d5778f..ff30ffd7820 100644 --- a/spec/features/variables_spec.rb +++ b/spec/features/variables_spec.rb @@ -29,6 +29,31 @@ describe 'Project variables', js: true do end end + it 'reveals and hides new variable' do + fill_in('variable_key', with: 'key') + fill_in('variable_value', with: 'key value') + click_button('Add new variable') + + page.within('.variables-table') do + expect(page).to have_content('key') + expect(page).to have_content('******') + end + + click_button('Reveal Values') + + page.within('.variables-table') do + expect(page).to have_content('key') + expect(page).to have_content('key value') + end + + click_button('Hide Values') + + page.within('.variables-table') do + expect(page).to have_content('key') + expect(page).to have_content('******') + end + end + it 'deletes variable' do page.within('.variables-table') do find('.btn-variable-delete').click |