gtt-project / redmine_custom_fields_groups

Redmine plugin for grouping custom fields.
GNU General Public License v3.0
12 stars 4 forks source link

Redmine core tests failed with "Neutered Exception ActionView::Template::Error: No route matches" error #35

Open sanak opened 1 month ago

sanak commented 1 month ago

Problem Currently, Redmine core tests failed, but it would be nice to pass the tests to ensure Redmine core operation.

Error:
RolesControllerTest#test_update_with_failure:
RuntimeError: Neutered Exception ActionView::Template::Error: No route matches {:action=>"index", :controller=>"custom_fields_groups", :id=>"1"}
    lib/redmine/menu_manager.rb:183:in `render_single_menu_node'
    lib/redmine/menu_manager.rb:127:in `render_menu_node'
    lib/redmine/menu_manager.rb:116:in `block in render_menu'
    lib/redmine/menu_manager.rb:199:in `block in menu_items_for'
    lib/redmine/menu_manager.rb:196:in `each'
    lib/redmine/menu_manager.rb:196:in `menu_items_for'
    lib/redmine/menu_manager.rb:115:in `render_menu'
    app/views/admin/_menu.html.erb:2
    app/views/layouts/admin.html.erb:4
    app/views/layouts/admin.html.erb:2
    app/controllers/roles_controller.rb:92:in `block (2 levels) in update'
    app/controllers/roles_controller.rb:91:in `update'
    lib/redmine/sudo_mode.rb:61:in `sudo_mode'
    test/functional/roles_controller_test.rb:231:in `test_update_with_failure'

rails test test/functional/roles_controller_test.rb:230

To Reproduce Run bundle exec rails test.

Expectation There should be no errors.

Platform:

sanak commented 1 month ago

Most of the errors were not reproducible by VSCode debug and one test or one file test by bundle exec rails test test/**/**.rb. I will check the cause, later.

sanak commented 1 month ago

It seems to hit the following recent Redmine issue.

After removing plugins_test.rb, all tests passed except the following one.

Failure:
IssuesControllerTest#test_show_with_full_width_layout_custom_field_should_show_field_under_description [test/functional/issues_controller_test.rb:2824]:
Expected exactly 0 elements matching "div.attributes div.attribute.cf_28 div.value", found 1.
Expected: 0
  Actual: 1

rails test test/functional/issues_controller_test.rb:2808