Skip to content

Commit

Permalink
Merge pull request #2733 from bcgov/2426-new-entrant-links
Browse files Browse the repository at this point in the history
2426 new entrant links
  • Loading branch information
BCerki authored Jan 27, 2025
2 parents 1230a19 + 4c0f1eb commit 83d6e16
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import FieldTemplate from "@bciers/components/form/fields/FieldTemplate";
import TitleOnlyFieldTemplate from "@bciers/components/form/fields/TitleOnlyFieldTemplate";
import { GenerateNewEntrantFormMessage } from "apps/registration/app/components/operations/registration/form/titles";
import { RJSFSchema, UiSchema } from "@rjsf/utils";
import {
newEntrantApril1OrLater,
newEntrantBeforeMarch31,
} from "@bciers/utils/src/urls";

export const newEntrantOperationSchema: RJSFSchema = {
title: "New Entrant Operation",
Expand Down Expand Up @@ -83,14 +87,14 @@ export const newEntrantOperationUiSchema: UiSchema = {
"ui:FieldTemplate": TitleOnlyFieldTemplate,
"ui:title": GenerateNewEntrantFormMessage(
"on or before March 31, 2024",
"url-1-tbd",
newEntrantBeforeMarch31,
),
},
on_or_after_april_1_section: {
"ui:FieldTemplate": TitleOnlyFieldTemplate,
"ui:title": GenerateNewEntrantFormMessage(
"on or after April 1, 2024",
"url-2-tbd",
newEntrantApril1OrLater,
),
},
new_entrant_application: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ describe("the NewEntrantOperationForm component", () => {

expect(
screen.getByRole("link", { name: /application form template/i }),
).toHaveAttribute("href", "url-2-tbd");
).toHaveAttribute(
"href",
"https://www2.gov.bc.ca/assets/download/751CDDAE4C9A411E974EEA9737CD42C6",
);
});

it("should display the correct url and message for the before March 31 date choice", async () => {
Expand Down Expand Up @@ -127,7 +130,10 @@ describe("the NewEntrantOperationForm component", () => {

expect(
screen.getByRole("link", { name: /application form template/i }),
).toHaveAttribute("href", "url-1-tbd");
).toHaveAttribute(
"href",
"https://www2.gov.bc.ca/assets/download/F5375D72BE1C450AB52C2E3E6A618959",
);
});

it("should display required field message if the users submits without attaching a file", async () => {
Expand Down
6 changes: 6 additions & 0 deletions bciers/libs/utils/src/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ export const naicsLink =

export const ggerrLink =
"https://www.bclaws.gov.bc.ca/civix/document/id/lc/statreg/249_2015";

export const newEntrantBeforeMarch31 =
"https://www2.gov.bc.ca/assets/download/F5375D72BE1C450AB52C2E3E6A618959";

export const newEntrantApril1OrLater =
"https://www2.gov.bc.ca/assets/download/751CDDAE4C9A411E974EEA9737CD42C6";

0 comments on commit 83d6e16

Please sign in to comment.