summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-14 00:06:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-14 00:06:24 +0000
commiteed996ac33a60d5fd8315a62fec8beaa8e907e69 (patch)
treed8077bee50b58a170ae1a950ae76e3011c78a415 /spec/features
parentb42f312df5aee0f1b832b69171e9d1cf92eb7416 (diff)
downloadgitlab-ce-eed996ac33a60d5fd8315a62fec8beaa8e907e69.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/profiles/user_edit_profile_spec.rb32
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'))