##// END OF EJS Templates
Disable project completion display on the gantt (#7127)....
Jean-Philippe Lang -
r4468:ad620607539c
parent child
Show More
@@ -281,8 +281,8 module Redmine
281 options[:zoom] ||= 1
281 options[:zoom] ||= 1
282 options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom]
282 options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom]
283
283
284 coords = coordinates(project.start_date, project.due_date, project.completed_percent(:include_subprojects => true), options[:zoom])
284 coords = coordinates(project.start_date, project.due_date, nil, options[:zoom])
285 label = "#{h project } #{h project.completed_percent(:include_subprojects => true).to_i.to_s}%"
285 label = h(project)
286
286
287 case options[:format]
287 case options[:format]
288 when :html
288 when :html
@@ -353,24 +353,24 class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
353 end
353 end
354
354
355 context "late line" do
355 context "late line" do
356 should "start from the starting point on the left" do
356 should_eventually "start from the starting point on the left" do
357 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
357 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
358 assert_select "div.project.task_late[style*=left:28px]", true, @response.body
358 assert_select "div.project.task_late[style*=left:28px]", true, @response.body
359 end
359 end
360
360
361 should "be the total delayed width of the project" do
361 should_eventually "be the total delayed width of the project" do
362 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
362 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
363 assert_select "div.project.task_late[style*=width:30px]", true, @response.body
363 assert_select "div.project.task_late[style*=width:30px]", true, @response.body
364 end
364 end
365 end
365 end
366
366
367 context "done line" do
367 context "done line" do
368 should "start from the starting point on the left" do
368 should_eventually "start from the starting point on the left" do
369 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
369 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
370 assert_select "div.project.task_done[style*=left:28px]", true, @response.body
370 assert_select "div.project.task_done[style*=left:28px]", true, @response.body
371 end
371 end
372
372
373 should "Be the total done width of the project" do
373 should_eventually "Be the total done width of the project" do
374 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
374 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
375 assert_select "div.project.task_done[style*=width:18px]", true, @response.body
375 assert_select "div.project.task_done[style*=width:18px]", true, @response.body
376 end
376 end
@@ -420,7 +420,7 class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
420 assert_select "div.project.label", /#{@project.name}/
420 assert_select "div.project.label", /#{@project.name}/
421 end
421 end
422
422
423 should "show the percent complete" do
423 should_eventually "show the percent complete" do
424 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
424 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
425 assert_select "div.project.label", /0%/
425 assert_select "div.project.label", /0%/
426 end
426 end
General Comments 0
You need to be logged in to leave comments. Login now