Skip to content

Commit

Permalink
fix(minor-amend-issues): fixes to the amendment stuff that got missed
Browse files Browse the repository at this point in the history
Co-authored-by: tiffanyvu <tiffany.v330@gmail.com>
  • Loading branch information
2 people authored and RanyeM committed Dec 2, 2024
1 parent 0a123ad commit 32de0a8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const AmendmentForm = ({ waiverId }: AmendmentFormProps) => {
attachments={{
faqLink: getFAQLinkForAttachments("capitated-amendment"),
}}
defaultValues={{ id: "", waiverNumber: waiverId }}
defaultValues={{ id: "", waiverNumber: waiverId ?? "" }}
documentPollerArgs={{
property: "id",
documentChecker: (check) => check.recordExists,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,9 @@ describe("AMENDMENT CAPITATED WAIVER WITH EXISTING WAIVERID", () => {
beforeAll(() => {
skipCleanup();
mockApiRefinements();

const { container: renderedContainer } = renderForm(<AmendmentForm />);

container = renderedContainer;
});
test("waiver id is rendered on page", async () => {
const { container: renderedContainer } = renderForm(
<AmendmentForm waiverId="AK-0000.R00.11" />,
);

container = renderedContainer;
renderForm(<AmendmentForm waiverId="AK-0000.R00.11" />);

const existingWaiverId = screen.getByTestId("existing-waiver-id");
expect(existingWaiverId).toHaveTextContent("AK-0000.R00.11");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ export const AmendmentForm = ({ waiverId }: AmendmentFormProps) => {
attachments={{
faqLink: getFAQLinkForAttachments("contracting-amendment"),
}}
defaultValues={{ id: "", waiverNumber: waiverId }}
defaultValues={{ id: "", waiverNumber: waiverId ?? "" }}
documentPollerArgs={{
property: "id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,7 @@ describe("AMENDMENT CONTRACTING WAIVER", () => {

describe("Contracting Amendment with existing waiver Id", () => {
test("existing waiver id is filled out", async () => {
const { container: renderedContainer } = renderForm(
<AmendmentForm waiverId="AK-0000.R00.11" />,
);

container = renderedContainer;
renderForm(<AmendmentForm waiverId="AK-0000.R00.11" />);

const existingWaiverId = screen.getByTestId("existing-waiver-id");
expect(existingWaiverId).toHaveTextContent("AK-0000.R00.11");
Expand Down

0 comments on commit 32de0a8

Please sign in to comment.