summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-22 17:52:22 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-22 17:52:22 +0200
commit3fe3cbf222a036d4487b9630e2abfc58ec7515cf (patch)
treea3beafdddb2defcbf5475c011657698b380961b3
parentcc04c5b82897564e4a78d7cd36bff853cc7efd83 (diff)
downloadgitlab-ce-3fe3cbf222a036d4487b9630e2abfc58ec7515cf.tar.gz
Fix indendity test
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/views/admin/users/_head.html.haml2
-rw-r--r--features/admin/users.feature1
-rw-r--r--features/steps/admin/users.rb18
3 files changed, 15 insertions, 6 deletions
diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml
index c1ec1d48e17..9d5e934c8ba 100644
--- a/app/views/admin/users/_head.html.haml
+++ b/app/views/admin/users/_head.html.haml
@@ -9,7 +9,7 @@
= link_to edit_admin_user_path(@user), class: "btn btn-grouped" do
%i.fa.fa-pencil-square-o
Edit
-
+%hr
%ul.nav.nav-tabs
= nav_link(path: 'users#show') do
= link_to "Account", admin_user_path(@user)
diff --git a/features/admin/users.feature b/features/admin/users.feature
index f17254911b7..6755645778a 100644
--- a/features/admin/users.feature
+++ b/features/admin/users.feature
@@ -40,6 +40,7 @@ Feature: Admin Users
Given user "Pete" with ssh keys
And I visit admin users page
And click on user "Pete"
+ And click on ssh keys tab
Then I should see key list
And I click on the key title
Then I should see key details
diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb
index a9bb314b24f..149603391b3 100644
--- a/features/steps/admin/users.rb
+++ b/features/steps/admin/users.rb
@@ -121,23 +121,27 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
end
step 'I visit "Pete" identities page in admin' do
+ Gitlab::OAuth::Provider.stub!(names: %w(twitter twitter_updated))
visit admin_user_identities_path(@user)
end
step 'I should see twitter details' do
- expect(page).to have_content 'Identities for Pete'
+ expect(page).to have_content 'Pete'
expect(page).to have_content 'twitter'
end
step 'I modify twitter identity' do
- click_link 'Edit'
+ within '.table' do
+ click_link 'Edit'
+ end
+
fill_in 'identity_extern_uid', with: '654321'
- fill_in 'identity_provider', with: 'twitter_updated'
+ select 'twitter_updated', from: 'identity_provider'
click_button 'Save changes'
end
step 'I should see twitter details updated' do
- expect(page).to have_content 'Identities for Pete'
+ expect(page).to have_content 'Pete'
expect(page).to have_content 'twitter_updated'
expect(page).to have_content '654321'
end
@@ -147,7 +151,11 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
end
step 'I should not see twitter details' do
- expect(page).to have_content 'Identities for Pete'
+ expect(page).to have_content 'Pete'
expect(page).to_not have_content 'twitter'
end
+
+ step 'click on ssh keys tab' do
+ click_link 'SSH keys'
+ end
end