From 160f6cd361cc5fd7fb4398a9a387f4f33a37e180 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 19 May 2013 00:27:39 +0000 Subject: [PATCH] add test of current issue start and due date datepicker (#14024) git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11879 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/_attributes.html.erb | 4 ++-- test/ui/issues_test.rb | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index 26c133a79..0e29701c6 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -47,7 +47,7 @@ <% end %> <% if @issue.safe_attribute? 'start_date' %> -

+

<%= f.text_field(:start_date, :size => 10, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('start_date')) %> <%= calendar_for('issue_start_date') if @issue.leaf? %> @@ -55,7 +55,7 @@ <% end %> <% if @issue.safe_attribute? 'due_date' %> -

+

<%= f.text_field(:due_date, :size => 10, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('due_date')) %> <%= calendar_for('issue_due_date') if @issue.leaf? %> diff --git a/test/ui/issues_test.rb b/test/ui/issues_test.rb index 8d5f403db..df25f8b9c 100644 --- a/test/ui/issues_test.rb +++ b/test/ui/issues_test.rb @@ -132,6 +132,21 @@ class Redmine::UiTest::IssuesTest < Redmine::UiTest::Base assert_equal ['Dave Lopper', 'Some Watcher'], issue.watcher_users.map(&:name).sort end + def test_create_issue_start_due_date + with_settings :default_issue_start_date_to_creation_date => 0 do + log_user('jsmith', 'jsmith') + visit '/projects/ecookbook/issues/new' + assert_equal "", page.find('input#issue_start_date').value + assert_equal "", page.find('input#issue_due_date').value + page.first('p#start_date_area img').click + page.first("td.ui-datepicker-days-cell-over a").click + assert_equal Date.today.to_s, page.find('input#issue_start_date').value + page.first('p#due_date_area img').click + page.first("td.ui-datepicker-days-cell-over a").click + assert_equal Date.today.to_s, page.find('input#issue_due_date').value + end + end + def test_preview_issue_description log_user('jsmith', 'jsmith') visit '/projects/ecookbook/issues/new' -- 2.39.5