diff --git a/spec/fixtures/vcr_cassettes/Connected_Apps/can_be_enabled_and_disabled.yml b/spec/fixtures/vcr_cassettes/Connected_Apps/Discover_Regenerative/can_be_enabled_and_disabled.yml similarity index 100% rename from spec/fixtures/vcr_cassettes/Connected_Apps/can_be_enabled_and_disabled.yml rename to spec/fixtures/vcr_cassettes/Connected_Apps/Discover_Regenerative/can_be_enabled_and_disabled.yml diff --git a/spec/system/admin/enterprises/connected_apps_spec.rb b/spec/system/admin/enterprises/connected_apps_spec.rb index 652982b0ed..cf63dc7908 100644 --- a/spec/system/admin/enterprises/connected_apps_spec.rb +++ b/spec/system/admin/enterprises/connected_apps_spec.rb @@ -28,36 +28,38 @@ RSpec.describe "Connected Apps", feature: :connected_apps, vcr: true do expect(page).to have_content "CONNECTED APPS" end - it "can be enabled and disabled" do - visit edit_admin_enterprise_path(enterprise) + describe "Discover Regenerative" do + it "can be enabled and disabled" do + visit edit_admin_enterprise_path(enterprise) - scroll_to :bottom - click_link "Connected apps" - expect(page).to have_content "Discover Regenerative" + scroll_to :bottom + click_link "Connected apps" + expect(page).to have_content "Discover Regenerative" - click_button "Allow data sharing" - expect(page).not_to have_button "Allow data sharing" - expect(page).to have_button "Loading", disabled: true + click_button "Allow data sharing" + expect(page).not_to have_button "Allow data sharing" + expect(page).to have_button "Loading", disabled: true - perform_enqueued_jobs(only: ConnectAppJob) - expect(page).not_to have_button "Loading", disabled: true - expect(page).to have_content "account is connected" - expect(page).to have_link "Manage listing" + perform_enqueued_jobs(only: ConnectAppJob) + expect(page).not_to have_button "Loading", disabled: true + expect(page).to have_content "account is connected" + expect(page).to have_link "Manage listing" - click_button "Stop sharing" - expect(page).to have_button "Allow data sharing" - expect(page).not_to have_button "Stop sharing" - expect(page).not_to have_content "account is connected" - expect(page).not_to have_link "Manage listing" - end + click_button "Stop sharing" + expect(page).to have_button "Allow data sharing" + expect(page).not_to have_button "Stop sharing" + expect(page).not_to have_content "account is connected" + expect(page).not_to have_link "Manage listing" + end - it "can't be enabled by non-manager" do - login_as create(:admin_user) + it "can't be enabled by non-manager" do + login_as create(:admin_user) - visit "#{edit_admin_enterprise_path(enterprise)}#/connected_apps_panel" - expect(page).to have_content "Discover Regenerative" + visit "#{edit_admin_enterprise_path(enterprise)}#/connected_apps_panel" + expect(page).to have_content "Discover Regenerative" - expect(page).to have_button("Allow data sharing", disabled: true) - expect(page).to have_content "Only managers can connect apps." + expect(page).to have_button("Allow data sharing", disabled: true) + expect(page).to have_content "Only managers can connect apps." + end end end