[#4180] Show and hide the total field based on the Deliverable Type
Hooks up holygrail to do basic headless JavaScript testing.
This commit is contained in:
@@ -57,6 +57,8 @@ class DeliverablesNewTest < ActionController::IntegrationTest
|
||||
fill_in "End Date", :with => '2010-12-31'
|
||||
fill_in "Notes", :with => 'Some notes on the deliverable'
|
||||
fill_in "Total", :with => '1,000.00'
|
||||
# TODO: webrat can't trigger DOM events so it can't appear
|
||||
# assert js("jQuery('#deliverable_total').is(':visible')"), "Total is hidden when it should be visible"
|
||||
|
||||
click_button "Save"
|
||||
|
||||
@@ -89,6 +91,9 @@ class DeliverablesNewTest < ActionController::IntegrationTest
|
||||
fill_in "End Date", :with => '2010-12-31'
|
||||
fill_in "Notes", :with => 'Some notes on the deliverable'
|
||||
|
||||
assert js("jQuery('#deliverable_total').is(':hidden')"),
|
||||
"Total is visible when it should be hidden"
|
||||
|
||||
click_button "Save"
|
||||
|
||||
assert_response :success
|
||||
|
||||
Reference in New Issue
Block a user