Fix indendity test
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
cc04c5b828
commit
3fe3cbf222
3 changed files with 15 additions and 6 deletions
|
@ -9,7 +9,7 @@
|
||||||
= link_to edit_admin_user_path(@user), class: "btn btn-grouped" do
|
= link_to edit_admin_user_path(@user), class: "btn btn-grouped" do
|
||||||
%i.fa.fa-pencil-square-o
|
%i.fa.fa-pencil-square-o
|
||||||
Edit
|
Edit
|
||||||
|
%hr
|
||||||
%ul.nav.nav-tabs
|
%ul.nav.nav-tabs
|
||||||
= nav_link(path: 'users#show') do
|
= nav_link(path: 'users#show') do
|
||||||
= link_to "Account", admin_user_path(@user)
|
= link_to "Account", admin_user_path(@user)
|
||||||
|
|
|
@ -40,6 +40,7 @@ Feature: Admin Users
|
||||||
Given user "Pete" with ssh keys
|
Given user "Pete" with ssh keys
|
||||||
And I visit admin users page
|
And I visit admin users page
|
||||||
And click on user "Pete"
|
And click on user "Pete"
|
||||||
|
And click on ssh keys tab
|
||||||
Then I should see key list
|
Then I should see key list
|
||||||
And I click on the key title
|
And I click on the key title
|
||||||
Then I should see key details
|
Then I should see key details
|
||||||
|
|
|
@ -121,23 +121,27 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
|
||||||
end
|
end
|
||||||
|
|
||||||
step 'I visit "Pete" identities page in admin' do
|
step 'I visit "Pete" identities page in admin' do
|
||||||
|
Gitlab::OAuth::Provider.stub!(names: %w(twitter twitter_updated))
|
||||||
visit admin_user_identities_path(@user)
|
visit admin_user_identities_path(@user)
|
||||||
end
|
end
|
||||||
|
|
||||||
step 'I should see twitter details' do
|
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'
|
expect(page).to have_content 'twitter'
|
||||||
end
|
end
|
||||||
|
|
||||||
step 'I modify twitter identity' do
|
step 'I modify twitter identity' do
|
||||||
|
within '.table' do
|
||||||
click_link 'Edit'
|
click_link 'Edit'
|
||||||
|
end
|
||||||
|
|
||||||
fill_in 'identity_extern_uid', with: '654321'
|
fill_in 'identity_extern_uid', with: '654321'
|
||||||
fill_in 'identity_provider', with: 'twitter_updated'
|
select 'twitter_updated', from: 'identity_provider'
|
||||||
click_button 'Save changes'
|
click_button 'Save changes'
|
||||||
end
|
end
|
||||||
|
|
||||||
step 'I should see twitter details updated' do
|
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 'twitter_updated'
|
||||||
expect(page).to have_content '654321'
|
expect(page).to have_content '654321'
|
||||||
end
|
end
|
||||||
|
@ -147,7 +151,11 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
|
||||||
end
|
end
|
||||||
|
|
||||||
step 'I should not see twitter details' do
|
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'
|
expect(page).to_not have_content 'twitter'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
step 'click on ssh keys tab' do
|
||||||
|
click_link 'SSH keys'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue