mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(editor): Don't show email banner if cloud info is missing (no-changelog) (#16948)
This commit is contained in:
committed by
GitHub
parent
716cb9aaca
commit
1e96d5436e
@@ -280,6 +280,22 @@ describe('Init', () => {
|
||||
expect(cloudStoreSpy).toHaveBeenCalled();
|
||||
expect(uiStore.pushBannerToStack).toHaveBeenCalledWith('EMAIL_CONFIRMATION');
|
||||
});
|
||||
|
||||
it('should not push EMAIL_CONFIRMATION banner if user cloud account does not exist', async () => {
|
||||
settingsStore.settings.deployment.type = 'cloud';
|
||||
usersStore.usersById = { '123': { id: '123', email: '' } as IUser };
|
||||
usersStore.currentUserId = '123';
|
||||
|
||||
cloudPlanStore.userIsTrialing = false;
|
||||
cloudPlanStore.currentUserCloudInfo = null;
|
||||
|
||||
const cloudStoreSpy = vi.spyOn(cloudPlanStore, 'initialize').mockResolvedValueOnce();
|
||||
|
||||
await initializeAuthenticatedFeatures(false);
|
||||
|
||||
expect(cloudStoreSpy).toHaveBeenCalled();
|
||||
expect(uiStore.pushBannerToStack).not.toHaveBeenCalledWith('EMAIL_CONFIRMATION');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -157,7 +157,7 @@ export async function initializeAuthenticatedFeatures(
|
||||
} else {
|
||||
uiStore.pushBannerToStack('TRIAL');
|
||||
}
|
||||
} else if (!cloudPlanStore.currentUserCloudInfo?.confirmed) {
|
||||
} else if (cloudPlanStore.currentUserCloudInfo?.confirmed === false) {
|
||||
uiStore.pushBannerToStack('EMAIL_CONFIRMATION');
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user