summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-09-02 12:55:16 -0300
committerRobert Speicher <rspeicher@gmail.com>2016-09-12 18:03:30 -0400
commitad7002e0c704778cda7b89dfd748584eb5742310 (patch)
tree5384033da942078bf582d7dc39b7188c7c6abc77
parent0a250cf9eb317c9f94dedc40b2dea9510e74fe09 (diff)
downloadgitlab-ce-rs-ssh-key-title-populate.tar.gz
Restore SSH Key title auto-population behaviorrs-ssh-key-title-populate
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/21823
-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 fe91044a593..6f15b2acf80 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -125,6 +125,7 @@ v 8.12.0 (unreleased)
- Add notification_settings API calls !5632 (mahcsig)
v 8.11.6 (unreleased)
+ - Restore SSH Key title auto-population behavior.
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