##// END OF EJS Templates
Submit the form after preview....
Jean-Philippe Lang -
r11118:eed4954f0a43
parent child
Show More
@@ -23,10 +23,9 class Redmine::UiTest::IssuesTest < Redmine::UiTest::Base
23 23 :enumerations, :custom_fields, :custom_values, :custom_fields_trackers,
24 24 :watchers
25 25
26 # create an issue
27 def test_add_issue
26 def test_create_issue
28 27 log_user('jsmith', 'jsmith')
29 visit new_issue_path(:project_id => 1)
28 visit '/projects/ecookbook/issues/new'
30 29 within('form#issue-form') do
31 30 select 'Bug', :from => 'Tracker'
32 31 select 'Low', :from => 'Priority'
@@ -60,7 +59,6 class Redmine::UiTest::IssuesTest < Redmine::UiTest::Base
60 59 def test_create_issue_with_watchers
61 60 User.generate!(:firstname => 'Some', :lastname => 'Watcher')
62 61
63 assert_difference 'Issue.count' do
64 62 log_user('jsmith', 'jsmith')
65 63 visit '/projects/ecookbook/issues/new'
66 64 fill_in 'Subject', :with => 'Issue with watchers'
@@ -75,6 +73,7 class Redmine::UiTest::IssuesTest < Redmine::UiTest::Base
75 73 check 'Some Watcher'
76 74 click_button 'Add'
77 75 end
76 assert_difference 'Issue.count' do
78 77 find('input[name=commit]').click
79 78 end
80 79
@@ -82,18 +81,21 class Redmine::UiTest::IssuesTest < Redmine::UiTest::Base
82 81 assert_equal ['Dave Lopper', 'Some Watcher'], issue.watcher_users.map(&:name).sort
83 82 end
84 83
85 # TODO: `fill_in 'Description'` makes all visit calls inoperative
86 # and breaks all tests that run after that
87 84 def test_preview_issue_description
88 skip("Breaks the test suite")
89
90 85 log_user('jsmith', 'jsmith')
91 visit new_issue_path(:project_id => 1)
86 visit '/projects/ecookbook/issues/new'
92 87 within('form#issue-form') do
88 fill_in 'Subject', :with => 'new issue subject'
93 89 fill_in 'Description', :with => 'new issue description'
94 90 click_link 'Preview'
95 91 end
96 92 find 'div#preview fieldset', :visible => true, :text => 'new issue description'
93 assert_difference 'Issue.count' do
94 find('input[name=commit]').click
95 end
96
97 issue = Issue.order('id desc').first
98 assert_equal 'new issue description', issue.description
97 99 end
98 100
99 101 def test_watch_issue_via_context_menu
General Comments 0
You need to be logged in to leave comments. Login now