summaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-12-01 11:43:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-12-01 11:43:22 +0000
commit78a15a23b418ff0cafb5c88bc775c17c1726e156 (patch)
treeba4b7dfad92f2a916a4eee730fc3bd736e7288fd /test/test_helper.rb
parent6309131c139044fd6d3bb1264cffdefbe28a307b (diff)
downloadredmine-78a15a23b418ff0cafb5c88bc775c17c1726e156.tar.gz
redmine-78a15a23b418ff0cafb5c88bc775c17c1726e156.zip
Fix random test failure, assertion must be made against displayed values.
IssuesControllerTest#test_index_sort_by_spent_hours_should_sort_by_visible_spent_hours Expected: [3.0, 0.0, 0.0] Actual: [3.0, 4.0, 0.0] git-svn-id: http://svn.redmine.org/redmine/trunk@17672 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 6dcdb7a7c..796daf268 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -312,7 +312,12 @@ module Redmine
def columns_in_list
css_select('table.list thead th:not(.checkbox)').map(&:text).select(&:present?)
end
-
+
+ # Returns the values that are displayed in tds with the given css class
+ def columns_values_in_list(css_class)
+ css_select("table.list tbody td.#{css_class}").map(&:text)
+ end
+
# Verifies that the query filters match the expected filters
def assert_query_filters(expected_filters)
response.body =~ /initFilters\(\);\s*((addFilter\(.+\);\s*)*)/