diff options
author | Ezekiel Kigbo <ekigbo@gitlab.com> | 2019-05-07 21:58:16 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2019-05-07 21:58:16 +0000 |
commit | 3ad6653b3e64ad81278cbbc24dacd15bd2d32e6f (patch) | |
tree | d481264c2003dd5f26da4f61da413d19db96c057 /spec/features/profiles/user_edit_profile_spec.rb | |
parent | 9d4450263fd7dc53dafd62389871d8b1fcea5e1a (diff) | |
download | gitlab-ce-3ad6653b3e64ad81278cbbc24dacd15bd2d32e6f.tar.gz |
Added user time settings fields to profile
Udpated user_edit_profile_spec with time preferences
Minor update form fields
Diffstat (limited to 'spec/features/profiles/user_edit_profile_spec.rb')
-rw-r--r-- | spec/features/profiles/user_edit_profile_spec.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/features/profiles/user_edit_profile_spec.rb b/spec/features/profiles/user_edit_profile_spec.rb index b43711f6ef6..a53da94ef7d 100644 --- a/spec/features/profiles/user_edit_profile_spec.rb +++ b/spec/features/profiles/user_edit_profile_spec.rb @@ -327,5 +327,37 @@ describe 'User edit profile' do end end end + + context 'User time preferences', :js do + let(:issue) { create(:issue, project: project)} + let(:project) { create(:project) } + + before do + stub_feature_flags(user_time_settings: true) + end + + it 'shows the user time preferences form' do + expect(page).to have_content('Time settings') + end + + it 'allows the user to select a time zone from a dropdown list of options' do + expect(page.find('.user-time-preferences .dropdown')).not_to have_css('.show') + + page.find('.user-time-preferences .js-timezone-dropdown').click + + expect(page.find('.user-time-preferences .dropdown')).to have_css('.show') + + page.find("a", text: "Nuku'alofa").click + + tz = page.find('.user-time-preferences #user_timezone', visible: false) + + expect(tz.value).to eq('Pacific/Tongatapu') + end + + it 'timezone defaults to servers default' do + timezone_name = Time.zone.tzinfo.name + expect(page.find('.user-time-preferences #user_timezone', visible: false).value).to eq(timezone_name) + end + end end end |