mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
chore(editor): Making health call only if custom hosted templates (#16686)
This commit is contained in:
@@ -137,7 +137,6 @@ describe('Init', () => {
|
||||
|
||||
it('should not init authenticated features if user is not logged in', async () => {
|
||||
const cloudStoreSpy = vi.spyOn(cloudPlanStore, 'initialize');
|
||||
const templatesTestSpy = vi.spyOn(settingsStore, 'testTemplatesEndpoint');
|
||||
const sourceControlSpy = vi.spyOn(sourceControlStore, 'getPreferences');
|
||||
const nodeTranslationSpy = vi.spyOn(nodeTypesStore, 'getNodeTranslationHeaders');
|
||||
vi.mocked(useUsersStore).mockReturnValue({ currentUser: null } as ReturnType<
|
||||
@@ -146,14 +145,12 @@ describe('Init', () => {
|
||||
|
||||
await initializeAuthenticatedFeatures();
|
||||
expect(cloudStoreSpy).not.toHaveBeenCalled();
|
||||
expect(templatesTestSpy).not.toHaveBeenCalled();
|
||||
expect(sourceControlSpy).not.toHaveBeenCalled();
|
||||
expect(nodeTranslationSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should init authenticated features only once if user is logged in', async () => {
|
||||
const cloudStoreSpy = vi.spyOn(cloudPlanStore, 'initialize');
|
||||
const templatesTestSpy = vi.spyOn(settingsStore, 'testTemplatesEndpoint');
|
||||
const sourceControlSpy = vi.spyOn(sourceControlStore, 'getPreferences');
|
||||
const nodeTranslationSpy = vi.spyOn(nodeTypesStore, 'getNodeTranslationHeaders');
|
||||
vi.mocked(useUsersStore).mockReturnValue({ currentUser: { id: '123' } } as ReturnType<
|
||||
@@ -163,7 +160,6 @@ describe('Init', () => {
|
||||
await initializeAuthenticatedFeatures();
|
||||
|
||||
expect(cloudStoreSpy).toHaveBeenCalled();
|
||||
expect(templatesTestSpy).toHaveBeenCalled();
|
||||
expect(sourceControlSpy).toHaveBeenCalled();
|
||||
expect(nodeTranslationSpy).toHaveBeenCalled();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user