diff options
Diffstat (limited to 'spec/features/profiles')
-rw-r--r-- | spec/features/profiles/user_edit_profile_spec.rb | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/spec/features/profiles/user_edit_profile_spec.rb b/spec/features/profiles/user_edit_profile_spec.rb index 23f660d111a..9839b3d6c80 100644 --- a/spec/features/profiles/user_edit_profile_spec.rb +++ b/spec/features/profiles/user_edit_profile_spec.rb @@ -23,6 +23,7 @@ describe 'User edit profile' do fill_in 'user_location', with: 'Ukraine' fill_in 'user_bio', with: 'I <3 GitLab' fill_in 'user_organization', with: 'GitLab' + select 'Data Analyst', from: 'user_role' submit_settings expect(user.reload).to have_attributes( @@ -31,7 +32,8 @@ describe 'User edit profile' do twitter: 'testtwitter', website_url: 'testurl', bio: 'I <3 GitLab', - organization: 'GitLab' + organization: 'GitLab', + role: 'data_analyst' ) expect(find('#user_location').value).to eq 'Ukraine' @@ -66,34 +68,6 @@ describe 'User edit profile' do end end - describe 'when I change my role' do - context 'experiment enabled' do - before do - stub_experiment_for_user(signup_flow: true) - visit(profile_path) - end - - it 'changes my role' do - expect(page).to have_content 'Role' - select 'Data Analyst', from: 'user_role' - submit_settings - user.reload - expect(user.role).to eq 'data_analyst' - end - end - - context 'experiment disabled' do - before do - stub_experiment_for_user(signup_flow: false) - visit(profile_path) - end - - it 'does not show the role picker' do - expect(page).not_to have_content 'Role' - end - end - end - context 'user avatar' do before do attach_file(:user_avatar, Rails.root.join('spec', 'fixtures', 'banana_sample.gif')) |