Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't make expectations on the downloads folder #482

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,8 @@
config.before :each, type: :system do
driven_by :rack_test
end

config.before :each, type: :system, js: true do
driven_by :selenium, using: :headless_chrome do |driver_options|
driver_options.add_preference :download,
default_directory: Downloads::PATH,
prompt_for_download: false,
directory_upgrade: true
driver_options.add_preference :plugins,
always_open_pdf_externally: true,
plugins_disabled: ['Chrome PDF Viewer']
end
end

config.before :suite do
Downloads.clear_downloads
driven_by :selenium, using: :headless_chrome
end
end

Expand Down
23 changes: 0 additions & 23 deletions spec/support/downloads.rb

This file was deleted.

2 changes: 0 additions & 2 deletions spec/system/drivers/editing_incidents_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
end

save_and_preview
Downloads.wait_for("#{incident.id}.pdf")

visit incident_path(incident)
expect(page).to have_selector 'h2', text: 'Driver Incident Report'
Expand All @@ -70,7 +69,6 @@
click_button 'Delete injured passenger info'

save_and_preview
Downloads.wait_for("#{incident.id}.pdf")

visit incident_path(incident)
expect(page).to have_selector 'h2', text: 'Driver Incident Report'
Expand Down