Skip to content

Commit

Permalink
Added debug statement for flaky favorites test
Browse files Browse the repository at this point in the history
  • Loading branch information
abujeda committed Apr 9, 2024
1 parent 5adea97 commit 7d4a4ad
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions apps/dashboard/test/system/batch_connect_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ def make_bc_app(dir, form)
click_on('Select Path')

# shows the OodFilesApp.candidate_favorite_paths favorites
favorites = all('#favorites li', wait: 30)
favorites = get_favorites
assert_equal(2, favorites.size)
assert_equal('/tmp', favorites[0].text.strip)
assert_equal('/var', favorites[1].text.strip)
Expand Down Expand Up @@ -1396,7 +1396,7 @@ def make_bc_app(dir, form)
click_on('Select Path')

# favorites that have been configured in yml
favorites = all('#favorites li', wait: 30)
favorites = get_favorites
assert_equal(2, favorites.size)
assert_equal('/fs/ess', favorites[0].text.strip)
assert_equal('/fs/scratch', favorites[1].text.strip)
Expand Down Expand Up @@ -1433,11 +1433,19 @@ def make_bc_app(dir, form)
click_on('Select Path')

# no favorites show up
favorites = all('#favorites li', wait: 30)
favorites = get_favorites
assert_equal(0, favorites.size)
end
end

def get_favorites
# For debugging flaky tests
favorites = all('#favorites li', wait: 30)
puts "FAVORITES: "
puts favorites.map{|i| i['innerHTML']}.join('')
favorites
end

test 'saves settings as a template' do
with_modified_env({ ENABLE_NATIVE_VNC: 'true', OOD_BC_SAVED_SETTINGS: 'true' }) do
Dir.mktmpdir do |dir|
Expand Down

0 comments on commit 7d4a4ad

Please sign in to comment.