Fix selenium chrome options so files are downloaded to tmp/downloads in system tests (#34119).

Patch by Jens Krämer.


git-svn-id: http://svn.redmine.org/redmine/trunk@20549 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2020-12-02 21:48:11 +00:00
parent 1d96cd2c4c
commit b42e8c2040
2 changed files with 4 additions and 9 deletions

View File

@@ -519,9 +519,7 @@ class IssuesSystemTest < ApplicationSystemTestCase
click_on 'CSV'
click_on 'Export'
# https://github.com/SeleniumHQ/selenium/issues/5292
# if issues.csv exists, Chrome creates issues (1).csv, issues (2).csv ...
csv = CSV.read(downloaded_file("issues*.csv"))
csv = CSV.read(downloaded_file("issues.csv"))
subject_index = csv.shift.index('Subject')
subjects = csv.map {|row| row[subject_index]}
assert_equal subjects.sort, subjects