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

Mark JavaScript tests with :js #2751

Merged
merged 1 commit into from
Dec 16, 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
2 changes: 1 addition & 1 deletion spec/features/patient_sorting_filtering_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
then_i_see_patients_with_year_group_10
end

scenario "Users can sort and filter patients with JS", type: :system do
scenario "Users can sort and filter patients with JS", :js do
given_that_i_am_signed_in
when_i_visit_the_consents_page
then_i_see_patients_ordered_by_name_asc
Expand Down
13 changes: 5 additions & 8 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@
process_timeout: 30
)
end
Capybara.javascript_driver = :cuprite_custom

Capybara.asset_host = "http://localhost:4000"
Capybara.javascript_driver = :cuprite_custom
Capybara.server = :puma, { Silent: true }

ActiveJob::Base.queue_adapter = :test

Expand Down Expand Up @@ -202,12 +204,8 @@
# arbitrary gems may also be filtered via:
# config.filter_gems_from_backtrace("gem name")

config.before(:each, type: :system) do
WebMock.disable!
driven_by(:cuprite_custom)
end

config.after(:each, type: :system) { WebMock.enable! }
config.before(:each, :js) { WebMock.allow_net_connect! }
config.after(:each, :js) { WebMock.disable_net_connect! }

config.before do
ActionMailer::Base.deliveries.clear
Expand All @@ -218,7 +216,6 @@
config.include ActiveSupport::Testing::TimeHelpers
config.include Capybara::RSpecMatchers, type: :component
config.include Devise::Test::IntegrationHelpers, type: :feature
config.include Devise::Test::IntegrationHelpers, type: :system
config.include CIS2AuthHelper, type: :feature
config.include PDSHelper, type: :feature
config.include EmailExpectations, type: :feature
Expand Down
Loading