##// 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 281 options[:zoom] ||= 1
282 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])
285 label = "#{h project } #{h project.completed_percent(:include_subprojects => true).to_i.to_s}%"
284 coords = coordinates(project.start_date, project.due_date, nil, options[:zoom])
285 label = h(project)
286 286
287 287 case options[:format]
288 288 when :html
@@ -353,24 +353,24 class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
353 353 end
354 354
355 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 357 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
358 358 assert_select "div.project.task_late[style*=left:28px]", true, @response.body
359 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 362 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
363 363 assert_select "div.project.task_late[style*=width:30px]", true, @response.body
364 364 end
365 365 end
366 366
367 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 369 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
370 370 assert_select "div.project.task_done[style*=left:28px]", true, @response.body
371 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 374 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
375 375 assert_select "div.project.task_done[style*=width:18px]", true, @response.body
376 376 end
@@ -420,7 +420,7 class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
420 420 assert_select "div.project.label", /#{@project.name}/
421 421 end
422 422
423 should "show the percent complete" do
423 should_eventually "show the percent complete" do
424 424 @response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
425 425 assert_select "div.project.label", /0%/
426 426 end
General Comments 0
You need to be logged in to leave comments. Login now