Skip to content

Commit

Permalink
test: update jest tests with max performance amount
Browse files Browse the repository at this point in the history
  • Loading branch information
BCerki committed Jul 26, 2023
1 parent 792f25d commit c5c2890
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ const defaultMockResolver = {
reportType: "TEIMP",
formChangeByPreviousFormChangeId: null,
formDataRecordId: 1,

calculatedEiPerformance: 200,
paymentPercentage: 60,
holdbackAmountToDate: "100",
maximumPerformanceMilestoneAmount: 100,
actualPerformanceMilestoneAmount: "200",
},
},
Expand Down Expand Up @@ -183,7 +182,7 @@ describe("the emission intensity report form component", () => {
).toHaveTextContent("60.00%");
expect(
screen.getByLabelText("Maximum Performance Milestone Amount")
).toHaveTextContent("$100");
).toHaveTextContent("$100.00");
expect(
screen.getByLabelText("Actual Performance Milestone Amount")
).toHaveTextContent("$200.00");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,13 @@ describe("the emission intensity report form component", () => {
isPristine: false,
calculatedEiPerformance: 10,
paymentPercentage: 40,
holdbackAmountToDate: 123,
maximumPerformanceMilestoneAmount: 123,
actualPerformanceMilestoneAmount: null,
operation: "UPDATE",
formChangeByPreviousFormChangeId: {
calculatedEiPerformance: 20,
paymentPercentage: 44,
holdbackAmountToDate: 321,
maximumPerformanceMilestoneAmount: 321,
actualPerformanceMilestoneAmount: 789,
},
},
Expand All @@ -274,7 +274,7 @@ describe("the emission intensity report form component", () => {
operation: "UPDATE",
calculatedEiPerformance: 22,
paymentPercentage: 13,
holdbackAmountToDate: 741,
maximumPerformanceMilestoneAmount: 741,
actualPerformanceMilestoneAmount: 357,
},
},
Expand Down Expand Up @@ -304,9 +304,9 @@ describe("the emission intensity report form component", () => {
expect(
screen.getByText(/maximum performance milestone amount/i)
).toBeInTheDocument();
expect(screen.getByText(/\$321\.00/i)).toBeInTheDocument(); //old holdbackAmountToDate
expect(screen.getByText(/\$123\.00/i)).toBeInTheDocument(); //new holdbackAmountToDate
expect(screen.getByText(/\$741\.00/i)).toBeInTheDocument(); //latest committed holdbackAmountToDate
expect(screen.getByText(/\$321\.00/i)).toBeInTheDocument(); //old maximumPerformanceMilestoneAmount
expect(screen.getByText(/\$123\.00/i)).toBeInTheDocument(); //new maximumPerformanceMilestoneAmount
expect(screen.getByText(/\$741\.00/i)).toBeInTheDocument(); //latest committed maximumPerformanceMilestoneAmount

expect(
screen.getByText(/actual performance milestone amount/i)
Expand Down Expand Up @@ -334,7 +334,7 @@ describe("the emission intensity report form component", () => {
isPristine: true,
calculatedEiPerformance: 10,
paymentPercentage: 40,
holdbackAmountToDate: 123,
maximumPerformanceMilestoneAmount: 123,
actualPerformanceMilestoneAmount: null,
operation: "CREATE",
},
Expand Down

0 comments on commit c5c2890

Please sign in to comment.