Skip to content

Commit 4b2a60a

Browse files
committed
CCM-13303: Address comments + update Generate Report schema
1 parent 67c9f40 commit 4b2a60a

2 files changed

Lines changed: 8 additions & 15 deletions

File tree

lambdas/report-scheduler/src/__tests__/apis/scheduled-event-handler.test.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,6 @@ describe('scheduled-event-handler', () => {
121121
expect(events).toHaveLength(0);
122122
});
123123

124-
it('should handle sender management errors', async () => {
125-
const error = new Error('Failed to list senders');
126-
mockSenderManagement.listSenders.mockRejectedValue(error);
127-
128-
const handler = createHandler({
129-
senderManagement: mockSenderManagement,
130-
eventPublisher: mockEventPublisher,
131-
});
132-
133-
await expect(handler()).rejects.toThrow('Failed to list senders');
134-
expect(mockEventPublisher.sendEvents).not.toHaveBeenCalled();
135-
});
136-
137124
it('should handle event publisher errors', async () => {
138125
const mockSenders = [{ senderId: 'sender-1' }] as unknown as Sender[];
139126
const error = new Error('Failed to publish events');

tests/playwright/digital-letters-component-tests/report-scheduler.component.spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import {
33
EVENT_BUS_LOG_GROUP_NAME,
44
REPORT_SCHEDULER_LAMBDA_NAME,
55
} from 'constants/backend-constants';
6-
import { SENDER_ID_SKIPS_NOTIFY, SENDER_ID_THAT_TRIGGERS_ERROR_IN_NOTIFY_SANDBOX, SENDER_ID_VALID_FOR_NOTIFY_SANDBOX } from 'constants/tests-constants';
6+
import {
7+
SENDER_ID_SKIPS_NOTIFY,
8+
SENDER_ID_THAT_TRIGGERS_ERROR_IN_NOTIFY_SANDBOX,
9+
SENDER_ID_VALID_FOR_NOTIFY_SANDBOX,
10+
} from 'constants/tests-constants';
711
import { getLogsFromCloudwatch } from 'helpers/cloudwatch-helpers';
812
import expectToPassEventually from 'helpers/expectations';
913
import { invokeLambda } from 'helpers/lambda-helpers';
@@ -50,7 +54,9 @@ test.describe('Digital Letters - Report Scheduler', () => {
5054

5155
const senderIds = parsedEvents.map((event) => event.data.senderId);
5256
expect(senderIds).toContain(SENDER_ID_VALID_FOR_NOTIFY_SANDBOX);
53-
expect(senderIds).toContain(SENDER_ID_THAT_TRIGGERS_ERROR_IN_NOTIFY_SANDBOX);
57+
expect(senderIds).toContain(
58+
SENDER_ID_THAT_TRIGGERS_ERROR_IN_NOTIFY_SANDBOX,
59+
);
5460
expect(senderIds).toContain(SENDER_ID_SKIPS_NOTIFY);
5561
}, 120);
5662
});

0 commit comments

Comments
 (0)