diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-09-15 07:09:14 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-09-15 07:09:14 +0000 |
commit | 04e94bd3dda58665c11c09b6f60497b31b397b80 (patch) | |
tree | 056053e16b464eea46f8ab32bbede88ff77a5daa /test/functional/workflows_controller_test.rb | |
parent | 72e68c534edd8c6aa5d93e5b2ffc750015144a24 (diff) | |
download | redmine-04e94bd3dda58665c11c09b6f60497b31b397b80.tar.gz redmine-04e94bd3dda58665c11c09b6f60497b31b397b80.zip |
Disable workflow checkboxes with no status change (#5593).
Patch by Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17487 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/workflows_controller_test.rb')
-rw-r--r-- | test/functional/workflows_controller_test.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/functional/workflows_controller_test.rb b/test/functional/workflows_controller_test.rb index e1a58c35a..d33f4558d 100644 --- a/test/functional/workflows_controller_test.rb +++ b/test/functional/workflows_controller_test.rb @@ -110,7 +110,19 @@ class WorkflowsControllerTest < Redmine::ControllerTest assert_equal ["New issue"] + statuses, css_select('table.workflows.transitions-always tbody tr td:first').map(&:text).map(&:strip) - assert_select 'input[type=checkbox][name=?]', 'transitions[1][1][always]' + assert_select 'input[type=checkbox][name=?]', 'transitions[0][1][always]' + end + + def test_get_edit_should_show_checked_disabled_transition_checkbox_between_same_statuses + get :edit, :params => {:role_id => 2, :tracker_id => 1} + assert_response :success + assert_select 'table.workflows.transitions-always tbody tr:nth-child(2)' do + assert_select 'td.name', :text => 'New' + # assert that the td is enabled + assert_select "td[title='New ยป New'][class=?]", 'enabled' + # assert that the checkbox is disabled and checked + assert_select "input[name='transitions[1][1][always]'][checked=?][disabled=?]", 'checked', 'disabled', 1 + end end def test_post_edit |