diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-04-19 20:02:21 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-04-19 20:02:21 +0300 |
commit | 6d713065622953c81dbf39c7d9f393f08f968179 (patch) | |
tree | a0055a1f84aa5214d615e7753eba3c6cf8fa0863 /spec | |
parent | ab4dbcecac691690bed34b74020ec4f21c207ce8 (diff) | |
parent | c2b311e034eeec6d9a3ddab1a86a56e2c13a11d4 (diff) |
Merge branch 'group-milestone-date-fields-fix' into 'master'
Fixed group milestones date pickers not working
Closes #31095
See merge request !10779
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/groups/milestone_spec.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/spec/features/groups/milestone_spec.rb b/spec/features/groups/milestone_spec.rb new file mode 100644 index 00000000000..daa2c6afd63 --- /dev/null +++ b/spec/features/groups/milestone_spec.rb @@ -0,0 +1,36 @@ +require 'rails_helper' + +feature 'Group milestones', :feature, :js do + let(:group) { create(:group) } + let!(:project) { create(:project_empty_repo, group: group) } + let(:user) { create(:group_member, :master, user: create(:user), group: group ).user } + + before do + Timecop.freeze + + login_as(user) + end + + after do + Timecop.return + end + + context 'create a milestone' do + before do + visit new_group_milestone_path(group) + end + + it 'creates milestone with start date' do + fill_in 'Title', with: 'testing' + find('#milestone_start_date').click + + page.within(find('.pika-single')) do + click_button '1' + end + + click_button 'Create milestone' + + expect(find('.start_date')).to have_content(Date.today.at_beginning_of_month.strftime('%b %-d, %Y')) + end + end +end |