diff --git a/app/assets/javascripts/administrate/application.js b/app/assets/javascripts/administrate/application.js index aa8a55d18b..1742ae435c 100644 --- a/app/assets/javascripts/administrate/application.js +++ b/app/assets/javascripts/administrate/application.js @@ -1,4 +1,5 @@ //= require jquery +//= require jquery_ujs //= require selectize //= require moment //= require datetime_picker diff --git a/spec/example_app/app/assets/javascripts/application.js b/spec/example_app/app/assets/javascripts/application.js index 003b12b4c0..3e5bd21447 100644 --- a/spec/example_app/app/assets/javascripts/application.js +++ b/spec/example_app/app/assets/javascripts/application.js @@ -11,4 +11,5 @@ // about supported directives. // //= require jquery +//= require jquery_ujs //= require_tree . diff --git a/spec/features/log_entries_index_spec.rb b/spec/features/log_entries_index_spec.rb index d38af18b5b..1c0fcb13e3 100644 --- a/spec/features/log_entries_index_spec.rb +++ b/spec/features/log_entries_index_spec.rb @@ -48,7 +48,7 @@ expect(current_path).to eq(new_admin_log_entry_path) end - scenario "user deletes record" do + scenario "user deletes record", js: true do create(:log_entry) visit admin_log_entries_path diff --git a/spec/features/orders_index_spec.rb b/spec/features/orders_index_spec.rb index 223dcb3029..969cafcecf 100644 --- a/spec/features/orders_index_spec.rb +++ b/spec/features/orders_index_spec.rb @@ -45,7 +45,7 @@ expect(current_path).to eq(new_admin_order_path) end - scenario "user deletes record" do + scenario "user deletes record", js: true do create(:order) visit admin_orders_path @@ -56,7 +56,7 @@ ) end - scenario "cannot delete because associated payment" do + scenario "cannot delete because associated payment", js: true do create(:payment, order: create(:order)) visit admin_orders_path diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index ab55491ed1..e82e49a673 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -37,4 +37,8 @@ module Features Capybara::Poltergeist::Driver.new(app, options) end +Capybara.register_driver :rack_test do |app| + Capybara::RackTest::Driver.new(app, respect_data_method: false) +end + Capybara.server = :webrick