Skip to content

Commit

Permalink
PI1.4 26064: CMS RAI Response Withdrawal enablement update (#1401)
Browse files Browse the repository at this point in the history
Co-authored-by: Valencia McMurray <[email protected]>
  • Loading branch information
kristin-at-theta and Valencia2019 authored Nov 8, 2023
1 parent c5ef635 commit 8efedcf
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 72 deletions.
1 change: 1 addition & 0 deletions services/ui-src/src/libs/formLib.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export type OneMACFormConfig = {
addlInfoTitle?: string;
addlInfoText?: string | React.ReactNode;
addlInfoRequired?: boolean;
noText?: boolean;
requireUploadOrAdditionalInformation?: boolean;
landingPage: string;
confirmSubmit?: ConfirmSubmitType;
Expand Down
72 changes: 38 additions & 34 deletions services/ui-src/src/page/OneMACForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -539,40 +539,44 @@ const OneMACForm: React.FC<{ formConfig: OneMACFormConfig }> = ({
></FileUploader>
</>
)}
<TextField
name="additionalInformation"
labelClassName={
formConfig.addlInfoRequired ? "addl-info-required" : ""
}
label={formConfig.addlInfoTitle}
labelId="additional-information-label"
id="additional-information"
hint={
formConfig.addlInfoText ??
"Add anything else that you would like to share with CMS."
}
disabled={isSubmitting}
fieldClassName="summary-field required"
multiline
onChange={(e) => {
handleInputChange(e);
}}
value={oneMacFormData.additionalInformation}
maxLength={config.MAX_ADDITIONAL_INFO_LENGTH}
aria-describedby="character-count"
aria-live="off"
aria-multiline={true}
></TextField>
<span
tabIndex={0}
id="character-count"
aria-label="character-count"
aria-live="polite"
>
{`${
4000 - oneMacFormData.additionalInformation.length
} characters remaining`}
</span>
{!formConfig?.noText && (
<>
<TextField
name="additionalInformation"
labelClassName={
formConfig.addlInfoRequired ? "addl-info-required" : ""
}
label={formConfig.addlInfoTitle}
labelId="additional-information-label"
id="additional-information"
hint={
formConfig.addlInfoText ??
"Add anything else that you would like to share with CMS."
}
disabled={isSubmitting}
fieldClassName="summary-field required"
multiline
onChange={(e) => {
handleInputChange(e);
}}
value={oneMacFormData.additionalInformation}
maxLength={config.MAX_ADDITIONAL_INFO_LENGTH}
aria-describedby="character-count"
aria-live="off"
aria-multiline={true}
></TextField>
<span
tabIndex={0}
id="character-count"
aria-label="character-count"
aria-live="polite"
>
{`${
4000 - oneMacFormData.additionalInformation.length
} characters remaining`}
</span>
</>
)}

{formConfig.submitInstructionsJSX ?? ""}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,7 @@ export const disableRaiWithdrawFormInfo: OneMACFormConfig = {
progress on this form.
</p>
),
addlInfoTitle: "Change Reason",
addlInfoText: (
<p>
Please be descriptive about why this action is being disabled.{" "}
<b>Information entered will be visible to both CMS and State users.</b>
</p>
) as React.ReactNode,
addlInfoRequired: true,
noText: true,
landingPage: ONEMAC_ROUTES.PACKAGE_LIST,
submitInstructionsJSX: <></>,
idMustExist: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@ export const enableRaiWithdrawFormInfo: OneMACFormConfig = {
you will lose your progress on this form.
</p>
),
addlInfoTitle: "Change Reason",
addlInfoText: (
<p>
Please be descriptive about why this action is being enabled.{" "}
<b>Information entered will be visible to both CMS and State users.</b>
</p>
) as React.ReactNode,
addlInfoRequired: true,
noText: true,
landingPage: ONEMAC_ROUTES.PACKAGE_LIST,
submitInstructionsJSX: <></>,
idMustExist: true,
Expand Down
16 changes: 10 additions & 6 deletions services/ui-src/src/page/section/DetailSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,16 @@ export const DetailSection = ({
<Review className="preserve-spacing" heading="Change Made">
{adminChange.changeMade}
</Review>
<Review
className="preserve-spacing"
heading="Change Reason"
>
{adminChange.changeReason}
</Review>
{!adminChange.changeMade.includes(
"abled State package action to withdraw Formal RAI Response"
) && (
<Review
className="preserve-spacing"
heading="Change Reason"
>
{adminChange.changeReason}
</Review>
)}
</AccordionItem>
);
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,7 @@ Feature: Waiver Package Details View: Appendix K Amendment for a CMS User
Then verify the status on the card is "Pending"
Then verify Enable Formal RAI Response Withdraw package action exists
Then click Enable Formal RAI Response Withdraw package action
Then type "Automated test to enable an RAI Response withdrawal." in additional info textarea
Then Click on Submit Button
Then verify the status on the card is "RAI Response Withdraw Enabled"
Then verify package actions header is visible
Then verify Disable Formal RAI Response Withdraw package action exists
#Then verify there are no package actions available
Then verify Disable Formal RAI Response Withdraw package action exists
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,7 @@ Feature: CHIP SPA CMS Details View - Card View with Actions
Then verify the status on the card is "Pending"
Then verify Enable Formal RAI Response Withdraw package action exists
Then click Enable Formal RAI Response Withdraw package action
Then type "Automated test to enable an RAI Response withdrawal." in additional info textarea
Then Click on Submit Button
Then verify the status on the card is "RAI Response Withdraw Enabled"
Then verify package actions header is visible
Then verify Disable Formal RAI Response Withdraw package action exists
# Then verify there are no package actions available
Then verify Disable Formal RAI Response Withdraw package action exists
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,7 @@ Feature: Waiver Package Details View: Initial Waivers
Then verify the status on the card is "Pending"
Then verify Enable Formal RAI Response Withdraw package action exists
Then click Enable Formal RAI Response Withdraw package action
Then type "Automated test to enable an RAI Response withdrawal." in additional info textarea
Then Click on Submit Button
Then verify the status on the card is "RAI Response Withdraw Enabled"
Then verify package actions header is visible
Then verify Disable Formal RAI Response Withdraw package action exists
#Then verify there are no package actions available
Then verify Disable Formal RAI Response Withdraw package action exists
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ Feature: Medicaid SPA CMS Details View - Card View with Actions
Then verify the status on the card is "Pending"
Then verify Enable Formal RAI Response Withdraw package action exists
Then click Enable Formal RAI Response Withdraw package action
Then type "Automated test to enable an RAI Response withdrawal." in additional info textarea
Then Click on Submit Button
Then verify the status on the card is "RAI Response Withdraw Enabled"
Then verify package actions header is visible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,7 @@ Feature: Waiver Package Details View: Waiver Renewal for a CMS User
Then verify the status on the card is "Pending"
Then verify Enable Formal RAI Response Withdraw package action exists
Then click Enable Formal RAI Response Withdraw package action
Then type "Automated test to enable an RAI Response withdrawal." in additional info textarea
Then Click on Submit Button
Then verify the status on the card is "RAI Response Withdraw Enabled"
Then verify package actions header is visible
Then verify Disable Formal RAI Response Withdraw package action exists
#Then verify there are no package actions available
Then verify Disable Formal RAI Response Withdraw package action exists
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,7 @@ Feature: Waiver Package Details View: 1915 b Waiver Amendment for a CMS User
Then verify the status on the card is "Pending"
Then verify Enable Formal RAI Response Withdraw package action exists
Then click Enable Formal RAI Response Withdraw package action
Then type "Automated test to enable an RAI Response withdrawal." in additional info textarea
Then Click on Submit Button
Then verify the status on the card is "RAI Response Withdraw Enabled"
Then verify package actions header is visible
Then verify Disable Formal RAI Response Withdraw package action exists
#Then verify there are no package actions available
Then verify Disable Formal RAI Response Withdraw package action exists

0 comments on commit 8efedcf

Please sign in to comment.