[#4178] Fixing integration tests based on the UI changes.
This commit is contained in:
1 parent
de0752ed02
commit
074d6a47e7
9 files changed
+17
-15
No files matched your search
@@ -80,7 +80,7 @@
|
|||||||
<% if resource.deliverables.empty? %>
|
<% if resource.deliverables.empty? %>
|
||||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||||
<% else %>
|
<% else %>
|
||||||
<table width="100%" id="texpand">
|
<table width="100%" class="texpand" id="deliverables">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= l(:field_end_date) %></th>
|
<th><%= l(:field_end_date) %></th>
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
<%= format_budget_for_deliverable(deliverable, 0, 0) %><%# TODO: Release 2, Fixed Budgets %>
|
<%= format_budget_for_deliverable(deliverable, 0, 0) %><%# TODO: Release 2, Fixed Budgets %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<tr class="ign">
|
<tr id="deliverable_details_<%= h(deliverable.id) %>" class="ign">
|
||||||
<td colspan="11">
|
<td colspan="11">
|
||||||
|
|
||||||
<div class="expanded">
|
<div class="expanded">
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<li class="numeric optional">
|
<li class="numeric optional">
|
||||||
<%= content_tag(:label, l(:field_labor)) %>
|
<%= content_tag(:label, l(:field_labor)) %>
|
||||||
<table class="deliverable_finance_table">
|
<table id="deliverable-labor" class="deliverable_finance_table">
|
||||||
|
|
||||||
<% form.fields_for :labor_budgets do |labor_budget| %>
|
<% form.fields_for :labor_budgets do |labor_budget| %>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -36,11 +36,11 @@
|
|||||||
<select><option>TODO: Release 3</option></select>
|
<select><option>TODO: Release 3</option></select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<p class="inline-hints"><%= l(:text_short_hours) %></p>
|
<p class="inline-hints"><%= labor_budget.label(:hours, l(:text_short_hours)) %></p>
|
||||||
<%= labor_budget.text_field(:hours, :size => 10) %>
|
<%= labor_budget.text_field(:hours, :size => 10) %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<p class="inline-hints"><%= l(:text_dollar_sign) %></p>
|
<p class="inline-hints"><%= labor_budget.label(:budget, l(:text_dollar_sign)) %></p>
|
||||||
<%= labor_budget.text_field(:budget, :size => 10) %>
|
<%= labor_budget.text_field(:budget, :size => 10) %>
|
||||||
</td>
|
</td>
|
||||||
<%# TODO: Green Add button for multiple records %>
|
<%# TODO: Green Add button for multiple records %>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
<li class="numeric optional">
|
<li class="numeric optional">
|
||||||
<%= content_tag(:label, l(:field_overhead)) %>
|
<%= content_tag(:label, l(:field_overhead)) %>
|
||||||
<table class="deliverable_finance_table">
|
<table id="deliverable-overhead" class="deliverable_finance_table">
|
||||||
|
|
||||||
<% form.fields_for :overhead_budgets do |overhead_budget| %>
|
<% form.fields_for :overhead_budgets do |overhead_budget| %>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -63,11 +63,11 @@
|
|||||||
<select><option>TODO: Release 3</option></select>
|
<select><option>TODO: Release 3</option></select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<p class="inline-hints"><%= l(:text_short_hours) %></p>
|
<p class="inline-hints"><%= overhead_budget.label(:hours, l(:text_short_hours)) %></p>
|
||||||
<%= overhead_budget.text_field(:hours, :size => 10) %>
|
<%= overhead_budget.text_field(:hours, :size => 10) %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<p class="inline-hints"><%= l(:text_dollar_sign) %></p>
|
<p class="inline-hints"><%= overhead_budget.label(:budget, l(:text_dollar_sign)) %></p>
|
||||||
<%= overhead_budget.text_field(:budget, :size => 10) %>
|
<%= overhead_budget.text_field(:budget, :size => 10) %>
|
||||||
</td>
|
</td>
|
||||||
<%# TODO: Green Add button for multiple records %>
|
<%# TODO: Green Add button for multiple records %>
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ jQuery(function($) {
|
|||||||
$("#deliverables table tbody tr td:contains('---')").css("text-align", "center");
|
$("#deliverables table tbody tr td:contains('---')").css("text-align", "center");
|
||||||
|
|
||||||
|
|
||||||
$("#texpand").jExpand();
|
$(".texpand").jExpand();
|
||||||
|
|
||||||
$("#texpand").find("tr.even").next('tr:first').addClass("even");
|
$(".texpand").find("tr.even").next('tr:first').addClass("even");
|
||||||
|
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
|
|
||||||
|
|||||||
@@ -122,6 +122,8 @@ padding-left: 0px; /* Don't pad submit buttons */
|
|||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.deliverable_finance_table p.inline-hints label {font-weight: normal; float: none; display: auto; margin-left: 0px; } /* An inline label so it needs to be reset from .tabular */
|
||||||
|
|
||||||
#expand_terms{
|
#expand_terms{
|
||||||
margin: 10px 0 10px 0;
|
margin: 10px 0 10px 0;
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class ContractsEditTest < ActionController::IntegrationTest
|
|||||||
end
|
end
|
||||||
|
|
||||||
fill_in "Name", :with => 'An updated name'
|
fill_in "Name", :with => 'An updated name'
|
||||||
click_button "Update Contract"
|
click_button "Save Contract"
|
||||||
|
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template 'contracts/show'
|
assert_template 'contracts/show'
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class ContractsNewTest < ActionController::IntegrationTest
|
|||||||
fill_in "End Date", :with => '2010-12-31'
|
fill_in "End Date", :with => '2010-12-31'
|
||||||
select "Net 30", :from => "Payment Terms"
|
select "Net 30", :from => "Payment Terms"
|
||||||
|
|
||||||
click_button "Create Contract"
|
click_button "Save Contract"
|
||||||
|
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template 'contracts/show'
|
assert_template 'contracts/show'
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class ContractsShowTest < ActionController::IntegrationTest
|
|||||||
assert_template 'contracts/show'
|
assert_template 'contracts/show'
|
||||||
assert_equal "/projects/main/contracts/#{@contract.id}", current_url
|
assert_equal "/projects/main/contracts/#{@contract.id}", current_url
|
||||||
|
|
||||||
assert_select "div#contract_#{@contract.id}.contract" do
|
assert_select "div.title-bar" do
|
||||||
assert_select 'h2', :text => @contract.name
|
assert_select 'h2', :text => @contract.name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class DeliverablesDeleteTest < ActionController::IntegrationTest
|
|||||||
should "allow anyone to delete the deliverable" do
|
should "allow anyone to delete the deliverable" do
|
||||||
visit_contract_page(@contract)
|
visit_contract_page(@contract)
|
||||||
|
|
||||||
click_link_within "#fixed_deliverable_#{@deliverable.id}", 'Delete'
|
click_link_within "#deliverable_details_#{@deliverable.id}", 'Delete'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template 'contracts/show'
|
assert_template 'contracts/show'
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class DeliverablesEditTest < ActionController::IntegrationTest
|
|||||||
|
|
||||||
should "allow any user to edit the Fixed deliverable" do
|
should "allow any user to edit the Fixed deliverable" do
|
||||||
visit_contract_page(@contract)
|
visit_contract_page(@contract)
|
||||||
click_link_within "#fixed_deliverable_#{@fixed_deliverable.id}", 'Edit'
|
click_link_within "#deliverable_details_#{@fixed_deliverable.id}", 'Edit'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template 'deliverables/edit'
|
assert_template 'deliverables/edit'
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user