mirror of
https://github.com/caprover/caprover
synced 2025-10-30 01:57:03 +00:00
Fixed tests
Some checks failed
Run build / build (push) Has been cancelled
Run formatter / check-code-formatting (push) Has been cancelled
Run lint / run-lint (push) Has been cancelled
Build and push the edge image / run-pre-checks (push) Has been cancelled
Build and push the edge image / build-publish-docker-hub (push) Has been cancelled
Some checks failed
Run build / build (push) Has been cancelled
Run formatter / check-code-formatting (push) Has been cancelled
Run lint / run-lint (push) Has been cancelled
Build and push the edge image / run-pre-checks (push) Has been cancelled
Build and push the edge image / build-publish-docker-hub (push) Has been cancelled
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
* • Handles edge cases: null services, non-object entries, missing properties
|
* • Handles edge cases: null services, non-object entries, missing properties
|
||||||
*
|
*
|
||||||
* EVENT LOGGING:
|
* EVENT LOGGING:
|
||||||
* • Creates a CapRoverEventType.OneClickAppDetailsFetched event
|
* • Creates a CapRoverEventType.OneClickAppDeployStarted event
|
||||||
* • Event metadata includes: templateName (string) and unusedFields (string[])
|
* • Event metadata includes: templateName (string) and unusedFields (string[])
|
||||||
* • Uses CapRoverEventFactory to create events with proper structure
|
* • Uses CapRoverEventFactory to create events with proper structure
|
||||||
* • Calls eventLogger.trackEvent() exactly once per deployment
|
* • Calls eventLogger.trackEvent() exactly once per deployment
|
||||||
@@ -48,7 +48,7 @@ jest.mock('../src/user/events/ICapRoverEvent', () => ({
|
|||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
CapRoverEventType: {
|
CapRoverEventType: {
|
||||||
OneClickAppDetailsFetched: 'OneClickAppDetailsFetched',
|
OneClickAppDeployStarted: 'OneClickAppDeployStarted',
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
@@ -328,7 +328,7 @@ describe('reportAnalyticsOnAppDeploy', () => {
|
|||||||
reportAnalyticsOnAppDeploy(templateName, template, mockEventLogger)
|
reportAnalyticsOnAppDeploy(templateName, template, mockEventLogger)
|
||||||
|
|
||||||
expect(trackedEvents[0].eventType).toBe(
|
expect(trackedEvents[0].eventType).toBe(
|
||||||
CapRoverEventType.OneClickAppDetailsFetched
|
CapRoverEventType.OneClickAppDeployStarted
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -437,7 +437,7 @@ describe('reportAnalyticsOnAppDeploy', () => {
|
|||||||
reportAnalyticsOnAppDeploy(templateName, template, mockEventLogger)
|
reportAnalyticsOnAppDeploy(templateName, template, mockEventLogger)
|
||||||
|
|
||||||
expect(CapRoverEventFactory.create).toHaveBeenCalledWith(
|
expect(CapRoverEventFactory.create).toHaveBeenCalledWith(
|
||||||
CapRoverEventType.OneClickAppDetailsFetched,
|
CapRoverEventType.OneClickAppDeployStarted,
|
||||||
{
|
{
|
||||||
unusedFields: [],
|
unusedFields: [],
|
||||||
templateName: 'TEMPLATE_ONE_CLICK',
|
templateName: 'TEMPLATE_ONE_CLICK',
|
||||||
|
|||||||
Reference in New Issue
Block a user