summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-07-02 06:53:00 +0000
committerGo MAEDA <maeda@farend.jp>2023-07-02 06:53:00 +0000
commit5965b4054d9d2466a6f3dd2931085ac8896cada3 (patch)
treee8148c20b943b37d3e5ac9a787695b95348b084a
parentc77f7f9d2855adf198fba9b09a4b40f23ed44358 (diff)
downloadredmine-5965b4054d9d2466a6f3dd2931085ac8896cada3.tar.gz
redmine-5965b4054d9d2466a6f3dd2931085ac8896cada3.zip
Merged r22273 from trunk to 4.2-stable (#38797).
git-svn-id: https://svn.redmine.org/redmine/branches/4.2-stable@22275 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/functional/issues_controller_test.rb15
-rw-r--r--test/functional/my_controller_test.rb16
-rw-r--r--test/functional/timelog_controller_test.rb2
-rw-r--r--test/functional/timelog_report_test.rb4
4 files changed, 21 insertions, 16 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 9f9f81682..6fcfff428 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -2754,12 +2754,8 @@ class IssuesControllerTest < Redmine::ControllerTest
assert_response :success
# long text custom field should not be render in the attributes div
- assert_select "div.attributes div.attribute.cf_#{field.id} p strong", 0, :text => 'Long text'
- assert_select(
- "div.attributes div.attribute.cf_#{field.id} div.value",
- 0,
- :text => 'This is a long text'
- )
+ assert_select "div.attributes div.attribute.cf_#{field.id} p strong", 0
+ assert_select "div.attributes div.attribute.cf_#{field.id} div.value", 0
# long text custom field should be render under description field
assert_select "div.description ~ div.attribute.cf_#{field.id} p strong", :text => 'Long text'
assert_select(
@@ -3797,10 +3793,11 @@ class IssuesControllerTest < Redmine::ControllerTest
end
assert_select 'div#trackers_description' do
- assert_select 'h3', 1, :text => 'Trackers description'
+ assert_select 'h3', :text => 'Trackers description', :count => 1
# only Bug and Feature have descriptions
- assert_select 'dt', 2, :text => 'Bug'
- assert_select 'dd', 2, :text => 'Description for Bug tracker'
+ assert_select 'dt', 2
+ assert_select 'dt', :text => 'Bug', :count => 1
+ assert_select 'dd', :text => 'Description for Bug tracker', :count => 1
end
end
diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb
index 160adf4f2..16b1392c0 100644
--- a/test/functional/my_controller_test.rb
+++ b/test/functional/my_controller_test.rb
@@ -272,7 +272,9 @@ class MyControllerTest < Redmine::ControllerTest
assert_match 'v[updated_by][]=me', report_url
assert_select 'table.issues tbody tr', 2
- assert_select 'table.issues tbody tr[id=?]', 'issue-1', 1, :title => 'Cannot print recipes'
+ assert_select 'table.issues tbody tr[id=?]', 'issue-1' do
+ assert_select 'td.subject a', :text => 'Cannot print recipes', :count => 1
+ end
assert_select 'table.issues tbody tr[id=?]', 'issue-14', 0
end
end
@@ -311,7 +313,9 @@ class MyControllerTest < Redmine::ControllerTest
assert_match 'v%5Bproject.status%5D%5B%5D=1', report_url
assert_select 'tr', 1
- assert_select 'tr[id=?]', 'issue-1', 1, :title => 'Cannot print recipes'
+ assert_select 'tr[id=?]', 'issue-1' do
+ assert_select 'td.subject a', :text => 'Cannot print recipes', :count => 1
+ end
assert_select 'tr[id=?]', 'issue-4', 0
end
end
@@ -339,7 +343,9 @@ class MyControllerTest < Redmine::ControllerTest
assert_match 'v%5Bproject.status%5D%5B%5D=1', report_url
assert_select 'table.issues tbody tr', 10
- assert_select 'table.issues tbody tr[id=?]', 'issue-1', 1, :title => 'Cannot print recipes'
+ assert_select 'table.issues tbody tr[id=?]', 'issue-1' do
+ assert_select 'td.subject a', :text => 'Cannot print recipes', :count => 1
+ end
assert_select 'table.issues tbody tr[id=?]', 'issue-4', 0
end
end
@@ -371,7 +377,9 @@ class MyControllerTest < Redmine::ControllerTest
assert_match 'v%5Bproject.status%5D%5B%5D=1', report_url
assert_select 'tr', 1
- assert_select 'tr[id=?]', 'issue-1', 1, :title => 'Cannot print recipes'
+ assert_select 'tr[id=?]', 'issue-1' do
+ assert_select 'td.subject a', :text => 'Cannot print recipes', :count => 1
+ end
assert_select 'tr[id=?]', 'issue-4', 0
end
end
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index 451bbaa09..5e31b35eb 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -755,7 +755,7 @@ class TimelogControllerTest < Redmine::ControllerTest
assert_response :success
assert_select 'select[id=?]', 'time_entry_activity_id' do
assert_select 'option', 3
- assert_select 'option[value=?]', '11', 0, :text => 'QA'
+ assert_select 'option[value=?]', '11', 0
end
end
diff --git a/test/functional/timelog_report_test.rb b/test/functional/timelog_report_test.rb
index e1f55f6a9..e531db3a7 100644
--- a/test/functional/timelog_report_test.rb
+++ b/test/functional/timelog_report_test.rb
@@ -110,8 +110,8 @@ class TimelogReportTest < Redmine::ControllerTest
get :report, :params => {:project_id => 1, :columns => 'month', :criteria => ["user", "activity"]}
assert_response :success
- assert_select 'td.name a.user.active[href=?]', '/users/1', 1, :text => 'Redmine Admin'
- assert_select 'td.name a.user.locked[href=?]', '/users/2', 1, :text => 'John Smith'
+ assert_select 'td.name a.user.active[href=?]', '/users/1', :text => 'Redmine Admin', :count => 1
+ assert_select 'td.name a.user.locked[href=?]', '/users/2', :text => 'John Smith', :count => 1
end
def test_report_custom_field_criteria_with_multiple_values_on_single_value_custom_field_should_not_fail