summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-09-13 16:31:37 +0000
committerRobert Speicher <robert@gitlab.com>2016-09-13 16:31:37 +0000
commit82b8cc5d66655605091b1fa089b6a3e946bd536d (patch)
treed4971fc5d5eeaddebb33c71201478386e715a08c
parent6dc341f7f8f99376fb7d2ad53d642a4b3f454fea (diff)
parent0663d72d306e17c2f116cdf9becfb06b01d83842 (diff)
downloadgitlab-ce-82b8cc5d66655605091b1fa089b6a3e946bd536d.tar.gz
Merge branch 'rs-ssh-key-title-populate' into 'master'
Restore SSH Key title auto-population behavior Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/21823 See merge request !6186
-rw-r--r--CHANGELOG1
-rw-r--r--app/views/profiles/keys/index.html.haml1
-rw-r--r--spec/features/profiles/keys_spec.rb18
3 files changed, 20 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 0714dc4dc33..f1e2c5060f8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -133,6 +133,7 @@ v 8.12.0 (unreleased)
v 8.11.6 (unreleased)
- Fix an error where we were unable to create a CommitStatus for running state
+ - Restore SSH Key title auto-population behavior. !6186
v 8.11.5
- Optimize branch lookups and force a repository reload for Repository#find_branch. !6087
diff --git a/app/views/profiles/keys/index.html.haml b/app/views/profiles/keys/index.html.haml
index a42b3b8eb38..93187873501 100644
--- a/app/views/profiles/keys/index.html.haml
+++ b/app/views/profiles/keys/index.html.haml
@@ -1,4 +1,5 @@
- page_title "SSH Keys"
+= render 'profiles/head'
.row.prepend-top-default
.col-lg-3.profile-settings-sidebar
diff --git a/spec/features/profiles/keys_spec.rb b/spec/features/profiles/keys_spec.rb
new file mode 100644
index 00000000000..3b20d38c520
--- /dev/null
+++ b/spec/features/profiles/keys_spec.rb
@@ -0,0 +1,18 @@
+require 'rails_helper'
+
+describe 'Profile > SSH Keys', feature: true do
+ let(:user) { create(:user) }
+
+ before do
+ login_as(user)
+ visit profile_keys_path
+ end
+
+ describe 'User adds an SSH key' do
+ it 'auto-populates the title', js: true do
+ fill_in('Key', with: attributes_for(:key).fetch(:key))
+
+ expect(find_field('Title').value).to eq 'dummy@gitlab.com'
+ end
+ end
+end