docbrown/spec/system/authentication/creator_config_edit_spec.rb
ludwiczakpawel 2cec22e146
Removing bootstrap from Config's collapsable sections (#16620)
* .

* updates

* update specs

* expand profile field before deleting

* expand auth section in rspec test

* expand smtp settings summary in rspec

* update user experience section specs

* more spec tweaks

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-03-22 14:57:07 +01:00

22 lines
681 B
Ruby

require "rails_helper"
RSpec.describe "Creator config edit", type: :system, js: true do
let(:admin) { create(:user, :super_admin) }
context "when a creator browses /admin/customization/config" do
before do
sign_in admin
allow(ForemInstance).to receive(:private?).and_return(false)
end
it "presents all available OAuth providers" do
visit admin_config_path
find("summary", text: "Authentication").click
Authentication::Providers.available_providers.each do |provider|
element = find(".config-authentication__item--label", text: /#{provider.official_name}/i)
expect(element).not_to be_nil
end
end
end
end