Skip to content

Commit

Permalink
move this test so merge looks better
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom committed Aug 30, 2024
1 parent cebb5aa commit 6a17e38
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions apps/dashboard/test/system/files_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,19 @@ def setup
end
end

test 'block devices are not downloadable' do
visit files_url('/dev')

null_row = find('tbody a', exact_text: 'null').ancestor('tr')
null_row.find('button.dropdown-toggle').click
null_links = null_row.all('td > div.btn-group > ul > li > a').map(&:text)

# NOTE: download is not an expected link.
expected_links = ['View', 'Edit', 'Rename', 'Delete']

assert_equal(expected_links, null_links)
end

test 'allowlist errors flash' do
with_modified_env({ OOD_ALLOWLIST_PATH: Rails.root.to_s }) do
visit(files_url(Rails.root))
Expand All @@ -661,18 +674,5 @@ def setup
alert_text = find('.alert > span').text
assert_equal('/etc does not have an ancestor directory specified in ALLOWLIST_PATH', alert_text)
end

test 'block devices are not downloadable' do
visit files_url('/dev')

null_row = find('tbody a', exact_text: 'null').ancestor('tr')
null_row.find('button.dropdown-toggle').click
null_links = null_row.all('td > div.btn-group > ul > li > a').map(&:text)

# NOTE: download is not an expected link.
expected_links = ['View', 'Edit', 'Rename', 'Delete']

assert_equal(expected_links, null_links)
end
end
end

0 comments on commit 6a17e38

Please sign in to comment.