Skip to content

Commit 972600f

Browse files
committed
OLH-4100: updated the config names
1 parent 3bdc31a commit 972600f

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

solutions/commons/utils/notifications/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe("sendNotification", () => {
2626
it("should send message to SQS queue", async () => {
2727
const message = {
2828
emailAddress: "test@example.com",
29-
notificationType: NotificationType.CREATE_PASSKEY_WITHOUT_PASSKEY_NAME,
29+
notificationType: NotificationType.CREATE_PASSKEY_WITHOUT_DISPLAY_NAME,
3030
} as const;
3131

3232
await sendNotification(message);
@@ -42,7 +42,7 @@ describe("sendNotification", () => {
4242

4343
const message = {
4444
emailAddress: "test@example.com",
45-
notificationType: NotificationType.CREATE_PASSKEY_WITHOUT_PASSKEY_NAME,
45+
notificationType: NotificationType.CREATE_PASSKEY_WITHOUT_DISPLAY_NAME,
4646
} as const;
4747

4848
await expect(sendNotification(message)).rejects.toThrow();

solutions/commons/utils/notifications/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { getSqsClient } from "../awsClient/sqsClient/index.js";
33
import assert from "node:assert";
44

55
export enum NotificationType {
6-
CREATE_PASSKEY_WITH_PASSKEY_NAME = "CREATE_PASSKEY_WITH_PASSKEY_NAME",
7-
CREATE_PASSKEY_WITHOUT_PASSKEY_NAME = "CREATE_PASSKEY_WITHOUT_PASSKEY_NAME",
6+
CREATE_PASSKEY_WITH_DISPLAY_NAME = "CREATE_PASSKEY_WITH_DISPLAY_NAME",
7+
CREATE_PASSKEY_WITHOUT_DISPLAY_NAME = "CREATE_PASSKEY_WITHOUT_DISPLAY_NAME",
88
}
99

1010
export const notifyTemplateIDsSchema = v.pipe(
@@ -17,7 +17,7 @@ export const messageSchema = v.variant("notificationType", [
1717
v.pipe(
1818
v.object({
1919
notificationType: v.literal(
20-
NotificationType.CREATE_PASSKEY_WITH_PASSKEY_NAME,
20+
NotificationType.CREATE_PASSKEY_WITH_DISPLAY_NAME,
2121
),
2222
emailAddress: v.pipe(v.string(), v.email()),
2323
passkeyName: v.string(),
@@ -36,7 +36,7 @@ export const messageSchema = v.variant("notificationType", [
3636
v.pipe(
3737
v.object({
3838
notificationType: v.literal(
39-
NotificationType.CREATE_PASSKEY_WITHOUT_PASSKEY_NAME,
39+
NotificationType.CREATE_PASSKEY_WITHOUT_DISPLAY_NAME,
4040
),
4141
emailAddress: v.pipe(v.string(), v.email()),
4242
}),

solutions/frontend/src/journeys/passkey-create/handlers/create.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ describe("passkey-create handlers", () => {
631631
"aaguid-123",
632632
);
633633
expect(mockSendNotification).toHaveBeenCalledWith({
634-
notificationType: "CREATE_PASSKEY_WITH_PASSKEY_NAME",
634+
notificationType: "CREATE_PASSKEY_WITH_DISPLAY_NAME",
635635
emailAddress: "test@example.com",
636636
passkeyName: "iCloud Keychain",
637637
});
@@ -651,7 +651,7 @@ describe("passkey-create handlers", () => {
651651
"aaguid-123",
652652
);
653653
expect(mockSendNotification).toHaveBeenCalledWith({
654-
notificationType: "CREATE_PASSKEY_WITHOUT_PASSKEY_NAME",
654+
notificationType: "CREATE_PASSKEY_WITHOUT_DISPLAY_NAME",
655655
emailAddress: "test@example.com",
656656
});
657657
});

solutions/frontend/src/journeys/passkey-create/handlers/create.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,13 +335,13 @@ export async function postHandler(
335335
await sendNotification(
336336
passkeyConvenienceMetadata
337337
? {
338-
notificationType: NotificationType.CREATE_PASSKEY_WITH_PASSKEY_NAME,
338+
notificationType: NotificationType.CREATE_PASSKEY_WITH_DISPLAY_NAME,
339339
emailAddress: request.session.claims.email,
340340
passkeyName: passkeyConvenienceMetadata.name,
341341
}
342342
: {
343343
notificationType:
344-
NotificationType.CREATE_PASSKEY_WITHOUT_PASSKEY_NAME,
344+
NotificationType.CREATE_PASSKEY_WITHOUT_DISPLAY_NAME,
345345
emailAddress: request.session.claims.email,
346346
},
347347
);

solutions/stubs/src/notify/handlers/sendEmail.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
44
vi.mock(import("../../../../commons/utils/logger/index.js"));
55

66
const mockTemplateIds = {
7-
CREATE_PASSKEY_WITH_PASSKEY_NAME: "template-id-1",
8-
CREATE_PASSKEY_WITHOUT_PASSKEY_NAME: "template-id-2",
7+
CREATE_PASSKEY_WITH_DISPLAY_NAME: "template-id-1",
8+
CREATE_PASSKEY_WITHOUT_DISPLAY_NAME: "template-id-2",
99
};
1010

1111
describe("sendEmailPostHandler", () => {
@@ -47,7 +47,7 @@ describe("sendEmailPostHandler", () => {
4747
expect(logger.info).toHaveBeenCalledWith("NotifySendEmailCalled", {
4848
reference: "test-reference",
4949
templateId: "template-id-1",
50-
template: "CREATE_PASSKEY_WITH_PASSKEY_NAME",
50+
template: "CREATE_PASSKEY_WITH_DISPLAY_NAME",
5151
});
5252
expect(mockReply.send).toHaveBeenCalledWith({
5353
data: {
@@ -68,7 +68,7 @@ describe("sendEmailPostHandler", () => {
6868
expect(logger.info).toHaveBeenCalledWith("NotifySendEmailCalled", {
6969
reference: undefined,
7070
templateId: "template-id-2",
71-
template: "CREATE_PASSKEY_WITHOUT_PASSKEY_NAME",
71+
template: "CREATE_PASSKEY_WITHOUT_DISPLAY_NAME",
7272
});
7373
expect(mockReply.send).toHaveBeenCalledWith({
7474
data: {

0 commit comments

Comments
 (0)