website refactor

This commit is contained in:
2026-01-17 22:55:03 +01:00
parent 64d9e7fd16
commit 69d4cce7f1
64 changed files with 1146 additions and 1014 deletions

View File

@@ -30,6 +30,10 @@ describe('AnalyticsService', () => {
const result = await service.recordPageView(input);
expect(mockApiClient.recordPageView).toHaveBeenCalledWith({
entityType: 'page',
entityId: '/dashboard',
visitorType: 'user',
sessionId: 'temp-session',
path: '/dashboard',
userId: 'user-123',
});
@@ -48,6 +52,10 @@ describe('AnalyticsService', () => {
const result = await service.recordPageView(input);
expect(mockApiClient.recordPageView).toHaveBeenCalledWith({
entityType: 'page',
entityId: '/home',
visitorType: 'guest',
sessionId: 'temp-session',
path: '/home',
});
expect(result).toBeInstanceOf(RecordPageViewOutputViewModel);
@@ -69,6 +77,11 @@ describe('AnalyticsService', () => {
const result = await service.recordEngagement(input);
expect(mockApiClient.recordEngagement).toHaveBeenCalledWith({
action: 'button_click',
entityType: 'ui_element',
entityId: 'unknown',
actorType: 'user',
sessionId: 'temp-session',
eventType: 'button_click',
userId: 'user-123',
metadata: { buttonId: 'submit', page: '/form' },
@@ -89,6 +102,11 @@ describe('AnalyticsService', () => {
const result = await service.recordEngagement(input);
expect(mockApiClient.recordEngagement).toHaveBeenCalledWith({
action: 'page_load',
entityType: 'ui_element',
entityId: 'unknown',
actorType: 'guest',
sessionId: 'temp-session',
eventType: 'page_load',
});
expect(result).toBeInstanceOf(RecordEngagementOutputViewModel);