From 5130d56d4d508e2459d27ba47442fa04472f0c99 Mon Sep 17 00:00:00 2001 From: HazelGrant Date: Wed, 18 Dec 2024 09:38:52 -0500 Subject: [PATCH] Adds sleep to test --- apps/dashboard/test/system/remote_files_test.rb | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/apps/dashboard/test/system/remote_files_test.rb b/apps/dashboard/test/system/remote_files_test.rb index 541224b03..b3eece379 100644 --- a/apps/dashboard/test/system/remote_files_test.rb +++ b/apps/dashboard/test/system/remote_files_test.rb @@ -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 @@ -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