Browse Source

fix failing test

pull/557/head
Dushan Despotovic 3 years ago committed by Kat
parent
commit
bcca42cca6
  1. 2
      app/controllers/organisations_controller.rb
  2. 2
      spec/features/user_spec.rb
  3. 2
      spec/rails_helper.rb

2
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

2
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}")

2
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

Loading…
Cancel
Save