Skip to content

Commit

Permalink
Adds sleep to test
Browse files Browse the repository at this point in the history
  • Loading branch information
HazelGrant committed Dec 18, 2024
1 parent 1de16b0 commit 5130d56
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions apps/dashboard/test/system/remote_files_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ def setup
find('tbody a', exact_text: File.basename(src_file), wait: MAX_WAIT)

find('tbody a', exact_text: 'foo').click

# Need to wait until we're in the new directory before clicking upload
sleep 1
assert_no_selector 'tbody a', exact_text: 'foo', wait: MAX_WAIT

find('#upload-btn').click
Expand All @@ -318,18 +320,7 @@ 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

# TODO: Investigate why this upload is failing the first time in the first place.
begin
find('tbody a', exact_text: File.basename(src_file), wait: MAX_WAIT)
rescue
find('#upload-btn').click
find('.uppy-Dashboard-AddFiles', wait: MAX_WAIT)
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
find('tbody a', exact_text: File.basename(src_file), wait: MAX_WAIT)
end
end
end
Expand Down

0 comments on commit 5130d56

Please sign in to comment.