Make archived projects visually distinguishable in nested projects lists (#34340).

Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@20699 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2020-12-30 01:35:24 +00:00
parent 93d98bfff8
commit d504120cf4
3 changed files with 16 additions and 0 deletions

View File

@@ -54,6 +54,20 @@ class TrackersControllerTest < Redmine::ControllerTest
end
end
def test_new_should_set_archived_class_for_archived_projects
project = Project.find(2)
project.update_attribute(:status, Project::STATUS_ARCHIVED)
get :new
assert_response :success
assert_select '#tracker_project_ids ul li' do
assert_select('> div[class*="archived"] input[name=?]', 'tracker[project_ids][]', 1) do
assert_select ':match("value", ?)', project.id.to_s
end
assert_select '> div:not([class*="archived"]) input[name=?]', 'tracker[project_ids][]', Project.count - 1
end
end
def test_new_with_copy
core_fields = ['assigned_to_id', 'category_id', 'fixed_version_id', 'parent_issue_id', 'start_date', 'due_date']
custom_field_ids = custom_field_ids = [1, 2, 6]