"
`;
-exports[`Component: FormAuthMethod initial incomplete form current setting: other form should show form heading with disabled status 1`] = `
-"
"
-`;
-
exports[`Component: FormAuthMethod initial incomplete form disabled user_oidc app should show disabled error message and disabled sso button 1`] = `
"
"
`;
+exports[`Component: FormAuthMethod initial incomplete form server url not set should show form heading with disabled status 1`] = `
+"
"
+`;
+
exports[`Component: FormAuthMethod initial incomplete form unsupported user_oidc app should show disabled error message and disabled sso button 1`] = `
"
diff --git a/tests/jest/components/admin/__snapshots__/FormSSOSettings.spec.js.snap b/tests/jest/components/admin/__snapshots__/FormSSOSettings.spec.js.snap
new file mode 100644
index 000000000..47a91b89b
--- /dev/null
+++ b/tests/jest/components/admin/__snapshots__/FormSSOSettings.spec.js.snap
@@ -0,0 +1,1593 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Component: FormSSOSettings complete form: edit mode Nextcloud Hub change to external provider should reset the changes on cancel 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode Nextcloud Hub change to external provider should set settings on save 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode Nextcloud Hub change to external provider should show external provider form fields 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+ Cancel
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode Nextcloud Hub disabled oidc app should be able to select external provider 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode Nextcloud Hub disabled oidc app should preserve the errors on cancel 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode Nextcloud Hub should enable "save" button if client-id is changed 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+
+
+
+
+
+ Cancel
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode Nextcloud Hub should reset the changes on cancel 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode Nextcloud Hub should set sso settings on save 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode Nextcloud Hub should show the form fields 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+
+
+
+
+
+ Cancel
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode external provider change to Nextcloud Hub should show form fields 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+
+
+
+
+
+ Cancel
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode external provider disabled oidc app should not show error card 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+ Cancel
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode external provider should reset the changes on cancel 1`] = `
+"
+
+
+
+
+
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode external provider should set sso settings on save 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode external provider should show the form fields 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+ Cancel
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode external provider token exchange enabled should set sso settings on save 1`] = `
+"
+
+
+
+
+
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: edit mode external provider token exchange enabled should show the form fields 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+ Cancel
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: view mode apps state disabled user_oidc app should show error card 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: view mode apps state oidc app disabled app - Nextcloud Hub settings should show error card 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: view mode apps state oidc app disabled app - external provider settings should not show error card 1`] = `
+"
+
+
+
+
+
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: view mode apps state oidc app unsupported app - Nextcloud Hub settings should show error card 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: view mode apps state oidc app unsupported app - external provider settings should not show error card 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: view mode apps state unsupported user_oidc app should show error card 1`] = `
+"
+
+
+
+
+
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: view mode with supported apps enabled should show the settings in view mode - complete Nextcloud Hub 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: view mode with supported apps enabled should show the settings in view mode - complete external provider with token exchange 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings complete form: view mode with supported apps enabled should show the settings in view mode - complete external provider without token exchange 1`] = `
+"
+
+
+
+
+
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode apps state disabled oidc app should not show error card when preceding form is not complete 1`] = `
+"
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode apps state disabled oidc app should show disabled error label but not error card 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode apps state disabled user_oidc app should not show error card when preceding form is not complete 1`] = `
+"
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode apps state disabled user_oidc app should show error card with disabled form fields 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode apps state unsupported oidc app should not show error card when preceding form is not complete 1`] = `
+"
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode apps state unsupported oidc app should show disabled error label but not error card 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode apps state unsupported user_oidc app should not show error card when preceding form is not complete 1`] = `
+"
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode apps state unsupported user_oidc app should show error card with disabled form fields 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode with supported apps enabled external SSO provider should enable "Save" button if the form is complete 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode with supported apps enabled external SSO provider when token change is enabled should enable "Save" button if the form is complete 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode with supported apps enabled external SSO provider when token change is enabled should show client-id field 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode with supported apps enabled save button Nextcloud Hub should set sso settings on save 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode with supported apps enabled save button external SSO Provider should set sso settings on save: with token exchange 1`] = `
+"
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode with supported apps enabled save button external SSO Provider should set sso settings on save: without token exchange 1`] = `
+"
+
+
+
+
+
+
+
+
+
+
+
+ Edit authentication settings
+
+
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode with supported apps enabled should enable "Save" button if the form is complete 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode with supported apps enabled should hide form fields when preceding form is not complete 1`] = `
+"
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode with supported apps enabled should show form fields without errors 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode with supported apps enabled should show form related to selected provider type 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings new form: edit mode with supported apps enabled should show form related to selected provider type 2`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings partially complete form Nextcloud Hub - should show form fields 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings partially complete form external token exchange and without client-id - should show form fields 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings partially complete form external token exchange and without provider - should show form fields 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings partially complete form external without provider - should show form fields 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+ Select a provider *
+
+
+
You can configure OIDC providers in the {settingsLink}
+
+
+
+ Token Exchange
+
+
+ When enabled, the app will try to obtain a token for the given audience from the identity provider. If disabled, it will use the access token obtained during the login process.
+
+
Enable token exchange
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;
+
+exports[`Component: FormSSOSettings save failure should show error message on save failure 1`] = `
+"
+
+
+
+
+
+
+ OIDC Provider Type *
+
+
+ Nextcloud Hub
+
+
+
+
+
+ External Provider
+
+
+
+
+
+
+
+
+
+
+ Save
+
+
+
+
"
+`;