Skip to content

Commit f744519

Browse files
committed
[rb] fix download test since Linux lists files in different order
1 parent c183146 commit f744519

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rb/spec/integration/selenium/webdriver/remote/driver_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ module Remote
5252

5353
file_names = %w[file_1.txt file_2.jpg]
5454

55-
expect(driver.downloadable_files).to eq file_names
55+
expect(driver.downloadable_files).to match_array(file_names)
5656
end
5757
end
5858

5959
it 'downloads a file', exclude: {browser: :safari, reason: 'grid hangs'} do
60-
target_directory = File.join(Dir.tmpdir, SecureRandom.uuid)
60+
target_directory = File.join(Dir.tmpdir.to_s, SecureRandom.uuid)
6161
at_exit { FileUtils.rm_f(target_directory) }
6262

6363
reset_driver!(enable_downloads: true) do |driver|
6464
browser_downloads(driver)
6565

66-
file_name = driver.downloadable_files.first
66+
file_name = 'file_1.txt'
6767
driver.download_file(file_name, target_directory)
6868

6969
file_content = File.read("#{target_directory}/#{file_name}").strip

0 commit comments

Comments
 (0)