Skip to content

Commit

Permalink
fix: adding 2 decimal places to provence share percerntage
Browse files Browse the repository at this point in the history
  • Loading branch information
gurjmatharu committed Feb 8, 2023
1 parent 14e3e7d commit 4670f07
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/data/jsonSchemaForm/fundingAgreementSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export const fundingAgreementUiSchema = {
provinceSharePercentage: {
"ui:widget": "NumberWidget",
isPercentage: true,
numberOfDecimalPlaces: 2,
},
holdbackPercentage: {
"ui:widget": "NumberWidget",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ describe("The ProjectFundingAgreementForm", () => {
expect(
screen.getByLabelText<HTMLSelectElement>(/Province's Share Percentage/i)
.value
).toBe("50 %");
).toBe("50.00 %");
expect(
screen.getByLabelText<HTMLSelectElement>(
/Performance Milestone Holdback Percentage/i
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ describe("The Project Funding Agreement Form Summary", () => {
componentTestingHelper.loadQuery();
componentTestingHelper.renderComponent();

expect(screen.getByText("50 %")).toBeInTheDocument();
expect(screen.getByText("60 %")).toBeInTheDocument();
expect(screen.getByText("50.00 %")).toBeInTheDocument();
expect(screen.getByText("60.00 %")).toBeInTheDocument();
expect(screen.getByText("10 %")).toBeInTheDocument();
expect(screen.getByText("20 %")).toBeInTheDocument();
expect(screen.getByText("$2,500.00")).toBeInTheDocument();
Expand Down

0 comments on commit 4670f07

Please sign in to comment.