-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(🐪): Rename some folders to CamelCase (#1019)
* Rename some files to CamelCase * Fix path * Fix merge issues * fixing imports * one more time --------- Co-authored-by: Thomas <[email protected]>
- Loading branch information
1 parent
aef7de7
commit e3deb2c
Showing
81 changed files
with
399 additions
and
402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
import { describe, it, expect, vi } from "vitest"; | ||
import { Context } from "aws-lambda"; | ||
import { SESClient } from "@aws-sdk/client-ses"; | ||
import { handler } from "./processEmails"; | ||
import { KafkaRecord, KafkaEvent } from "shared-types"; | ||
import { Authority } from "shared-types"; | ||
|
||
const nms = "new-medicaid-submission"; | ||
const ncs = "new-chip-submission"; | ||
const tempExtension = "temp-extension"; | ||
const withdrawPackage = "withdraw-package"; | ||
const contractingInitial = "contracting-initial"; | ||
const capitatedInitial = "capitated-initial"; | ||
|
||
describe("process emails Handler", () => { | ||
it.each([ | ||
[`should send an email for ${nms} with ${Authority.MED_SPA}`, Authority.MED_SPA, nms], | ||
[`should send an email for ${nms} with ${Authority.CHIP_SPA}`, Authority.CHIP_SPA, nms], | ||
[`should send an email for ${nms} with ${Authority["1915b"]}`, Authority["1915b"], nms], | ||
[`should send an email for ${nms} with ${Authority["1915c"]}`, Authority["1915c"], nms], | ||
[`should send an email for ${ncs} with ${Authority.MED_SPA}`, Authority.MED_SPA, ncs], | ||
[`should send an email for ${ncs} with ${Authority.CHIP_SPA}`, Authority.CHIP_SPA, ncs], | ||
[`should send an email for ${ncs} with ${Authority["1915b"]}`, Authority["1915b"], ncs], | ||
[`should send an email for ${ncs} with ${Authority["1915c"]}`, Authority["1915c"], ncs], | ||
[ | ||
`should send an email for ${tempExtension} with ${Authority.MED_SPA}`, | ||
Authority.MED_SPA, | ||
tempExtension, | ||
], | ||
[ | ||
`should send an email for ${tempExtension} with ${Authority.CHIP_SPA}`, | ||
Authority.CHIP_SPA, | ||
tempExtension, | ||
], | ||
[ | ||
`should send an email for ${tempExtension} with ${Authority["1915b"]}`, | ||
Authority["1915b"], | ||
tempExtension, | ||
], | ||
[ | ||
`should send an email for ${tempExtension} with ${Authority["1915c"]}`, | ||
Authority["1915c"], | ||
tempExtension, | ||
], | ||
[ | ||
`should send an email for ${withdrawPackage} with ${Authority.MED_SPA}`, | ||
Authority.MED_SPA, | ||
withdrawPackage, | ||
], | ||
[ | ||
`should send an email for ${withdrawPackage} with ${Authority.CHIP_SPA}`, | ||
Authority.CHIP_SPA, | ||
withdrawPackage, | ||
], | ||
[ | ||
`should send an email for ${withdrawPackage} for ${ncs} with ${Authority["1915b"]}`, | ||
Authority["1915b"], | ||
withdrawPackage, | ||
], | ||
[ | ||
`should send an email for ${withdrawPackage} with ${Authority["1915c"]}`, | ||
Authority["1915c"], | ||
withdrawPackage, | ||
], | ||
[ | ||
`should send an email for ${contractingInitial} with ${Authority.MED_SPA}`, | ||
Authority.MED_SPA, | ||
contractingInitial, | ||
], | ||
[ | ||
`should send an email for ${contractingInitial} with ${Authority.CHIP_SPA}`, | ||
Authority.CHIP_SPA, | ||
contractingInitial, | ||
], | ||
[ | ||
`should send an email for ${contractingInitial} with ${Authority["1915b"]}`, | ||
Authority["1915b"], | ||
contractingInitial, | ||
], | ||
[ | ||
`should send an email for ${contractingInitial} with ${Authority["1915c"]}`, | ||
Authority["1915c"], | ||
contractingInitial, | ||
], | ||
[ | ||
`should send an email for ${capitatedInitial} with ${Authority.MED_SPA}`, | ||
Authority.MED_SPA, | ||
capitatedInitial, | ||
], | ||
[ | ||
`should send an email for ${capitatedInitial} with ${Authority.CHIP_SPA}`, | ||
Authority.CHIP_SPA, | ||
capitatedInitial, | ||
], | ||
[ | ||
`should send an email for ${capitatedInitial} with ${Authority["1915b"]}`, | ||
Authority["1915b"], | ||
capitatedInitial, | ||
], | ||
[ | ||
`should send an email for ${capitatedInitial} with ${Authority["1915c"]}`, | ||
Authority["1915c"], | ||
capitatedInitial, | ||
], | ||
])("%s", async (_, auth, eventType) => { | ||
const callback = vi.fn(); | ||
const secSPY = vi.spyOn(SESClient.prototype, "send"); | ||
const mockEvent: KafkaEvent = { | ||
records: { | ||
"mock-topic": [ | ||
{ | ||
key: Buffer.from("VA").toString("base64"), | ||
value: Buffer.from( | ||
JSON.stringify({ | ||
origin: "mako", | ||
event: eventType, | ||
authority: auth, | ||
}), | ||
).toString("base64"), | ||
headers: {}, | ||
timestamp: 1732645041557, | ||
offset: "0", | ||
partition: 0, | ||
topic: "mock-topic", | ||
} as unknown as KafkaRecord, | ||
], | ||
}, | ||
eventSource: "", | ||
bootstrapServers: "", | ||
}; | ||
await handler(mockEvent, {} as Context, callback); | ||
expect(secSPY).toHaveBeenCalledTimes(2); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export * from "./new-submission"; | ||
export * from "./newSubmission"; | ||
export * from "./tempExtension"; | ||
export * from "./respondToRai"; | ||
export * from "./withdrawRai"; | ||
export * from "./withdrawPackage"; | ||
export * from "./withdrawConfirmation"; | ||
export * from "./email-components"; | ||
export * from "./respondToRai"; | ||
export * from "./upload-subsequent-documents"; | ||
export * from "./uploadSubsequentDocuments"; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
20 changes: 12 additions & 8 deletions
20
lib/libs/email/content/withdrawRai/emailTemplates/AppKCMS.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
lib/libs/email/content/withdrawRai/emailTemplates/Waiver1915bCMS.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 17 additions & 16 deletions
33
lib/libs/email/content/withdrawRai/emailTemplates/Waiver1915bState.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export { Waiver1915bCMSEmail } from "./Waiver1915bCMS"; | ||
export { Waiver1915bStateEmail } from "./Waiver1915bState"; | ||
export { AppKCMSEmail } from "./AppKCMS"; | ||
export { AppKStateEmail } from "./AppKState"; | ||
export { Waiver1915bCMSEmail } from "./Waiver1915bCMS"; | ||
export { Waiver1915bStateEmail } from "./Waiver1915bState"; |
Oops, something went wrong.