* feat: update the paths in the spec files * feat: update hardcoded paths with path helpers * chore: update hardcoded paths to path helpers * chore: hardcode describe blocks * chore: oops * feat: update some more hardcoded to use link_to's * fix broken tests * chore: admin_articles path * chore: oops remove rails helper * feat: add starting / * chore: more pre slashes * chore: add pre slashes * chore: some small typos * fix: oops
28 lines
864 B
Ruby
28 lines
864 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe "Creator config edit", type: :system, js: true do
|
|
let(:admin) { create(:user, :super_admin) }
|
|
|
|
# Apple auth is in Beta so we need to enable the Feature Flag to test it
|
|
before { Flipper.enable(:apple_auth) }
|
|
|
|
context "when a creator browses /admin/customization/config" do
|
|
before do
|
|
sign_in admin
|
|
allow(Settings::Authentication).to receive(:invite_only_mode).and_return(false)
|
|
end
|
|
|
|
it "presents all available OAuth providers" do
|
|
visit admin_config_path
|
|
|
|
within("div[data-target='#authenticationBodyContainer']") do
|
|
click_on("Show info", match: :first)
|
|
end
|
|
|
|
Authentication::Providers.available.each do |provider|
|
|
element = find(".config-authentication__item--label", text: /#{provider}/i)
|
|
expect(element).not_to be_nil
|
|
end
|
|
end
|
|
end
|
|
end
|