Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(email): proces email test #979

Merged
merged 7 commits into from
Jan 8, 2025
Merged

test(email): proces email test #979

merged 7 commits into from
Jan 8, 2025

Conversation

thwalker6
Copy link
Collaborator

@thwalker6 thwalker6 commented Jan 7, 2025

🎫 Linked Ticket

[Ticket to close](https://jiraent.cms.gov/browse/OY2-32115)

💬 Description / Notes

Adding unit test for processing emails. Nothing should change functionality wise

🛠 Changes

📸 Screenshots / Demo

@thwalker6 thwalker6 temporarily deployed to process-email-test January 7, 2025 18:03 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test January 7, 2025 18:03 — with GitHub Actions Inactive
Copy link
Contributor

github-actions bot commented Jan 7, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 77.36% 6677 / 8630
🔵 Statements 76.47% 6994 / 9145
🔵 Functions 70.34% 1993 / 2833
🔵 Branches 45.31% 1249 / 2756
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
lib/vitest.setup.ts 100% 100% 100% 100%
lib/lambda/processEmails.test.ts 97.14% 100% 100% 97.05% 67
lib/lambda/processEmails.ts 67.34% 68.75% 66.66% 67.74% 98, 104, 153-156, 165-239, 256-300
lib/libs/email/getAllStateUsers.ts 42.1% 0% 20% 44.44% 34-53
Generated in workflow #1397 for commit 699c91b by the Vitest Coverage Report Action

@thwalker6 thwalker6 temporarily deployed to process-email-test January 7, 2025 18:15 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test January 7, 2025 18:15 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test-kibana January 7, 2025 18:15 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test-app January 7, 2025 18:15 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test January 7, 2025 18:15 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test January 7, 2025 18:33 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test January 7, 2025 18:33 — with GitHub Actions Inactive
@asharonbaltazar asharonbaltazar changed the title feat(test)proces email test test(email): proces email test Jan 7, 2025
@thwalker6 thwalker6 temporarily deployed to process-email-test January 7, 2025 18:41 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test January 7, 2025 18:41 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test January 7, 2025 18:43 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test-kibana January 7, 2025 18:43 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test-app January 7, 2025 18:43 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test January 7, 2025 18:43 — with GitHub Actions Inactive
@thwalker6 thwalker6 temporarily deployed to process-email-test January 7, 2025 18:43 — with GitHub Actions Inactive
@@ -12,7 +12,9 @@ export type StateUser = {
formattedEmailAddress: string;
};

const cognitoClient = new CognitoIdentityProviderClient();
const cognitoClient = new CognitoIdentityProviderClient({
region: "us-east-1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this to region: process.env.region

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@@ -80,6 +80,9 @@ beforeEach(() => {
process.env.idmClientIssuer = USER_POOL_CLIENT_DOMAIN;
process.env.osDomain = OPENSEARCH_DOMAIN;
process.env.indexNamespace = OPENSEARCH_INDEX_NAMESPACE;
process.env.emailAddressLookupSecretName = "mock-email-secret";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add // pragma: allowlist secret to the end of this line

Copy link
Collaborator Author

@thwalker6 thwalker6 Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@thwalker6 thwalker6 merged commit 11ac25a into main Jan 8, 2025
14 of 15 checks passed
@thwalker6 thwalker6 deleted the process-email-test branch January 8, 2025 18:23
RanyeM pushed a commit that referenced this pull request Jan 9, 2025
* feat(test)proces email test

* Removed console.log

* linter correction

* removed a ine

* remove brackets

* add region

* Address change reqeust
RanyeM added a commit that referenced this pull request Jan 9, 2025
* feature: adding new FAQ to FAQ page

* feature: question should open corresponding section

* fix: corrected code back to faq page direct link

* fix: removed id

* fix: #5 and #6 to expanded section

* fix: test coverage

* revert package json to what is on main

* fix(email): Fixes an issue with Outlook not correctly displaying the OneMAC logo and header (#972)

* fixed index test

* fix(test): Create mock for calling lambdas (#973)

* Added msw endpoints for Lambda, Step Functions, Secure Token Services, and other related services
* Added/updated test data to support new endpoints
* Updated tests to use the new endpoints instead of mocking individually

* fix(email): switch email logo back to using url

* fix(schema): remove logic for determining next business day for `submissionDate` (#980)

* fix: remove logic for determining next business day for `submissionDate`

* fix: update `submissionDate` value

* feat(ui): Remove status date from package details pages for all users (#965)

* fix(initial verbiage fix): Email verbiage fixes from qa (#974)

* correct verbage for med and chip spa

* fix issues with verbiage need confirmation

* remove comment

* add date and attachment logic

* update snapshots

* Update ChipSpaState.tsx

* test(email): proces email test (#979)

* feat(test)proces email test

* Removed console.log

* linter correction

* removed a ine

* remove brackets

* add region

* Address change reqeust

* feat(test)-submit lambda (#987)

* feat(test)-submit lambda

* Update withdrawpackage to withdrawrai

* linter corrections

* Fix some test

* Test for malformed objects

* Remove import vs code added in

* remove console.log

* Updatign to use get requestcontext

* feat(test) fix email test (#991)

* feat(test) fix email test
* Update processEmails.test.ts

* fix(os) helpers for getting domain and index for opensearch (#992)

* created helpers for getting domain and index for opensearch
* fixed import

* feat(test) updates to s3 calls on backend (#985)

* updates to s3 calls on backend

* feat(test)-unauthorized submission test (#996)

* feat(amend): Add waiver amendment emails (#993)

* Feat(playwright performance): Pw perf tests (#959)

* feat: initial perf tests for routes

fix: refactor

* Fix: updated per review comments

---------

Co-authored-by: asharonbaltazar <58940073+asharonbaltazar@users.noreply.github.com>

---------

Co-authored-by: 13bfrancis <40218571+13bfrancis@users.noreply.github.com>
Co-authored-by: Ty Bolt <tybolt@gmail.com>
Co-authored-by: Tiffany Forkner <thetif@gmail.com>
Co-authored-by: asharonbaltazar <58940073+asharonbaltazar@users.noreply.github.com>
Co-authored-by: James Dinh <jdinh8124@gmail.com>
Co-authored-by: Thomas Walker <thomas.e.walker88@gmail.com>
Co-authored-by: Benjamin Paige <benjamin.paige@gmail.com>
Co-authored-by: Jon Schaffer <jschaffer@gswell.com>
Copy link
Contributor

github-actions bot commented Jan 9, 2025

🎉 This PR is included in version 1.5.0-val.103 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants