feat: Add test overrides (#5642)
* feat: Add test overrides * feat: add more func to test with * test: add tests for posthog store * fix: only init once * fix: only init once * test: fix
This commit is contained in:
@@ -179,13 +179,19 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, {
|
||||
setSettings(settings: IN8nUISettings): void {
|
||||
this.settings = settings;
|
||||
this.userManagement = settings.userManagement;
|
||||
this.userManagement.showSetupOnFirstLoad = !!settings.userManagement.showSetupOnFirstLoad;
|
||||
if (this.userManagement) {
|
||||
this.userManagement.showSetupOnFirstLoad = !!settings.userManagement.showSetupOnFirstLoad;
|
||||
}
|
||||
this.api = settings.publicApi;
|
||||
this.onboardingCallPromptEnabled = settings.onboardingCallPromptEnabled;
|
||||
this.ldap.loginEnabled = settings.sso.ldap.loginEnabled;
|
||||
this.ldap.loginLabel = settings.sso.ldap.loginLabel;
|
||||
this.saml.loginEnabled = settings.sso.saml.loginEnabled;
|
||||
this.saml.loginLabel = settings.sso.saml.loginLabel;
|
||||
if (settings.sso?.ldap) {
|
||||
this.ldap.loginEnabled = settings.sso.ldap.loginEnabled;
|
||||
this.ldap.loginLabel = settings.sso.ldap.loginLabel;
|
||||
}
|
||||
if (settings.sso?.saml) {
|
||||
this.saml.loginEnabled = settings.sso.saml.loginEnabled;
|
||||
this.saml.loginLabel = settings.sso.saml.loginLabel;
|
||||
}
|
||||
},
|
||||
async getSettings(): Promise<void> {
|
||||
const rootStore = useRootStore();
|
||||
|
||||
Reference in New Issue
Block a user