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

This commit is contained in:
Kasra Bigdeli
2025-10-13 22:55:17 -07:00
parent 6fe86982bc
commit 5d03bb3ea2

View File

@@ -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',