Fix incorrect argument format for assert_select that causes ArgumentError with rails-dom-testing >= 2.1.0 (#38797).

Patch by Go MAEDA.


git-svn-id: https://svn.redmine.org/redmine/trunk@22273 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2023-07-02 06:34:03 +00:00
parent a519accb99
commit a7bc173a7e
4 changed files with 21 additions and 16 deletions

View File

@@ -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