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

@@ -2797,12 +2797,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(
@@ -3857,10 +3853,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