From bcca42cca61ae0b6255c4c7858b6e29c7adb1e20 Mon Sep 17 00:00:00 2001 From: Dushan Despotovic Date: Fri, 13 May 2022 16:19:48 +0100 Subject: [PATCH] fix failing test --- app/controllers/organisations_controller.rb | 2 +- spec/features/user_spec.rb | 2 +- spec/rails_helper.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/organisations_controller.rb b/app/controllers/organisations_controller.rb index 0b98b2dbe..2b779ccca 100644 --- a/app/controllers/organisations_controller.rb +++ b/app/controllers/organisations_controller.rb @@ -45,7 +45,7 @@ class OrganisationsController < ApplicationController def logs if current_user.support? @pagy, @case_logs = pagy(CaseLog.all.where(owning_organisation_id: @organisation.id)) - redirect_to "/logs" + render "logs", layout: "application" end end diff --git a/spec/features/user_spec.rb b/spec/features/user_spec.rb index 7a64c6503..8490833d8 100644 --- a/spec/features/user_spec.rb +++ b/spec/features/user_spec.rb @@ -581,7 +581,7 @@ RSpec.describe "User Features" do end context "when the support user is on the organisations list page" do - it "they can click on an organisation to see their logs page", js: true do + it "they can click on an organisation to see their logs page" do visit("/organisations") click_link("Test3") expect(page).to have_selector("a", text: "#{case_log.id}") diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 40d2bc73a..5787ffe66 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -11,7 +11,7 @@ require "view_component/test_helpers" Capybara.register_driver :headless do |app| options = Selenium::WebDriver::Firefox::Options.new - # options.add_argument("--headless") + options.add_argument("--headless") Capybara::Selenium::Driver.new(app, browser: :firefox, capabilities: options) end