- These documents will be added to the package and reviewed by CMS.”
+ These documents will be added to the package and reviewed by CMS.
),
};
From 6a3998ba6fd365b9ab384cddf48c435ddc19ea8a Mon Sep 17 00:00:00 2001
From: Alex Youssefinia
Date: Mon, 30 Sep 2024 10:47:35 -0500
Subject: [PATCH 07/19] modify cypres test files to reflect text change
---
...ubmission_1915b_Amendment_Waiver.spec.feature | 16 ++++++++--------
...uent_Submission_1915c_Appendix_K.spec.feature | 16 ++++++++--------
.../Subsequent_Submission_CHIP_Spa.spec.feature | 16 ++++++++--------
...equent_Submission_Initial_Waiver.spec.feature | 16 ++++++++--------
...bsequent_Submission_Medicaid_Spa.spec.feature | 16 ++++++++--------
...equent_Submission_Renewal_Waiver.spec.feature | 16 ++++++++--------
6 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/tests/cypress/cypress/e2e/Subsequent_Submission_1915b_Amendment_Waiver.spec.feature b/tests/cypress/cypress/e2e/Subsequent_Submission_1915b_Amendment_Waiver.spec.feature
index f3d434f99..04617c2ef 100644
--- a/tests/cypress/cypress/e2e/Subsequent_Submission_1915b_Amendment_Waiver.spec.feature
+++ b/tests/cypress/cypress/e2e/Subsequent_Submission_1915b_Amendment_Waiver.spec.feature
@@ -31,8 +31,8 @@ Feature: Subsequent Submission 1915b Waiver Amendment
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click modal cancel button
Then click form cancel button
@@ -55,8 +55,8 @@ Feature: Subsequent Submission 1915b Waiver Amendment
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click modal cancel button
Then click form cancel button
@@ -71,8 +71,8 @@ Feature: Subsequent Submission 1915b Waiver Amendment
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click the yes, submit modal button
Then i am on Dashboard Page
@@ -87,8 +87,8 @@ Feature: Subsequent Submission 1915b Waiver Amendment
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click the yes, submit modal button
Then verify the package details page is visible
diff --git a/tests/cypress/cypress/e2e/Subsequent_Submission_1915c_Appendix_K.spec.feature b/tests/cypress/cypress/e2e/Subsequent_Submission_1915c_Appendix_K.spec.feature
index d6d2a0c99..abaf6c314 100644
--- a/tests/cypress/cypress/e2e/Subsequent_Submission_1915c_Appendix_K.spec.feature
+++ b/tests/cypress/cypress/e2e/Subsequent_Submission_1915c_Appendix_K.spec.feature
@@ -31,8 +31,8 @@ Feature: Subsequent Submission 1915c App K Waiver
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click modal cancel button
Then click form cancel button
@@ -55,8 +55,8 @@ Feature: Subsequent Submission 1915c App K Waiver
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click modal cancel button
Then click form cancel button
@@ -72,8 +72,8 @@ Feature: Subsequent Submission 1915c App K Waiver
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then click the yes, submit modal button
Then i am on Dashboard Page
Then verify the success message is "Documents submitted"
@@ -88,8 +88,8 @@ Feature: Subsequent Submission 1915c App K Waiver
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click the yes, submit modal button
Then verify the package details page is visible
diff --git a/tests/cypress/cypress/e2e/Subsequent_Submission_CHIP_Spa.spec.feature b/tests/cypress/cypress/e2e/Subsequent_Submission_CHIP_Spa.spec.feature
index 02dadbfbc..45f1d8da3 100644
--- a/tests/cypress/cypress/e2e/Subsequent_Submission_CHIP_Spa.spec.feature
+++ b/tests/cypress/cypress/e2e/Subsequent_Submission_CHIP_Spa.spec.feature
@@ -30,8 +30,8 @@ Feature: CHIP SPA State Details View - Card View with Actions
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click modal cancel button
Then click form cancel button
@@ -54,8 +54,8 @@ Feature: CHIP SPA State Details View - Card View with Actions
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click modal cancel button
Then click form cancel button
@@ -71,8 +71,8 @@ Feature: CHIP SPA State Details View - Card View with Actions
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click the yes, submit modal button
Then i am on Dashboard Page
@@ -88,8 +88,8 @@ Feature: CHIP SPA State Details View - Card View with Actions
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click the yes, submit modal button
Then verify the package details page is visible
diff --git a/tests/cypress/cypress/e2e/Subsequent_Submission_Initial_Waiver.spec.feature b/tests/cypress/cypress/e2e/Subsequent_Submission_Initial_Waiver.spec.feature
index 52024390f..7404568ce 100644
--- a/tests/cypress/cypress/e2e/Subsequent_Submission_Initial_Waiver.spec.feature
+++ b/tests/cypress/cypress/e2e/Subsequent_Submission_Initial_Waiver.spec.feature
@@ -31,8 +31,8 @@ Feature: Subsequent Submission 1915b Initial Waiver
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click modal cancel button
Then click form cancel button
@@ -54,8 +54,8 @@ Feature: Subsequent Submission 1915b Initial Waiver
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click modal cancel button
Then click form cancel button
@@ -71,8 +71,8 @@ Feature: Subsequent Submission 1915b Initial Waiver
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click the yes, submit modal button
Then i am on Dashboard Page
@@ -89,8 +89,8 @@ Feature: Subsequent Submission 1915b Initial Waiver
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click the yes, submit modal button
Then verify the package details page is visible
diff --git a/tests/cypress/cypress/e2e/Subsequent_Submission_Medicaid_Spa.spec.feature b/tests/cypress/cypress/e2e/Subsequent_Submission_Medicaid_Spa.spec.feature
index 157bd87a1..48f2d65a3 100644
--- a/tests/cypress/cypress/e2e/Subsequent_Submission_Medicaid_Spa.spec.feature
+++ b/tests/cypress/cypress/e2e/Subsequent_Submission_Medicaid_Spa.spec.feature
@@ -31,8 +31,8 @@ Feature: Medicaid SPA State Details View - Card View with Actions
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click modal cancel button
Then click form cancel button
@@ -56,8 +56,8 @@ Feature: Medicaid SPA State Details View - Card View with Actions
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click modal cancel button
Then click form cancel button
@@ -73,8 +73,8 @@ Feature: Medicaid SPA State Details View - Card View with Actions
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click the yes, submit modal button
Then i am on Dashboard Page
@@ -91,8 +91,8 @@ Feature: Medicaid SPA State Details View - Card View with Actions
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click the yes, submit modal button
Then verify the package details page is visible
diff --git a/tests/cypress/cypress/e2e/Subsequent_Submission_Renewal_Waiver.spec.feature b/tests/cypress/cypress/e2e/Subsequent_Submission_Renewal_Waiver.spec.feature
index 03203180e..d8fa82baa 100644
--- a/tests/cypress/cypress/e2e/Subsequent_Submission_Renewal_Waiver.spec.feature
+++ b/tests/cypress/cypress/e2e/Subsequent_Submission_Renewal_Waiver.spec.feature
@@ -31,8 +31,8 @@ Feature: Subsequent Submission 1915b Renewal Waiver
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click modal cancel button
Then click form cancel button
@@ -55,8 +55,8 @@ Feature: Subsequent Submission 1915b Renewal Waiver
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click modal cancel button
Then click form cancel button
@@ -72,8 +72,8 @@ Feature: Subsequent Submission 1915b Renewal Waiver
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click the yes, submit modal button
Then i am on Dashboard Page
@@ -89,8 +89,8 @@ Feature: Subsequent Submission 1915b Renewal Waiver
Then into "Reason for subsequent submission" type "This is an automated subsequent submission test."
Then Click the Submit Button without waiting
Then verify the modal pop-up is visible
- Then verify the dialog title contains "OneMAC only for document submission"
- Then verify the detailed text in the modal contains "States and CMS reviewers will communicate about the submission through email."
+ Then verify the dialog title contains "Submit additional documents?"
+ Then verify the detailed text in the modal contains "These documents will be added to the package and reviewed by CMS."
Then verify the yes, submit modal button is visible and clickable
Then click the yes, submit modal button
Then verify the package details page is visible
From d532c72e402fef821bc42c6fae97e630dd8df2be Mon Sep 17 00:00:00 2001
From: Alex Youssefinia
Date: Tue, 1 Oct 2024 09:53:58 -0500
Subject: [PATCH 08/19] added and more as per story request
---
services/ui-src/src/libs/formLib.tsx | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/services/ui-src/src/libs/formLib.tsx b/services/ui-src/src/libs/formLib.tsx
index ad087b118..28d7dae69 100644
--- a/services/ui-src/src/libs/formLib.tsx
+++ b/services/ui-src/src/libs/formLib.tsx
@@ -58,7 +58,7 @@ type ConfirmSubmitType = {
export const DefaultFileTypesInfo = () => (
- We accept the following file formats: .docx, .jpg, .pdf, .png, .xlsx.{" "}
+ We accept the following file formats: .docx, .jpg, .pdf, .png, .xlsx, and more:{" "}
See the full list on the{" "}
FAQ Page
@@ -181,11 +181,10 @@ export const defaultConfirmSubmitMessageSubsequentSubmission = (
);
export const defaultConfirmSubsequentSubmission: ConfirmSubmitType = {
- confirmSubmitHeading: "OneMAC only for document submission",
+ confirmSubmitHeading: "Submit additional documents?",
confirmSubmitMessage: (
- States and CMS reviewers will communicate about the submission through
- email.
+ These documents will be added to the package and reviewed by CMS.
),
};
From 2e91b720e2f68fc7161c9980316e21fd857f718c Mon Sep 17 00:00:00 2001
From: Alex Youssefinia
Date: Tue, 1 Oct 2024 21:17:41 -0500
Subject: [PATCH 09/19] added and more to only subsequent submissions related
forms as per story request
---
services/ui-src/src/libs/formLib.tsx | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/services/ui-src/src/libs/formLib.tsx b/services/ui-src/src/libs/formLib.tsx
index 28d7dae69..a6935d507 100644
--- a/services/ui-src/src/libs/formLib.tsx
+++ b/services/ui-src/src/libs/formLib.tsx
@@ -35,6 +35,7 @@ export type OneMACFormConfig = {
proposedEffectiveDate?: boolean;
titleLabel?: string;
submitInstructionsJSX?: JSX.Element;
+ subsequentSubmisssionForm?: boolean;
} & PackageType &
Partial &
Partial &
@@ -57,6 +58,18 @@ type ConfirmSubmitType = {
};
export const DefaultFileTypesInfo = () => (
+
+ We accept the following file formats: .docx, .jpg, .pdf, .png, .xlsx,{" "}
+ See the full list on the{" "}
+
+ FAQ Page
+
+ .
+
We accept the following file formats: .docx, .jpg, .pdf, .png, .xlsx, and more:{" "}
See the full list on the{" "}
@@ -67,6 +80,7 @@ export const DefaultFileTypesInfo = () => (
{isSubSub
- ? "Reason for subsequent submission"
+ ? "Reason for subsequent documents"
: "Additional Information"}
{
+describe("1915(b) Waiver Amendment Subsequent Documents Form", () => {
let history;
beforeEach(() => {
diff --git a/services/ui-src/src/page/waiver-amendment/WaiverAmendmentSubsequentSubmissionForm.tsx b/services/ui-src/src/page/waiver-amendment/WaiverAmendmentSubsequentSubmissionForm.tsx
index 15c3a96fd..a5f1a4549 100644
--- a/services/ui-src/src/page/waiver-amendment/WaiverAmendmentSubsequentSubmissionForm.tsx
+++ b/services/ui-src/src/page/waiver-amendment/WaiverAmendmentSubsequentSubmissionForm.tsx
@@ -23,7 +23,7 @@ export const waiverAmendmentSubsequentSubmissionFormInfo: OneMACFormConfig = {
...defaultSubsequentSubmissionFormConfig,
...waiverAmendmentSubsequentSubmission,
pageTitle: "Upload Subsequent Waiver Amendment Documentation",
- detailsHeader: "Waiver Amendment Subsequent Submission",
+ detailsHeader: "Waiver Amendment Subsequent Documents",
landingPage: ONEMAC_ROUTES.PACKAGE_LIST_WAIVER,
confirmSubmit: defaultConfirmSubsequentSubmission,
validateParentAPI: "validateParentOfWaiverAmendment",
diff --git a/services/ui-src/src/page/waiver-appendix-k/WaiverAppKSubsequentSubmissionForm.test.js b/services/ui-src/src/page/waiver-appendix-k/WaiverAppKSubsequentSubmissionForm.test.js
index 6248a3a8a..7cf961d69 100644
--- a/services/ui-src/src/page/waiver-appendix-k/WaiverAppKSubsequentSubmissionForm.test.js
+++ b/services/ui-src/src/page/waiver-appendix-k/WaiverAppKSubsequentSubmissionForm.test.js
@@ -15,7 +15,7 @@ jest.mock("../../utils/PackageApi");
window.HTMLElement.prototype.scrollIntoView = jest.fn();
window.scrollTo = jest.fn();
-describe("1915(c) Waiver Appendix K Subsequent Submission Form", () => {
+describe("1915(c) Waiver Appendix K Subsequent Documents Form", () => {
let history;
beforeEach(() => {
diff --git a/services/ui-src/src/page/waiver-appendix-k/WaiverAppKSubsequentSubmissionForm.tsx b/services/ui-src/src/page/waiver-appendix-k/WaiverAppKSubsequentSubmissionForm.tsx
index a835f957b..16ed55e32 100644
--- a/services/ui-src/src/page/waiver-appendix-k/WaiverAppKSubsequentSubmissionForm.tsx
+++ b/services/ui-src/src/page/waiver-appendix-k/WaiverAppKSubsequentSubmissionForm.tsx
@@ -17,7 +17,7 @@ export const waiverAppKSubsequentSubmissionFormInfo: OneMACFormConfig = {
...defaultSubsequentSubmissionFormConfig,
...waiverAppKSubsequentSubmission,
pageTitle: "Upload Subsequent 1915(c) Appendix K Documentation",
- detailsHeader: "1915(c) Appendix K Subsequent Submission",
+ detailsHeader: "1915(c) Appendix K Subsequent Documents",
landingPage: ONEMAC_ROUTES.PACKAGE_LIST_WAIVER,
confirmSubmit: defaultConfirmSubsequentSubmission,
validateParentAPI: "validateParentOfAny",
diff --git a/services/ui-src/src/page/waiver-renewal/WaiverRenewalSubsequentSubmissionForm.test.js b/services/ui-src/src/page/waiver-renewal/WaiverRenewalSubsequentSubmissionForm.test.js
index e92c9531b..0b5974319 100644
--- a/services/ui-src/src/page/waiver-renewal/WaiverRenewalSubsequentSubmissionForm.test.js
+++ b/services/ui-src/src/page/waiver-renewal/WaiverRenewalSubsequentSubmissionForm.test.js
@@ -18,7 +18,7 @@ jest.mock("../../utils/PackageApi");
window.HTMLElement.prototype.scrollIntoView = jest.fn();
window.scrollTo = jest.fn();
-describe("1915(b) Waiver Renewal Subsequent Submission Form", () => {
+describe("1915(b) Waiver Renewal Subsequent Documents Form", () => {
let history;
beforeEach(() => {
diff --git a/services/ui-src/src/page/waiver-renewal/WaiverRenewalSubsequentSubmissionForm.tsx b/services/ui-src/src/page/waiver-renewal/WaiverRenewalSubsequentSubmissionForm.tsx
index ba36b0ed6..29081f0b2 100644
--- a/services/ui-src/src/page/waiver-renewal/WaiverRenewalSubsequentSubmissionForm.tsx
+++ b/services/ui-src/src/page/waiver-renewal/WaiverRenewalSubsequentSubmissionForm.tsx
@@ -23,7 +23,7 @@ export const waiverRenewalSubsequentSubmissionFormInfo: OneMACFormConfig = {
...defaultSubsequentSubmissionFormConfig,
...waiverRenewalSubsequentSubmission,
pageTitle: "Upload Subsequent Waiver Renewal Documentation",
- detailsHeader: "Waiver Renewal Subsequent Submission",
+ detailsHeader: "Waiver Renewal Subsequent Documents",
landingPage: ONEMAC_ROUTES.PACKAGE_LIST_WAIVER,
confirmSubmit: defaultConfirmSubsequentSubmission,
validateParentAPI: "validateParentOfWaiverRenewal",
diff --git a/tests/cypress/cypress/e2e/Subsequent_Submission_1915b_Amendment_Waiver.spec.feature b/tests/cypress/cypress/e2e/Subsequent_Submission_1915b_Amendment_Waiver.spec.feature
index f3d434f99..b5a0fb91c 100644
--- a/tests/cypress/cypress/e2e/Subsequent_Submission_1915b_Amendment_Waiver.spec.feature
+++ b/tests/cypress/cypress/e2e/Subsequent_Submission_1915b_Amendment_Waiver.spec.feature
@@ -14,7 +14,7 @@ Feature: Subsequent Submission 1915b Waiver Amendment
Then click Under Review checkbox
Then Click on Filter Button
- Scenario: Screen Enhance - Subsequent Document from the details page
+ Scenario: Screen Enhance - Subsequent Documents from the details page
Then click the Waiver Number link in the first row
Then verify the package details page is visible
Then verify Upload Subsequent Documents action exists
diff --git a/tests/cypress/cypress/e2e/Subsequent_Submission_1915c_Appendix_K.spec.feature b/tests/cypress/cypress/e2e/Subsequent_Submission_1915c_Appendix_K.spec.feature
index d6d2a0c99..c422dbb00 100644
--- a/tests/cypress/cypress/e2e/Subsequent_Submission_1915c_Appendix_K.spec.feature
+++ b/tests/cypress/cypress/e2e/Subsequent_Submission_1915c_Appendix_K.spec.feature
@@ -14,7 +14,7 @@ Feature: Subsequent Submission 1915c App K Waiver
Then click Under Review checkbox
Then Click on Filter Button
- Scenario: Screen Enhance - Subsequent Document from the details page
+ Scenario: Screen Enhance - Subsequent Documents from the details page
Then click the Waiver Number link in the first row
Then verify the package details page is visible
Then verify Upload Subsequent Documents action exists
diff --git a/tests/cypress/cypress/e2e/Subsequent_Submission_CHIP_Spa.spec.feature b/tests/cypress/cypress/e2e/Subsequent_Submission_CHIP_Spa.spec.feature
index 02dadbfbc..9e423bca5 100644
--- a/tests/cypress/cypress/e2e/Subsequent_Submission_CHIP_Spa.spec.feature
+++ b/tests/cypress/cypress/e2e/Subsequent_Submission_CHIP_Spa.spec.feature
@@ -13,7 +13,7 @@ Feature: CHIP SPA State Details View - Card View with Actions
Then click Under Review checkbox
Then Click on Filter Button
- Scenario: Screen Enhance - Subsequent Document from the details page
+ Scenario: Screen Enhance - Subsequent Documents from the details page
Then click the SPA ID link in the first row
Then verify the package details page is visible
Then verify Upload Subsequent Documents action exists
diff --git a/tests/cypress/cypress/e2e/Subsequent_Submission_Initial_Waiver.spec.feature b/tests/cypress/cypress/e2e/Subsequent_Submission_Initial_Waiver.spec.feature
index 52024390f..f12eed89a 100644
--- a/tests/cypress/cypress/e2e/Subsequent_Submission_Initial_Waiver.spec.feature
+++ b/tests/cypress/cypress/e2e/Subsequent_Submission_Initial_Waiver.spec.feature
@@ -14,7 +14,7 @@ Feature: Subsequent Submission 1915b Initial Waiver
Then click Under Review checkbox
Then Click on Filter Button
- Scenario: Screen Enhance - Subsequent Document from the details page
+ Scenario: Screen Enhance - Subsequent Documents from the details page
Then click the Waiver Number link in the first row
Then verify the package details page is visible
Then verify Upload Subsequent Documents action exists
diff --git a/tests/cypress/cypress/e2e/Subsequent_Submission_Medicaid_Spa.spec.feature b/tests/cypress/cypress/e2e/Subsequent_Submission_Medicaid_Spa.spec.feature
index 157bd87a1..00fd29621 100644
--- a/tests/cypress/cypress/e2e/Subsequent_Submission_Medicaid_Spa.spec.feature
+++ b/tests/cypress/cypress/e2e/Subsequent_Submission_Medicaid_Spa.spec.feature
@@ -13,7 +13,7 @@ Feature: Medicaid SPA State Details View - Card View with Actions
Then click Under Review checkbox
Then Click on Filter Button
- Scenario: Screen Enhance - Subsequent Document from the details page
+ Scenario: Screen Enhance - Subsequent Documents from the details page
Then click the SPA ID link in the first row
Then verify the package details page is visible
Then verify Upload Subsequent Documents action exists
diff --git a/tests/cypress/cypress/e2e/Subsequent_Submission_Renewal_Waiver.spec.feature b/tests/cypress/cypress/e2e/Subsequent_Submission_Renewal_Waiver.spec.feature
index 03203180e..652aeffcd 100644
--- a/tests/cypress/cypress/e2e/Subsequent_Submission_Renewal_Waiver.spec.feature
+++ b/tests/cypress/cypress/e2e/Subsequent_Submission_Renewal_Waiver.spec.feature
@@ -14,7 +14,7 @@ Feature: Subsequent Submission 1915b Renewal Waiver
Then click Under Review checkbox
Then Click on Filter Button
- Scenario: Screen Enhance - Subsequent Document from the details page
+ Scenario: Screen Enhance - Subsequent Documents from the details page
Then click the Waiver Number link in the first row
Then verify the package details page is visible
Then verify Upload Subsequent Documents action exists
diff --git a/tests/cypress/cypress/e2e/common/steps.js b/tests/cypress/cypress/e2e/common/steps.js
index 6a4e9ad78..11a79777a 100644
--- a/tests/cypress/cypress/e2e/common/steps.js
+++ b/tests/cypress/cypress/e2e/common/steps.js
@@ -2086,7 +2086,7 @@ Then("click the Upload Subsequent Documents action button", () => {
Then("verify the Subsequent {string} Documents section exists", (type) => {
OneMacFormPage.verifySubsequentDocumentsSectionExistsWith(type);
});
-Then("verify the Reason for subsequent submission section exists", () => {
+Then("verify the Reason for subsequent documents section exists", () => {
OneMacFormPage.verifyAdditionalInfoSectionExists();
});
Then("verify the dialog title contains {string}", (s) => {
diff --git a/tests/cypress/support/pages/oneMacFormPage.js b/tests/cypress/support/pages/oneMacFormPage.js
index 0340f4b07..b12b52cd4 100644
--- a/tests/cypress/support/pages/oneMacFormPage.js
+++ b/tests/cypress/support/pages/oneMacFormPage.js
@@ -29,7 +29,7 @@ const subsequentDocumentsHeader = (type) =>
`//h3[contains(text(),'Subsequent ${type} Documents')]`;
const labelElementFromLabel = {
"Additional Information": "#additional-information-label",
- "Reason for subsequent submission": "#additional-information-label",
+ "Reason for subsequent documents": "#additional-information-label",
};
const elementFromLabel = {
// Different forms may have different labels for the ID field
@@ -41,7 +41,7 @@ const elementFromLabel = {
"Existing Waiver Number to Renew": parentIdElement,
"Existing Waiver Number to Amend": parentIdElement,
"Additional Information": "#additional-information",
- "Reason for subsequent submission": "#additional-information",
+ "Reason for subsequent documents": "#additional-information",
};
const errorMessageLine1FromLabel = {
"SPA ID": "#componentIdStatusMsg0",
From e9b9f5a534db50aa2005ae979143c0489fe5cd87 Mon Sep 17 00:00:00 2001
From: Alex Youssefinia
Date: Fri, 4 Oct 2024 08:24:33 -0500
Subject: [PATCH 14/19] revert change picked up from other story
---
services/ui-src/src/libs/formLib.tsx | 4 ++--
services/ui-src/src/setupTests.js | 14 ++++++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/services/ui-src/src/libs/formLib.tsx b/services/ui-src/src/libs/formLib.tsx
index 3fe5671d6..0ccb63099 100644
--- a/services/ui-src/src/libs/formLib.tsx
+++ b/services/ui-src/src/libs/formLib.tsx
@@ -194,10 +194,10 @@ export const defaultConfirmSubmitMessageSubsequentSubmission = (
);
export const defaultConfirmSubsequentSubmission: ConfirmSubmitType = {
- confirmSubmitHeading: "Submit additional documents?",
+ confirmSubmitHeading: "OneMAC only for document submission",
confirmSubmitMessage: (
- These documents will be added to the package and reviewed by CMS.
+ States and CMS reviewers will communicate about the submission through email.
),
};
diff --git a/services/ui-src/src/setupTests.js b/services/ui-src/src/setupTests.js
index 7b6f79bb9..302034f5b 100644
--- a/services/ui-src/src/setupTests.js
+++ b/services/ui-src/src/setupTests.js
@@ -17,3 +17,17 @@ jest.mock("focus-trap", () => {
};
return () => trap;
});
+
+window.matchMedia = jest.fn((query) => {
+ return {
+ matches: query === '(max-width: 600px)', // Adjust this logic based on your needs
+ media: query,
+ onchange: null,
+ addListener: jest.fn(), // Deprecated, but still mock for compatibility
+ removeListener: jest.fn(), // Deprecated, but still mock for compatibility
+ addEventListener: jest.fn(), // For modern browsers
+ removeEventListener: jest.fn(), // For modern browsers
+ dispatchEvent: jest.fn(), // For modern browsers
+ };
+});
+console.log("Setup file loaded");
\ No newline at end of file
From 8e507b46f7c5b861c7bcd0e5cb08848a5895dd1b Mon Sep 17 00:00:00 2001
From: Alex Youssefinia
Date: Fri, 4 Oct 2024 08:26:57 -0500
Subject: [PATCH 15/19] added space
---
services/ui-src/src/libs/formLib.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/services/ui-src/src/libs/formLib.tsx b/services/ui-src/src/libs/formLib.tsx
index 0ccb63099..6f5423c85 100644
--- a/services/ui-src/src/libs/formLib.tsx
+++ b/services/ui-src/src/libs/formLib.tsx
@@ -197,7 +197,8 @@ export const defaultConfirmSubsequentSubmission: ConfirmSubmitType = {
confirmSubmitHeading: "OneMAC only for document submission",
confirmSubmitMessage: (
- States and CMS reviewers will communicate about the submission through email.
+ States and CMS reviewers will communicate about the submission through
+ email.
),
};
From a666d849c1c3f61b1d7a9f20b1956b350cd492d3 Mon Sep 17 00:00:00 2001
From: bflynn-cms
Date: Fri, 4 Oct 2024 10:18:13 -0500
Subject: [PATCH 16/19] Create generate_packages.py (#1520)
* Create generate_packages.py
* adding utility scripts for staging data
* also adding user creation scripts
* add setPOCs script
---
services/admin/scripts/READ.md | 7 +
services/admin/scripts/createUsers.sh | 82 ++++
services/admin/scripts/delete_packages.sh | 41 ++
services/admin/scripts/generate_packages.py | 416 ++++++++++++++++++
services/admin/scripts/pk_values.json | 40 ++
services/admin/scripts/rebuildPackagesByPk.py | 75 ++++
services/admin/scripts/setPOCs.py | 100 +++++
services/admin/scripts/users.json | 76 ++++
8 files changed, 837 insertions(+)
create mode 100644 services/admin/scripts/READ.md
create mode 100644 services/admin/scripts/createUsers.sh
create mode 100644 services/admin/scripts/delete_packages.sh
create mode 100644 services/admin/scripts/generate_packages.py
create mode 100644 services/admin/scripts/pk_values.json
create mode 100644 services/admin/scripts/rebuildPackagesByPk.py
create mode 100644 services/admin/scripts/setPOCs.py
create mode 100644 services/admin/scripts/users.json
diff --git a/services/admin/scripts/READ.md b/services/admin/scripts/READ.md
new file mode 100644
index 000000000..a95966c49
--- /dev/null
+++ b/services/admin/scripts/READ.md
@@ -0,0 +1,7 @@
+This /scripts Folder simply contains scripts that are not used in the application or deployed via lambda but are useful for admin type functions.
+
+#####
+
+generate_packages - creates new records in Under Review status by inserting both a OneMAC record and a SEATool record
+rebuildPackagesbyPK - force a rebuild of the package record for all packages listed in pk_values.json
+setPOCs - set the action_officers (srt) and lead_analyst (cpoc) for all packages listed in pk_values.json
diff --git a/services/admin/scripts/createUsers.sh b/services/admin/scripts/createUsers.sh
new file mode 100644
index 000000000..5afaf265c
--- /dev/null
+++ b/services/admin/scripts/createUsers.sh
@@ -0,0 +1,82 @@
+#!/bin/bash
+
+# Variables
+USER_POOL_ID="us-east-1_9NXuk7ucb"
+INPUT_FILE="users.json"
+DYNAMODB_TABLE="onemac-masterclone-one"
+DATE=$(date +%s%3N) # Current timestamp in milliseconds
+
+# Read the JSON file and loop through each user
+jq -c '.users[]' $INPUT_FILE | while read -r user; do
+ PASSWORD=$(echo $user | jq -r '.password')
+ EMAIL=$(echo $user | jq -r '.email')
+ FAMILY_NAME=$(echo $user | jq -r '.family_name')
+ GIVEN_NAME=$(echo $user | jq -r '.given_name')
+ ROLE=$(echo $user | jq -r '.role')
+
+ # Concatenate given name and family name to form full name
+ FULL_NAME="$GIVEN_NAME $FAMILY_NAME"
+
+ # Determine territory and GSI fields based on role
+ if [ "$ROLE" = "systemadmin" ]; then
+ TERRITORY="N/A"
+ GSI1SK="Boss"
+ GSI1PK="systemadmin#N/A"
+ else
+ TERRITORY=$(echo $user | jq -r '.territory')
+ GSI1SK="statesystemadmin#$TERRITORY"
+ GSI1PK="USER"
+ fi
+
+ echo "Creating user with email: $EMAIL"
+
+ # Use the email as the username in Cognito
+ aws cognito-idp admin-create-user \
+ --user-pool-id "$USER_POOL_ID" \
+ --username "$EMAIL" \
+ --user-attributes Name="email",Value="$EMAIL" \
+ Name="family_name",Value="$FAMILY_NAME" \
+ Name="given_name",Value="$GIVEN_NAME" \
+ Name="email_verified",Value="true" \
+ --message-action SUPPRESS
+
+ # Set the password and mark the user as confirmed
+ aws cognito-idp admin-set-user-password \
+ --user-pool-id "$USER_POOL_ID" \
+ --username "$EMAIL" \
+ --password "$PASSWORD" \
+ --permanent
+
+ echo "User created with email (used as username): $EMAIL"
+
+ # Insert ContactInfo record into DynamoDB
+ aws dynamodb put-item --table-name "$DYNAMODB_TABLE" --item \
+ '{"pk": {"S": "'"$EMAIL"'"},
+ "sk": {"S": "ContactInfo"},
+ "email": {"S": "'"$EMAIL"'"},
+ "fullName": {"S": "'"$FULL_NAME"'"},
+ "GSI1pk": {"S": "'"$GSI1PK"'"},
+ "GSI1sk": {"S": "'"$EMAIL"'"} }'
+
+ echo "ContactInfo record created for user: $EMAIL"
+
+ # Insert Roles record into DynamoDB
+ aws dynamodb put-item --table-name "$DYNAMODB_TABLE" --item \
+ '{"pk": {"S": "'"$EMAIL"'"},
+ "sk": {"S": "v0#'"$ROLE"'#'"$TERRITORY"'"},
+ "date": {"N": "'"$DATE"'"},
+ "doneByEmail": {"S": "'"$EMAIL"'"},
+ "doneByName": {"S": "'"$FULL_NAME"'"},
+ "email": {"S": "'"$EMAIL"'"},
+ "fullName": {"S": "'"$FULL_NAME"'"},
+ "GSI1pk": {"S": "'"$GSI1PK"'"},
+ "GSI1sk": {"S": "'"$GSI1SK"'"},
+ "GSI2pk": {"S": "'"$ROLE"'#'"$TERRITORY"'"},
+ "GSI2sk": {"S": "active"},
+ "Latest": {"S": "1"},
+ "role": {"S": "'"$ROLE"'"},
+ "status": {"S": "active"},
+ "territory": {"S": "'"$TERRITORY"'"} }'
+
+ echo "Roles record created for user: $EMAIL"
+done
\ No newline at end of file
diff --git a/services/admin/scripts/delete_packages.sh b/services/admin/scripts/delete_packages.sh
new file mode 100644
index 000000000..f893ec0fa
--- /dev/null
+++ b/services/admin/scripts/delete_packages.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# Variables
+DYNAMODB_TABLE="onemac-masterclone-one"
+PK_VALUES=("NY-24-9356" "NY-24-6035" "NY-24-3865" "NY-24-1282" "NY-24-1036" "NY-24-9253" "NY-24-9972" "NY-24-1717" "NY-24-5342" "NY-24-8523" "NY-24-1571" "NY-24-7203" "NY-80815.R01.02" "NY-66338.R01.02" "NY-84734.R01.00" "NY-23214.R01.02" "NY-94872.R00.00" "NY-93400.R00.00" "NY-72598.R01.02" "NY-84074.R01.00" "NY-49584.R00.01" "NY-52227.R00.00" "NY-27845.R01.00" "NY-95809.R00.01" "NY-53801.R01.02" "NY-38783.R00.01" "NY-75550.R00.01" "NY-92181.R01.00" "NY-18445.R00.00" "NY-57782.R01.00" "NY-52513.R00.00" "NY-99845.R00.01" "NY-76823.R00.01" "NY-42146.R01.02" "NY-52725.R00.00" "NY-14938.R01.00")
+
+# Counter for deleted items
+DELETED_COUNT=0
+
+# Loop through each pk value
+for PK in "${PK_VALUES[@]}"; do
+ # Query DynamoDB for items with the specified pk
+ ITEMS=$(aws dynamodb query \
+ --table-name "$DYNAMODB_TABLE" \
+ --key-condition-expression "pk = :pk" \
+ --expression-attribute-values '{":pk": {"S": "'"$PK"'"}}' \
+ --projection-expression "pk, sk" \
+ --output json | jq -c '.Items[]')
+
+ # Loop through the found items and delete them
+ echo "$ITEMS" | while read -r item; do
+ pk=$(echo "$item" | jq -r '.pk.S')
+ sk=$(echo "$item" | jq -r '.sk.S')
+
+ # Skip if pk or sk is empty
+ if [[ -z "$pk" || -z "$sk" ]]; then
+ continue
+ fi
+
+ # Delete the record
+ aws dynamodb delete-item \
+ --table-name "$DYNAMODB_TABLE" \
+ --key "{\"pk\": {\"S\": \"$pk\"}, \"sk\": {\"S\": \"$sk\"}}"
+
+ echo "Deleted record with pk: $pk and sk: $sk"
+ ((DELETED_COUNT++))
+ done
+done
+
+# Output the total number of deleted items
+echo "Total number of deleted items: $DELETED_COUNT"
\ No newline at end of file
diff --git a/services/admin/scripts/generate_packages.py b/services/admin/scripts/generate_packages.py
new file mode 100644
index 000000000..2ff6b1fe4
--- /dev/null
+++ b/services/admin/scripts/generate_packages.py
@@ -0,0 +1,416 @@
+import boto3
+import random
+import time
+from datetime import datetime, timedelta
+import os
+from botocore.exceptions import ClientError
+
+# Initialize DynamoDB client
+dynamodb = boto3.resource('dynamodb')
+
+# Get table name from environment variable or use default
+table_name = os.getenv('TABLE_NAME', 'onemac-masterclone-one')
+table = dynamodb.Table(table_name)
+
+# Define different component configurations
+component_config = {
+ "medicaidspa": {
+ "componentType": "medicaidspa",
+ "GSI1pk": "OneMAC#submitmedicaidspa",
+ "GSI1sk_prefix": "OneMAC#",
+ "second_GSI1pk": "SEATool#Medicaid_SPA",
+ "pk_format": "{state_code}-{current_year}-{random_4_digits}"
+ },
+ "chipspa": {
+ "componentType": "chipspa",
+ "GSI1pk": "OneMAC#submitchipspa",
+ "GSI1sk_prefix": "OneMAC#",
+ "second_GSI1pk": "SEATool#CHIP_SPA",
+ "pk_format": "{state_code}-{current_year}-{random_4_digits}"
+ },
+ "waivernew": {
+ "componentType": "waivernew",
+ "GSI1pk": "OneMAC#submitwaivernew",
+ "GSI1sk_prefix": "OneMAC#",
+ "second_GSI1pk": "SEATool#1915b_waivers",
+ "pk_format": "{state_code}-{random_5_digits}.R00.00"
+ },
+ "waiverappk": {
+ "componentType": "waiverappk",
+ "GSI1pk": "OneMAC#submitwaiverappk",
+ "GSI1sk_prefix": "OneMAC#",
+ "second_GSI1pk": "SEATool#1915c_waivers",
+ "pk_format": "{state_code}-{random_5_digits}.R00.01"
+ },
+ "waiveramendment": {
+ "componentType": "waiveramendment",
+ "GSI1pk": "OneMAC#submitwaiveramendment",
+ "GSI1sk_prefix": "OneMAC#",
+ "second_GSI1pk": "SEATool#1915b_waivers",
+ "pk_format": "{state_code}-{random_5_digits}.R01.02"
+ },
+ "waiverrenewal": {
+ "componentType": "waiverrenewal",
+ "GSI1pk": "OneMAC#submitwaiverrenewal",
+ "GSI1sk_prefix": "OneMAC#",
+ "second_GSI1pk": "SEATool#1915b_waivers",
+ "pk_format": "{state_code}-{random_5_digits}.R01.00"
+ }
+}
+
+# Function to generate random ID and timestamps, ensuring no duplicate IDs
+generated_ids = set()
+
+def generate_ids_and_timestamps(state_code, component_type):
+ config = component_config[component_type]
+ current_year = datetime.now().year % 100 # last 2 digits of the year
+ while True:
+ pk_format = config['pk_format']
+ # Replace placeholders with actual values
+ random_id = pk_format.format(
+ state_code=state_code,
+ current_year=current_year,
+ random_4_digits=random.randint(1000, 9999),
+ random_5_digits=random.randint(10000, 99999)
+ )
+
+ if random_id not in generated_ids:
+ generated_ids.add(random_id)
+ break
+
+ # Generate two timestamps within the last 90 days
+ now = int(time.time() * 1000)
+ start_time = now - (random.randint(0, 90) * 24 * 3600 * 1000)
+ end_time = start_time + random.randint(1, 600000) # Ensure second timestamp is slightly later
+ return random_id, start_time, end_time
+
+# default LEAD_ANALYST and ACTION_OFFICERS
+default_lead_analyst = [
+ {
+ "EMAIL": "onemaccpoc6@gmail.com",
+ "FIRST_NAME": "OneMAC",
+ "LAST_NAME": "CPOC06",
+ "OFFICER_ID": 3743,
+ "POSITION_ID": 538,
+ "TELEPHONE": "(410) 555-5445"
+ }
+]
+
+default_action_officers = [
+ {
+ "EMAIL": "onemacsrt52@gmail.com",
+ "FIRST_NAME": "OneMAC",
+ "LAST_NAME": "SRT52",
+ "OFFICER_ID": 3740,
+ "POSITION_ID": 538,
+ "TELEPHONE": "(410) 555-5445"
+ }
+]
+
+# Define different action officers and lead analysts per state, using the original defaults for now
+action_officers_per_state = {
+ "MD": [
+ {
+ "EMAIL": "onemacsrt52@gmail.com",
+ "FIRST_NAME": "OneMAC",
+ "LAST_NAME": "SRT52",
+ "OFFICER_ID": 3740,
+ "POSITION_ID": 538,
+ "TELEPHONE": "(410) 555-5445"
+ }
+ ],
+ "NY": [
+ {
+ "EMAIL": "onemacsrt5@gmail.com",
+ "FIRST_NAME": "OneMAC",
+ "LAST_NAME": "SRT5",
+ "OFFICER_ID": 3740,
+ "POSITION_ID": 538,
+ "TELEPHONE": "(410) 555-5445"
+ }
+ ],
+ "CA": [
+ {
+ "EMAIL": "onemacsrt2@gmail.com",
+ "FIRST_NAME": "OneMAC",
+ "LAST_NAME": "SRT2",
+ "OFFICER_ID": 3740,
+ "POSITION_ID": 538,
+ "TELEPHONE": "(410) 555-5445"
+ }
+ ],
+ "OH": [
+ {
+ "EMAIL": "onemacsrt3@gmail.com",
+ "FIRST_NAME": "OneMAC",
+ "LAST_NAME": "SRT3",
+ "OFFICER_ID": 3740,
+ "POSITION_ID": 538,
+ "TELEPHONE": "(410) 555-5445"
+ }
+ ],
+ "WI": [
+ {
+ "EMAIL": "onemacsrt4@gmail.com",
+ "FIRST_NAME": "OneMAC",
+ "LAST_NAME": "SRT4",
+ "OFFICER_ID": 3740,
+ "POSITION_ID": 538,
+ "TELEPHONE": "(410) 555-5445"
+ }
+ ]
+}
+
+lead_analyst_per_state = {
+ "MD": [
+ {
+ "EMAIL": "onemaccpoc6@gmail.com",
+ "FIRST_NAME": "OneMAC",
+ "LAST_NAME": "CPOC06",
+ "OFFICER_ID": 3743,
+ "POSITION_ID": 538,
+ "TELEPHONE": "(410) 555-5445"
+ }
+ ],
+ "NY": [
+ {
+ "EMAIL": "onemaccpoc50@gmail.com",
+ "FIRST_NAME": "OneMAC",
+ "LAST_NAME": "CPOC5",
+ "OFFICER_ID": 3743,
+ "POSITION_ID": 538,
+ "TELEPHONE": "(410) 555-5445"
+ }
+ ],
+ "CA": [
+ {
+ "EMAIL": "onemaccpoc9@gmail.com",
+ "FIRST_NAME": "OneMAC",
+ "LAST_NAME": "CPOC02",
+ "OFFICER_ID": 3743,
+ "POSITION_ID": 538,
+ "TELEPHONE": "(410) 555-5445"
+ }
+ ],
+ "OH": [
+ {
+ "EMAIL": "onemaccpoc319@gmail.com",
+ "FIRST_NAME": "OneMAC",
+ "LAST_NAME": "CPOC3",
+ "OFFICER_ID": 3743,
+ "POSITION_ID": 538,
+ "TELEPHONE": "(410) 555-5445"
+ }
+ ],
+ "WI": [
+ {
+ "EMAIL": "onemaccpoc49@gmail.com",
+ "FIRST_NAME": "OneMAC",
+ "LAST_NAME": "CPOC4",
+ "OFFICER_ID": 3743,
+ "POSITION_ID": 538,
+ "TELEPHONE": "(410) 555-5445"
+ }
+ ]
+}
+
+# Function to generate onemace submission record based on component type
+def generate_onemac_submission_record(state, random_id, first_timestamp, component_type):
+ config = component_config[component_type]
+ if component_type == "waiverappk":
+ attachments = [
+ {
+ "contentType": "text/csv",
+ "filename": "Report_UserList(1).csv",
+ "s3Key": f"{first_timestamp}/Report_UserList(1).csv",
+ "title": "1915(c) Appendix K Amendment Waiver Template",
+ "url": f"https://uploads-master-attachments-989324938326.s3.us-east-1.amazonaws.com/protected/us-east-1%3A30413432-e223-4a6d-bfe1-7ed87236ff55/{first_timestamp}/Report_UserList(1).csv"
+ },
+ {
+ "contentType": "text/csv",
+ "filename": "Report_spaList(5).csv",
+ "s3Key": f"{first_timestamp}/Report_spaList(5).csv",
+ "title": "1915(c) Appendix K Amendment Waiver Template",
+ "url": f"https://uploads-master-attachments-989324938326.s3.us-east-1.amazonaws.com/protected/us-east-1%3A30413432-e223-4a6d-bfe1-7ed87236ff55/{first_timestamp}/Report_spaList(5).csv"
+ },
+ {
+ "contentType": "text/csv",
+ "filename": "Report_waiverList(8).csv",
+ "s3Key": f"{first_timestamp}/Report_waiverList(8).csv",
+ "title": "Other",
+ "url": f"https://uploads-master-attachments-989324938326.s3.us-east-1.amazonaws.com/protected/us-east-1%3A30413432-e223-4a6d-bfe1-7ed87236ff55/{first_timestamp}/Report_waiverList(8).csv"
+ }
+ ]
+ return {
+ "pk": random_id,
+ "sk": f"{config['GSI1sk_prefix']}{first_timestamp}",
+ "additionalInformation": "created new APP k",
+ "attachments": attachments,
+ "clockEndTimestamp": first_timestamp + 77777777,
+ "componentId": random_id,
+ "componentType": config["componentType"],
+ "currentStatus": "Submitted",
+ "eventTimestamp": first_timestamp,
+ "GSI1pk": config["GSI1pk"],
+ "GSI1sk": random_id,
+ "proposedEffectiveDate": "2023-01-20",
+ "submissionTimestamp": first_timestamp,
+ "submitterEmail": "mdstateonemac@gmail.com",
+ "submitterName": "MDSTATE SUBMITTERNK",
+ "territory": state,
+ "title": "New Title for App K",
+ "transmittalNumberWarningMessage": "",
+ "waiverAuthority": "1915(c)"
+ }
+ else:
+ return {
+ "pk": random_id,
+ "sk": f"{config['GSI1sk_prefix']}{first_timestamp}",
+ "additionalInformation": "test",
+ "attachments": [
+ {
+ "contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ "filename": "file.docx",
+ "s3Key": f"{first_timestamp}/file.docx",
+ "title": "1915(b)(4) FFS Selective Contracting (Streamlined) Waiver Application Pre-print",
+ "url": f"https://uploads-develop-attachments-116229642442.s3.us-east-1.amazonaws.com/protected/us-east-1%3A86a190fe-b195-42bf-9685-9761bf0ff14b/{first_timestamp}/file.docx"
+ }
+ ],
+ "clockEndTimestamp": first_timestamp + 77777777,
+ "componentId": random_id,
+ "componentType": config["componentType"],
+ "currentStatus": "Submitted",
+ "eventTimestamp": first_timestamp,
+ "GSI1pk": config["GSI1pk"],
+ "GSI1sk": random_id,
+ "proposedEffectiveDate": "2024-06-27",
+ "submissionTimestamp": first_timestamp,
+ "submitterEmail": "statesubmitter@nightwatch.test",
+ "submitterName": "Statesubmitter Nightwatch",
+ "territory": state,
+ "transmittalNumberWarningMessage": "",
+ "waiverAuthority": "1915(b)(4)"
+ }
+
+# Function to generate second record based on component type
+def generate_seatool_pending_record(state, random_id, second_timestamp, component_type):
+ config = component_config[component_type]
+
+ # Use state-specific action officers and lead analysts
+ action_officers = action_officers_per_state.get(state, default_action_officers)
+ lead_analyst = lead_analyst_per_state.get(state, default_lead_analyst)
+
+ # Base common record structure
+ seatool_record = {
+ "pk": random_id,
+ "sk": f"SEATool#{second_timestamp}",
+ "GSI1pk": config["second_GSI1pk"],
+ "GSI1sk": random_id,
+ "LEAD_ANALYST": lead_analyst,
+ "ACTION_OFFICERS": action_officers,
+ "OCD_REVIEW": [
+ {
+ "OCD_REVIEW_DESCRIPTION": "No",
+ "OCD_REVIEW_ID": 2
+ }
+ ],
+ "SPW_STATUS": [
+ {
+ "SPW_STATUS_DESC": "Pending",
+ "SPW_STATUS_ID": 1
+ }
+ ],
+ "STATE_PLAN": {
+ "ID_NUMBER": random_id,
+ "SPW_STATUS_ID": 1, # Ensures SPW_STATUS_ID is always included
+ "LEAD_ANALYST_ID": lead_analyst[0]["OFFICER_ID"], # Using the first lead analyst's ID
+ "STATE_CODE": state,
+ "SUMMARY_MEMO": "This is just a test" if component_type != "waiverappk" else "Sample Summary Memo",
+ "UUID": "66908FBA-9AFC-41BD-BA77-AA74379E6F44" if component_type != "waiverappk" else None
+ }
+ }
+
+ # Add or modify specific fields based on component_type
+ if component_type == "waiverappk":
+ seatool_record["ACTIONTYPES"] = [
+ {
+ "ACTION_ID": 76,
+ "ACTION_NAME": "Amend",
+ "PLAN_TYPE_ID": 123
+ }
+ ]
+ seatool_record["PLAN_TYPES"] = [
+ {
+ "PLAN_TYPE_ID": 123,
+ "PLAN_TYPE_NAME": "1915(c)"
+ }
+ ]
+ seatool_record["STATE_PLAN"]["ACTION_TYPE"] = 76
+ seatool_record["STATE_PLAN"]["ALERT_90_DAYS_DATE"] = 1681862400000
+ else:
+ seatool_record["PLAN_TYPES"] = [
+ {
+ "PLAN_TYPE_ID": 122,
+ "PLAN_TYPE_NAME": "1915(b)"
+ }
+ ]
+ seatool_record["STATE_PLAN"]["PLAN_TYPE"] = 122
+
+ return seatool_record
+
+
+
+# Function to insert records into DynamoDB with multiple component types
+def insert_records(state_codes, num_records, component_types):
+ created_records = [] # List to store final records (State, PK, Component Type)
+
+ for state in state_codes:
+ for _ in range(num_records):
+ for component_type in component_types:
+ random_id, first_timestamp, second_timestamp = generate_ids_and_timestamps(state, component_type)
+
+ # Generate first record
+ onemac_record = generate_onemac_submission_record(state, random_id, first_timestamp, component_type)
+
+ # Generate second record
+ seatool_record = generate_seatool_pending_record(state, random_id, second_timestamp, component_type)
+
+ # Try to insert both records, retry if duplicate key error occurs
+ try:
+ # insert SEATOOL record first just to avoid package builder issues
+ table.put_item(Item=seatool_record)
+
+ # Add a delay of 2 second between inserting the first and second records
+ time.sleep(2)
+ table.put_item(Item=onemac_record)
+
+ print(f"Inserted records for {random_id} with component type: {component_type}")
+
+ # Add record details to created_records list
+ created_records.append([state, random_id, component_type])
+
+ except ClientError as e:
+ if e.response['Error']['Code'] == 'ConditionalCheckFailedException':
+ print(f"Duplicate ID {random_id} detected. Retrying with a new ID.")
+ continue # Generate a new ID and retry
+ else:
+ raise e # Raise the exception for non-duplicate errors
+
+ # Sort created records by State, Component Type, PK
+ created_records.sort(key=lambda x: (x[0], x[2], x[1]))
+
+ # Output final records in a table-like format
+ print("\nFinal created records:")
+ print(f"{'State':<10} {'PK':<30} {'Component Type':<20}")
+ print("-" * 60)
+ for record in created_records:
+ print(f"{record[0]:<10} {record[1]:<30} {record[2]:<20}")
+
+
+# Retrieve state codes, number of records, and component types from environment variables
+state_codes = os.getenv('STATE_CODES', 'MD,NY,CA,OH,WI').split(',') # Example: 'MD,NY,CA'
+num_records = int(os.getenv('NUM_RECORDS', '6')) # Default is 5 if not provided
+component_types = os.getenv('COMPONENT_TYPES', 'medicaidspa,chipspa,waivernew,waiverappk,waiveramendment,waiverrenewal').split(',') # Example: 'medicaidspa,chipspa,waivernew,waiverappk'
+
+# Call the insert function
+insert_records(state_codes, num_records, component_types)
diff --git a/services/admin/scripts/pk_values.json b/services/admin/scripts/pk_values.json
new file mode 100644
index 000000000..aa3a39f93
--- /dev/null
+++ b/services/admin/scripts/pk_values.json
@@ -0,0 +1,40 @@
+{
+ "pk_values": [
+ "WI-24-5681",
+ "WI-24-4068",
+ "WI-24-6952",
+ "WI-24-5766",
+ "WI-24-9659",
+ "WI-24-3678",
+ "WI-24-4176",
+ "WI-24-2648",
+ "WI-24-7668",
+ "WI-24-1278",
+ "WI-24-5949",
+ "WI-24-5076",
+ "WI-73399.R01.00",
+ "WI-74402.R00.00",
+ "WI-91643.R00.01",
+ "WI-95019.R00.00",
+ "WI-44177.R00.01",
+ "WI-91036.R00.00",
+ "WI-16228.R01.02",
+ "WI-70842.R01.00",
+ "WI-48754.R01.00",
+ "WI-78312.R00.01",
+ "WI-11759.R00.00",
+ "WI-73939.R01.00",
+ "WI-73184.R01.02",
+ "WI-92164.R01.02",
+ "WI-71371.R01.02",
+ "WI-93250.R00.00",
+ "WI-89280.R01.00",
+ "WI-14865.R01.00",
+ "WI-85003.R00.01",
+ "WI-10359.R01.02",
+ "WI-72170.R00.00",
+ "WI-97670.R00.01",
+ "WI-55406.R00.01",
+ "WI-88967.R01.02"
+ ]
+}
diff --git a/services/admin/scripts/rebuildPackagesByPk.py b/services/admin/scripts/rebuildPackagesByPk.py
new file mode 100644
index 000000000..b124ad044
--- /dev/null
+++ b/services/admin/scripts/rebuildPackagesByPk.py
@@ -0,0 +1,75 @@
+import boto3
+import datetime
+import json
+import logging
+from boto3.dynamodb.conditions import Key
+from botocore.exceptions import ClientError
+
+# Configure logging
+logging.basicConfig(level=logging.INFO)
+logger = logging.getLogger(__name__)
+
+# Variables
+dynamodb_table = "onemac-masterclone-one"
+
+# Load pk values from an external configuration file with error handling
+try:
+ with open('pk_values.json', 'r') as file:
+ pk_values = json.load(file)
+except (FileNotFoundError, json.JSONDecodeError) as e:
+ logger.error(f"Error loading pk_values.json: {e}")
+ pk_values = []
+
+# Initialize DynamoDB resource
+dynamodb = boto3.resource('dynamodb')
+table = dynamodb.Table(dynamodb_table)
+
+# Counter for updated items
+updated_count = 0
+
+# Loop through each pk value
+for pk in pk_values:
+ # Query DynamoDB for items with the specified pk and sk starting with OneMAC
+ response = table.query(
+ KeyConditionExpression=Key('pk').eq(pk) & Key('sk').begins_with('OneMAC'),
+ ProjectionExpression='pk, sk'
+ )
+
+ items = response.get('Items', [])
+
+ # Handle pagination to ensure all items are retrieved
+ while 'LastEvaluatedKey' in response:
+ response = table.query(
+ KeyConditionExpression=Key('pk').eq(pk) & Key('sk').begins_with('OneMAC'),
+ ProjectionExpression='pk, sk',
+ ExclusiveStartKey=response['LastEvaluatedKey']
+ )
+ items.extend(response.get('Items', []))
+
+ # Loop through the found items and update them
+ for item in items:
+ pk_value = item['pk']
+ sk_value = item['sk']
+
+ # Update the record to trigger a DynamoDB stream event with error handling
+ try:
+ table.update_item(
+ Key={
+ 'pk': pk_value,
+ 'sk': sk_value
+ },
+ UpdateExpression='SET #updatedAt = :timestamp',
+ ExpressionAttributeNames={
+ '#updatedAt': 'updatedAt'
+ },
+ ExpressionAttributeValues={
+ ':timestamp': datetime.datetime.now(datetime.timezone.utc).isoformat()
+ }
+ )
+ logger.info(f"Updated record with pk: {pk_value} and sk: {sk_value} to trigger DynamoDB stream")
+ updated_count += 1
+ except ClientError as e:
+ logger.error(f"Failed to update record with pk: {pk_value} and sk: {sk_value}. Error: {e.response['Error']['Message']}")
+
+# Output the total number of updated items
+logger.info(f"Total number of updated items: {updated_count}")
\ No newline at end of file
diff --git a/services/admin/scripts/setPOCs.py b/services/admin/scripts/setPOCs.py
new file mode 100644
index 000000000..66c0df19e
--- /dev/null
+++ b/services/admin/scripts/setPOCs.py
@@ -0,0 +1,100 @@
+import json
+import boto3
+import os
+from botocore.exceptions import ClientError
+
+# Load the list of GSI1SK values from an external file
+with open('pk_values.json') as f:
+ pk_values = json.load(f)
+
+GSI1PK_VALUES = [
+ "SEATool#Medicaid_SPA",
+ "SEATool#CHIP_SPA",
+ "SEATool#1915b_waivers",
+ "SEATool#1915c_waivers"
+]
+
+LEAD_ANALYST_JSON = {
+ ":leadAnalyst": {
+ "L": [
+ {
+ "M": {
+ "EMAIL": {"S": "onemaccpoc49@gmail.com"},
+ "FIRST_NAME": {"S": "OneMAC"},
+ "INITIALS": {"NULL": True},
+ "LAST_NAME": {"S": "CPOC4"},
+ "OFFICER_ID": {"N": "3743"},
+ "POSITION_ID": {"N": "538"},
+ "TELEPHONE": {"S": "(410) 555-5445"}
+ }
+ }
+ ]
+ }
+}
+
+ACTION_OFFICERS_JSON = {
+ ":actionOfficers": {
+ "L": [
+ {
+ "M": {
+ "EMAIL": {"S": "onemacsrt4@gmail.com"},
+ "FIRST_NAME": {"S": "OneMAC"},
+ "LAST_NAME": {"S": "SRT4"},
+ "OFFICER_ID": {"N": "3740"},
+ "POSITION_ID": {"N": "538"},
+ "TELEPHONE": {"S": "(410) 555-5445"}
+ }
+ }
+ ]
+ }
+}
+
+dynamodb = boto3.client('dynamodb')
+DYNAMODB_TABLE = os.getenv('DYNAMODB_TABLE', 'onemac-masterclone-one')
+
+updated_count = 0
+
+for gsi1pk in GSI1PK_VALUES:
+ for gsi1sk in pk_values['pk_values']:
+ try:
+ # Query DynamoDB for items with the specified gsi1pk and gsi1sk
+ response = dynamodb.query(
+ TableName=DYNAMODB_TABLE,
+ IndexName='GSI1',
+ KeyConditionExpression='GSI1pk = :gsi1pk AND GSI1sk = :gsi1sk',
+ ExpressionAttributeValues={
+ ':gsi1pk': {'S': gsi1pk},
+ ':gsi1sk': {'S': gsi1sk}
+ },
+ ProjectionExpression='pk, sk'
+ )
+
+ items = response.get('Items', [])
+
+ # Loop through the found items and update them
+ for item in items:
+ pk = item.get('pk', {}).get('S')
+ sk = item.get('sk', {}).get('S')
+
+ # Skip if pk or sk is empty
+ if not pk or not sk:
+ continue
+
+ # Update the record by adding or replacing the LEAD_ANALYST and ACTION_OFFICERS properties
+ dynamodb.update_item(
+ TableName=DYNAMODB_TABLE,
+ Key={
+ 'pk': {'S': pk},
+ 'sk': {'S': sk}
+ },
+ UpdateExpression='SET LEAD_ANALYST = :leadAnalyst, ACTION_OFFICERS = :actionOfficers',
+ ExpressionAttributeValues={**LEAD_ANALYST_JSON, **ACTION_OFFICERS_JSON}
+ )
+
+ print(f"Updated record with pk: {pk} and sk: {sk} with lead analyst: OneMAC CPOC05")
+ updated_count += 1
+
+ except ClientError as e:
+ print(f"Error querying or updating item with GSI1pk: {gsi1pk} and GSI1sk: {gsi1sk}: {e}")
+
+print(f"Total number of updated items: {updated_count}")
\ No newline at end of file
diff --git a/services/admin/scripts/users.json b/services/admin/scripts/users.json
new file mode 100644
index 000000000..b43b7c711
--- /dev/null
+++ b/services/admin/scripts/users.json
@@ -0,0 +1,76 @@
+{
+ "users": [
+ {
+ "password": "Passw0rd!",
+ "cms_roles": "onemac-state-user",
+ "email": "onemaccpoc9@gmail.com",
+ "family_name": "OneMAC",
+ "given_name": "CPOC2",
+ "territory": "CA",
+ "role": "systemadmin"
+ },
+ {
+ "password": "Passw0rd!",
+ "cms_roles": "onemac-state-user",
+ "email": "onemaccpoc319@gmail.com",
+ "family_name": "OneMAC",
+ "given_name": "CPOC3",
+ "territory": "OH",
+ "role": "systemadmin"
+ },
+ {
+ "password": "Passw0rd!",
+ "cms_roles": "onemac-state-user",
+ "email": "onemaccpoc49@gmail.com",
+ "family_name": "OneMAC",
+ "given_name": "CPOC4",
+ "territory": "WI",
+ "role": "systemadmin"
+ },
+ {
+ "password": "Passw0rd!",
+ "cms_roles": "onemac-state-user",
+ "email": "onemaccpoc50@gmail.com",
+ "family_name": "OneMAC",
+ "given_name": "CPOC5",
+ "territory": "NY",
+ "role": "systemadmin"
+ },
+ {
+ "password": "Passw0rd!",
+ "cms_roles": "onemac-state-user",
+ "email": "onemacsrt2@gmail.com",
+ "family_name": "OneMAC",
+ "given_name": "SRT2",
+ "territory": "CA",
+ "role": "systemadmin"
+ },
+ {
+ "password": "Passw0rd!",
+ "cms_roles": "onemac-state-user",
+ "email": "onemacsrt3@gmail.com",
+ "family_name": "OneMAC",
+ "given_name": "SRT3",
+ "territory": "OH",
+ "role": "systemadmin"
+ },
+ {
+ "password": "Passw0rd!",
+ "cms_roles": "onemac-state-user",
+ "email": "onemacsrt4@gmail.com",
+ "family_name": "OneMAC",
+ "given_name": "SRT4",
+ "territory": "WI",
+ "role": "systemadmin"
+ },
+ {
+ "password": "Passw0rd!",
+ "cms_roles": "onemac-state-user",
+ "email": "onemacsrt5@gmail.com",
+ "family_name": "OneMAC",
+ "given_name": "SRT5",
+ "territory": "NY",
+ "role": "systemadmin"
+ }
+ ]
+}
\ No newline at end of file
From d12a4ac6d1be4ce23446e9458e3b6e3bf2023571 Mon Sep 17 00:00:00 2001
From: Alex Youssefinia
Date: Fri, 4 Oct 2024 14:53:30 -0500
Subject: [PATCH 17/19] remove accidental pickup from other branch
---
services/ui-src/src/setupTests.js | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/services/ui-src/src/setupTests.js b/services/ui-src/src/setupTests.js
index 302034f5b..97d6d79fb 100644
--- a/services/ui-src/src/setupTests.js
+++ b/services/ui-src/src/setupTests.js
@@ -16,18 +16,4 @@ jest.mock("focus-trap", () => {
unpause: () => {},
};
return () => trap;
-});
-
-window.matchMedia = jest.fn((query) => {
- return {
- matches: query === '(max-width: 600px)', // Adjust this logic based on your needs
- media: query,
- onchange: null,
- addListener: jest.fn(), // Deprecated, but still mock for compatibility
- removeListener: jest.fn(), // Deprecated, but still mock for compatibility
- addEventListener: jest.fn(), // For modern browsers
- removeEventListener: jest.fn(), // For modern browsers
- dispatchEvent: jest.fn(), // For modern browsers
- };
-});
-console.log("Setup file loaded");
\ No newline at end of file
+});
\ No newline at end of file
From db2f4d7a31a75a657434516394b5d943cb0e710a Mon Sep 17 00:00:00 2001
From: Andie Swift
Date: Mon, 7 Oct 2024 10:35:55 -0500
Subject: [PATCH 18/19] Emails: Sub Doc Email Fix (#1519)
* fixed bug missing name, removed bold on files
* fixed wording on cms emails on how to access
* changed text to After you are logged in on last bullet
---
.../email/CMSSubsequentSubmissionNotice.js | 19 +++++++++++--------
.../app-api/email/formatPackageDetails.js | 2 +-
.../stateSubsequentSubmissionReceipt.test.js | 1 +
3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/services/app-api/email/CMSSubsequentSubmissionNotice.js b/services/app-api/email/CMSSubsequentSubmissionNotice.js
index 61215dfc8..46beabac4 100644
--- a/services/app-api/email/CMSSubsequentSubmissionNotice.js
+++ b/services/app-api/email/CMSSubsequentSubmissionNotice.js
@@ -7,7 +7,6 @@ import { getCPOCandSRTEmailAddresses } from "../utils/getCpocAndSrtEmail.js";
* @returns {Object} email parameters in generic format.
*/
export const CMSSubsequentSubmissionNotice = async (data, config) => {
- data.submitterName = ""; // remove this bc we dont want it on the cms email
const CMSEmailItem = await getCPOCandSRTEmailAddresses(data.componentId);
const ToAddresses = CMSEmailItem.reviewTeamEmailList
@@ -25,6 +24,13 @@ export const CMSSubsequentSubmissionNotice = async (data, config) => {
config.idLabel = `${typeLabel} Package ID`;
}
+ // creating own object
+ const cmsSubSubDetails = {
+ componentId: data.componentId,
+ additionalInformation: data.additionalInformation,
+ attachments: data.attachments,
+ };
+
return {
ToAddresses: ToAddresses,
CcAddresses: [],
@@ -33,7 +39,7 @@ export const CMSSubsequentSubmissionNotice = async (data, config) => {
New documents have been submitted for ${config.typeLabel} ${
data.componentId
} in OneMAC.
- If you are not already logged in, please click the "Login" link at the
- top of the page and log in using your Enterprise User Administration
- (EUA) credentials.
+ If you are not already logged in, click “Login” at the top of the page and log in using your
+ Enterprise User Administration (EUA) credentials.
- After you have logged in, you will be taken to the OneMAC application.
- The submission will be listed on the dashboard page, and you can view
- its details by clicking on its ID number.
+ After you are logged in, click the submission ID number on the dashboard page to view details.