Skip to content

Commit

Permalink
Version 6.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrossello committed Dec 20, 2024
2 parents ed0d132 + 6551cfb commit 9afc9bf
Show file tree
Hide file tree
Showing 38 changed files with 194 additions and 408 deletions.
60 changes: 48 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,52 @@
Gemfile.lock
/.project
/.idea
/.vscode
/.loadpath
/.powrc
/.rvmrc
/.ruby-version
/.byebug_history
/config/additional_environment.rb
/config/configuration.yml
/config/database.yml
/config/email.yml
/config/secrets.yml
/config/initializers/session_store.rb
/config/initializers/secret_token.rb
/coverage
/db/*.db
/db/*.sqlite3
/db/*.sqlite3-*
/db/schema.rb
/files/*
/lib/redmine/scm/adapters/mercurial/redminehelper.pyc
/lib/redmine/scm/adapters/mercurial/redminehelper.pyo
/log/*.log*
/log/mongrel_debug
/plugins/*
!/plugins/README
/public/assets/*
/public/dispatch.*
/public/plugin_assets/*
/themes/*
!/themes/README
/tmp/*
/tmp/cache/*
/tmp/pdf/*
/tmp/sessions/*
/tmp/sockets/*
/tmp/test/*
/tmp/thumbnails/*
/vendor/cache
*.rbc

/.bundle
/Gemfile.lock
/Gemfile.local

/node_modules
yarn-error.log
config/overrides
.buildpath
.byebug_history
.project
.metadata/
Gemfile.lock
config/
db/
files/
log/
public/
tmp/
.metadata/
coverage/
themes/
7 changes: 3 additions & 4 deletions init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
description 'Allows to run the Redmine test suite along with plugin tests, considering the different behaviors
introduced by supported plugins over the Redmine default behavior.
Unsupported plugins are signaled in the logs.'
version '6.0.1'
version '6.0.2'
url 'https://github.com/maxrossello/redmine_testsuites.git'
author_url 'https://github.com/maxrossello'
requires_redmine :version => '6.0.1'
requires_redmine :version => '6.0.2'

end

Expand All @@ -47,8 +47,7 @@
redmine_better_overview: { tilde_greater_than: '6.0.1', mandatory: false },
redmine_extended_watchers: { tilde_greater_than: '6.0.1', mandatory: false },
redmine_pluggable_themes: { tilde_greater_than: '6.0.1', mandatory: false },
redwine: { version: '6.0.1', mandatory: false },
sidebar_hide: { version_or_higher: '6.0.1', mandatory: false }
redwine: { version: '6.0.2', mandatory: false },
}

Rails.configuration.after_initialize do
Expand Down
4 changes: 2 additions & 2 deletions test/functional/account_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def test_get_login
get :login
assert_response :success

assert_select 'input[name=username]'
assert_select 'input[name=password]'
assert_select 'input[name=username][autocomplete=username]'
assert_select 'input[name=password][autocomplete=current-password]'
end

def test_get_login_while_logged_in_should_redirect_to_back_url_if_present
Expand Down
17 changes: 0 additions & 17 deletions test/functional/attachments_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -530,23 +530,6 @@ def test_edit_all_issue_attachment_by_user_without_edit_issue_permission_on_trac
assert_response :not_found
end

def test_edit_all_issue_attachment_by_user_without_edit_issue_permission_on_tracker_should_return_404
role = Role.find(2)
role.set_permission_trackers 'edit_issues', [2, 3]
role.save!

@request.session[:user_id] = 2

get(
:edit_all,
:params => {
:object_type => 'issues',
:object_id => '4'
}
)
assert_response 404
end

def test_update_all
@request.session[:user_id] = 2
patch(
Expand Down
22 changes: 0 additions & 22 deletions test/functional/groups_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,28 +97,6 @@ def test_show_should_display_only_visible_users
assert_select 'li', :text => locked_user.name, :count => 0
end

def test_show_group_that_is_not_visible_should_return_404
Role.anonymous.update! :users_visibility => 'members_of_visible_projects'

@request.session[:user_id] = nil
get :show, :params => {:id => 10}
assert_response 404
end

def test_show_should_display_only_visible_users
group = Group.find(10)
locked_user = User.find(5)
group.users << locked_user
assert locked_user.locked?

@request.session[:user_id] = nil
get :show, :params => {:id => group.id}
assert_response :success

assert_select 'li', :text => 'User Misc'
assert_select 'li', :text => locked_user.name, :count => 0
end

def test_new
get :new
assert_response :success
Expand Down
15 changes: 0 additions & 15 deletions test/functional/issue_statuses_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,6 @@ def test_index_should_show_warning_when_no_workflow_is_defined
end
end

def test_index_should_show_warning_when_no_workflow_is_defined
status = IssueStatus.new :name => "No workflow"
status.save!
get :index
assert_response :success
assert_select 'table.issue_statuses tbody' do
assert_select 'tr:not(:last-of-type) span.icon-warning', :count => 0
assert_select 'tr:last-of-type' do
assert_select 'td.name', :text => status.name
assert_select 'td span.icon-warning',
:text => /#{I18n.t(:text_status_no_workflow)}/
end
end
end

def test_new
get :new
assert_response :success
Expand Down
8 changes: 6 additions & 2 deletions test/functional/issues_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2845,7 +2845,8 @@ def test_show_should_display_watchers_with_gravatars
assert_select 'a[class*=delete]'
end
assert_select "li.user-10" do
assert_select 'img.gravatar[title=?]', 'A Team'
assert_select 'a.group', :text => 'A Team'
assert_select 'svg'
assert_select 'a[href="/groups/10"]'
assert_select 'a[class*=delete]'
end
Expand Down Expand Up @@ -6035,7 +6036,10 @@ def test_get_edit_for_issue_with_transition_warning_should_show_the_warning

assert_response :success
reason = l(:notice_issue_not_closable_by_blocking_issue)
assert_select 'span.icon-warning[title=?]', reason, :text => reason
assert_select 'span.icon-warning[title=?]', reason do
assert_select "svg.icon-svg use:match('href', ?)", /assets\/icons-\w+.svg#icon--warning/
assert_select 'span.icon-label', test: reason
end
end

def test_get_edit_should_display_visible_spent_time_custom_field
Expand Down
39 changes: 2 additions & 37 deletions test/functional/messages_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,43 +106,8 @@ def test_show_should_display_watchers
assert_select 'a[class*=delete]'
end
assert_select "li.user-10" do
assert_select 'img.gravatar[title=?]', 'A Team', is_display_gravatar
assert_select 'a[href="/users/10"]', false
assert_select 'a[class*=delete]'
end
end
end
end

def test_show_should_not_display_watchers_without_permission
@request.session[:user_id] = 2
Role.find(1).remove_permission! :view_message_watchers
message = Message.find(1)
message.add_watcher User.find(2)
message.add_watcher Group.find(10)
get(:show, :params => {:board_id => 1, :id => 1})
assert_select 'div#watchers ul', 0
assert_select 'h3', {text: /Watchers \(\d*\)/, count: 0}
end

def test_show_should_display_watchers
@request.session[:user_id] = 2
message = Message.find(1)
message.add_watcher User.find(2)
message.add_watcher Group.find(10)
[['1', true], ['0', false]].each do |(gravatar_enabled, is_display_gravatar)|
with_settings :gravatar_enabled => gravatar_enabled do
get(:show, :params => {:board_id => 1, :id => 1})
end

assert_select 'div#watchers ul' do
assert_select 'li.user-2' do
assert_select 'img.gravatar[title=?]', 'John Smith', is_display_gravatar
assert_select 'a[href="/users/2"]'
assert_select 'a[class*=delete]'
end
assert_select "li.user-10" do
assert_select 'img.gravatar[title=?]', 'A Team', is_display_gravatar
assert_select 'a.group', :text => 'A Team'
assert_select 'svg'
assert_select 'a[href="/users/10"]', false
assert_select 'a[class*=delete]'
end
Expand Down
6 changes: 3 additions & 3 deletions test/functional/my_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,9 @@ def test_post_destroy_with_unsubscribe_not_allowed_should_not_destroy_account
def test_change_password
get :password
assert_response :success
assert_select 'input[type=password][name=password]'
assert_select 'input[type=password][name=new_password]'
assert_select 'input[type=password][name=new_password_confirmation]'
assert_select 'input[type=password][name=password][autocomplete=current-password]'
assert_select 'input[type=password][name=new_password][autocomplete=new-password]'
assert_select 'input[type=password][name=new_password_confirmation][autocomplete=new-password]'
end

def test_update_password
Expand Down
20 changes: 0 additions & 20 deletions test/functional/news_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@ def test_index_with_invalid_project_should_respond_with_302_for_anonymous
end
end

def test_index_with_invalid_project_should_respond_with_302_for_anonymous
Role.anonymous.remove_permission! :view_news
with_settings :login_required => '0' do
get(:index, :params => {:project_id => 999})
assert_response 302
end
end

def test_index_without_permission_should_fail
Role.all.each {|r| r.remove_permission! :view_news}
@request.session[:user_id] = 2
Expand All @@ -83,18 +75,6 @@ def test_index_without_manage_news_permission_should_not_display_add_news_link
assert_select '.add-news-link', count: 1
end

def test_index_without_manage_news_permission_should_not_display_add_news_link
user = User.find(2)
@request.session[:user_id] = user.id
Role.all.each {|r| r.remove_permission! :manage_news}
get :index
assert_select '.add-news-link', count: 0

user.members.first.roles.first.add_permission! :manage_news
get :index
assert_select '.add-news-link', count: 1
end

def test_show
get(:show, :params => {:id => 1})
assert_response :success
Expand Down
2 changes: 1 addition & 1 deletion test/functional/projects_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ProjectsControllerTest < Redmine::ControllerTest
:enabled_modules, :enumerations, :boards, :messages,
:attachments, :custom_fields, :custom_values, :time_entries,
:wikis, :wiki_pages, :wiki_contents, :wiki_content_versions,
:roles, :queries
:roles, :queries, :issue_categories

include Redmine::I18n

Expand Down
14 changes: 0 additions & 14 deletions test/functional/queries_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,6 @@ def test_new_should_not_render_show_totals_option_for_query_without_totable_colu
assert_select 'p[class=?]', 'totables_columns', 0
end

def test_new_should_not_render_show_inline_columns_option_for_query_without_available_inline_columns
@request.session[:user_id] = 1
get(:new, :params => {:type => 'ProjectQuery'})
assert_response :success
assert_select 'p[class=?]', 'block_columns', 0
end

def test_new_should_not_render_show_totals_option_for_query_without_totable_columns
@request.session[:user_id] = 1
get(:new, :params => {:type => 'ProjectQuery'})
assert_response :success
assert_select 'p[class=?]', 'totables_columns', 0
end

def test_new_time_entry_query
@request.session[:user_id] = 2
get(:new, :params => {:project_id => 1, :type => 'TimeEntryQuery'})
Expand Down
Loading

0 comments on commit 9afc9bf

Please sign in to comment.