Skip to content

Commit

Permalink
3994 - Fixes test (#4022)
Browse files Browse the repository at this point in the history
* Adds sleep to test

* Adds sleep to additional odd failing test
  • Loading branch information
HazelGrant authored Dec 18, 2024
1 parent 1de16b0 commit 86cbcbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 2 additions & 0 deletions apps/dashboard/test/system/batch_connect_widgets_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ def make_bc_app(dir, form)

click_on 'Select Path'

sleep 1

table_id = "batch_connect_session_context_path_path_selector_table"
shown_dirs_and_files = find_all("##{table_id} tr td").map { |td| td["innerHTML"] }

Expand Down
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 86cbcbc

Please sign in to comment.