Skip to content

Commit

Permalink
Rescues our attempt to find the file by reuploading it
Browse files Browse the repository at this point in the history
The screenshot from the test failure indicates that the hello-world.c file isn't being uploaded. This failure occurs when I first start up my environment in the morning and then is fixed after I attempt to `binding.pry` into it. I want to see what happens if we attempt to re-upload the file on failure. :person_shrugging:
  • Loading branch information
HazelGrant committed Dec 9, 2024
1 parent 6e87891 commit e6613b4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions apps/dashboard/test/system/remote_files_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,15 @@ def setup
src_file = 'test/fixtures/files/upload/hello-world.c'
attach_file 'files[]', src_file, visible: false, match: :first
find('.uppy-StatusBar-actionBtn--upload', wait: MAX_WAIT).click
sleep 10
find('tbody a', exact_text: File.basename(src_file), wait: MAX_WAIT)

begin
find('tbody a', exact_text: File.basename(src_file), wait: MAX_WAIT)
rescue
attach_file 'files[]', src_file, visible: false, match: :first
find('.uppy-StatusBar-actionBtn--upload', wait: MAX_WAIT).click

find('tbody a', exact_text: File.basename(src_file), wait: MAX_WAIT)
end
end
end
end
Expand Down

0 comments on commit e6613b4

Please sign in to comment.