diff --git a/app/cypress/integration/application-form-validation.spec.js b/app/cypress/integration/application-form-validation.spec.js index d3432dd109..41c495b24d 100644 --- a/app/cypress/integration/application-form-validation.spec.js +++ b/app/cypress/integration/application-form-validation.spec.js @@ -75,21 +75,6 @@ describe('When reviewing a submitted application as an analyst', () => { cy.get('#root_facility_facilityName').clear().type('Acme1'); cy.get('#root_facility_facilityType').select('LFO'); cy.get('#root_facility_bcghgid').clear().type('11001100223'); - cy.get('#root_facility_naics').clear().type('1100223'); - - // Facility mailing address - cy.get('#root_facility_mailingAddress_streetAddress') - .clear() - .type('100 North Pole'); - cy.get('#root_facility_mailingAddress_city').clear().type('Calgary'); - cy.get('#root_facility_mailingAddress_postalCode').clear().type('H2O 0H0'); - cy.get('#root_facility_mailingAddress_province').select('Alberta'); - - cy.get( - '#root_facility_isFacilityLocationDifferent .radio label span input[type=radio]' - ) - .last() - .check(); cy.contains('Continue').click(); cy.get( diff --git a/app/tests/integration/Forms/__snapshots__/Form.test.tsx.snap b/app/tests/integration/Forms/__snapshots__/Form.test.tsx.snap index 5473a8e0cf..14771a60a1 100644 --- a/app/tests/integration/Forms/__snapshots__/Form.test.tsx.snap +++ b/app/tests/integration/Forms/__snapshots__/Form.test.tsx.snap @@ -86,7 +86,7 @@ exports[`Form should match the snapshot with the administration form 1`] = ` readOnly={false} required={true} type="text" - value="mollit eu esse" + value="culpa" /> - - -
- -
-
-
-
-
- -
-
- - Facility Mailing Address - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
-
-
- -
-
- -
-
- -
-
- -
diff --git a/app/tests/unit/containers/Applications/__snapshots__/ApplicationDetailsPdf.test.tsx.snap b/app/tests/unit/containers/Applications/__snapshots__/ApplicationDetailsPdf.test.tsx.snap index 5a70d33cc1..3904c048b2 100644 --- a/app/tests/unit/containers/Applications/__snapshots__/ApplicationDetailsPdf.test.tsx.snap +++ b/app/tests/unit/containers/Applications/__snapshots__/ApplicationDetailsPdf.test.tsx.snap @@ -81,11 +81,11 @@ exports[`ApplicationDetailsPdf should render application pdf donwload link 1`] = Operator - culpa + mollit eu esse - culpa + in qui @@ -96,7 +96,7 @@ exports[`ApplicationDetailsPdf should render application pdf donwload link 1`] = - k3u 2p4 + p4A2p4 @@ -186,17 +186,9 @@ exports[`ApplicationDetailsPdf should render application pdf donwload link 1`] = formData={ Object { "facility": Object { - "bcghgid": "51234", - "facilityName": "in qui", - "facilityType": "IF_b", - "isFacilityLocationDifferent": false, - "mailingAddress": Object { - "city": "mollit eu esse", - "postalCode": "k3u 2p4", - "province": "British Columbia", - "streetAddress": "culpa", - }, - "naics": "4512", + "bcghgid": "4512", + "facilityName": "consequat Ut Duis", + "facilityType": "IF_a", }, "operationalRepresentative": Object { "email": "Fmsy@fkpuAfkpuAfkpuAfk.kn", @@ -212,16 +204,16 @@ exports[`ApplicationDetailsPdf should render application pdf donwload link 1`] = "position": "in qui", }, "operator": Object { - "bcCorporateRegistryNumber": "aF3451234", + "bcCorporateRegistryNumber": "FK4512345", "mailingAddress": Object { "city": "mollit eu esse", - "postalCode": "k3u 2p4", + "postalCode": "p4A2p4", "province": "British Columbia", - "streetAddress": "culpa", + "streetAddress": "in qui", }, - "naics": "345", - "name": "culpa", - "tradeName": "est dolor", + "naics": "123451", + "name": "mollit eu esse", + "tradeName": "mollit eu esse", }, } } @@ -279,48 +271,6 @@ exports[`ApplicationDetailsPdf should render application pdf donwload link 1`] = }, "properties": Object { "facility": Object { - "dependencies": Object { - "isFacilityLocationDifferent": Object { - "oneOf": Array [ - Object { - "properties": Object { - "isFacilityLocationDifferent": Object { - "const": false, - }, - }, - }, - Object { - "properties": Object { - "facilityLocation": Object { - "properties": Object { - "latitude": Object { - "title": "Latitude", - "type": "number", - }, - "locationNearestCity": Object { - "title": "Nearest City", - "type": "string", - }, - "locationStreetAddress": Object { - "title": "Location of the facility", - "type": "string", - }, - "longitude": Object { - "title": "Longitude", - "type": "number", - }, - }, - "title": "Facility Location", - "type": "object", - }, - "isFacilityLocationDifferent": Object { - "const": true, - }, - }, - }, - ], - }, - }, "properties": Object { "bcghgid": Object { "format": "bcghgid", @@ -343,30 +293,11 @@ exports[`ApplicationDetailsPdf should render application pdf donwload link 1`] = "title": "Facility Type", "type": "string", }, - "isFacilityLocationDifferent": Object { - "enumNames": Array [ - " Yes", - " No", - ], - "title": "Is the facility location different from the mailing address?", - "type": "boolean", - }, - "mailingAddress": Object { - "$ref": "#/definitions/address", - "title": "Facility Mailing Address", - }, - "naics": Object { - "format": "naics", - "title": "NAICS code", - "type": "string", - }, }, "required": Array [ - "naics", "bcghgid", "facilityName", "facilityType", - "isFacilityLocationDifferent", ], "title": "Facility Information", "type": "object", @@ -460,27 +391,10 @@ exports[`ApplicationDetailsPdf should render application pdf donwload link 1`] = "longitude", ], }, - "isFacilityLocationDifferent": Object { - "ui:widget": "radio", - }, - "mailingAddress": Object { - "postalCode": Object { - "ui:placeholder": "ex: A1A 1A1", - }, - "ui:order": Array [ - "streetAddress", - "city", - "postalCode", - "province", - ], - }, "ui:order": Array [ "facilityName", "facilityType", "bcghgid", - "naics", - "mailingAddress", - "isFacilityLocationDifferent", "facilityLocation", ], }, diff --git a/schema/data/fixtures/certifier-access-setup.sql b/schema/data/fixtures/certifier-access-setup.sql index c8f3eed763..21dce82b9f 100644 --- a/schema/data/fixtures/certifier-access-setup.sql +++ b/schema/data/fixtures/certifier-access-setup.sql @@ -36,17 +36,9 @@ values -- Ensure all form results contain no errors update ggircs_portal.form_result set form_result = '{ "facility": { - "naics": "12345", "bcghgid": "123465", "facilityName": "test", - "facilityType": "L_c", - "mailingAddress": { - "city": "Victoria", - "province": "British Columbia", - "streetAddress": "123 street st", - "postalCode": "H0H0H0" - }, - "isFacilityLocationDifferent": false + "facilityType": "L_c" }, "operator": { "name": "Changed", diff --git a/schema/data/fixtures/change-form-result.sql b/schema/data/fixtures/change-form-result.sql index d7aae4dbf2..193160ece4 100644 --- a/schema/data/fixtures/change-form-result.sql +++ b/schema/data/fixtures/change-form-result.sql @@ -7,14 +7,7 @@ update ggircs_portal.form_result set form_result = '{ "naics": "123456", "bcghgid": "123465", "facilityName": "test", - "facilityType": "L_c", - "mailingAddress": { - "city": "Victoria", - "province": "British Columbia", - "streetAddress": "123 street st", - "postalCode": "H0H0H0" - }, - "isFacilityLocationDifferent": false + "facilityType": "L_c" }, "operator": { "name": "Changed", diff --git a/schema/data/fixtures/email-setup.sql b/schema/data/fixtures/email-setup.sql index 221552518a..419112cd2d 100644 --- a/schema/data/fixtures/email-setup.sql +++ b/schema/data/fixtures/email-setup.sql @@ -29,17 +29,9 @@ update ggircs_portal.application_revision set created_by = 6 where application_i -- Ensure all form results contain no errors update ggircs_portal.form_result set form_result = '{ "facility": { - "naics": "12345", "bcghgid": "123465", "facilityName": "test", - "facilityType": "L_c", - "mailingAddress": { - "city": "Victoria", - "province": "British Columbia", - "streetAddress": "123 street st", - "postalCode": "H0H0H0" - }, - "isFacilityLocationDifferent": false + "facilityType": "L_c" }, "operator": { "name": "Changed", diff --git a/schema/data/fixtures/reporter-all-access-setup.sql b/schema/data/fixtures/reporter-all-access-setup.sql index a986251f26..7b9db86232 100644 --- a/schema/data/fixtures/reporter-all-access-setup.sql +++ b/schema/data/fixtures/reporter-all-access-setup.sql @@ -35,17 +35,9 @@ values -- Ensure all form results contain no errors update ggircs_portal.form_result set form_result = '{ "facility": { - "naics": "12345", "bcghgid": "123465", "facilityName": "test", - "facilityType": "L_c", - "mailingAddress": { - "city": "Victoria", - "province": "British Columbia", - "streetAddress": "123 street st", - "postalCode": "H0H0H0" - }, - "isFacilityLocationDifferent": false + "facilityType": "L_c" }, "operator": { "name": "Changed", diff --git a/schema/data/prod/form_json/administration.json b/schema/data/prod/form_json/administration.json index abccffe95a..dd8dbbe5f3 100644 --- a/schema/data/prod/form_json/administration.json +++ b/schema/data/prod/form_json/administration.json @@ -6,18 +6,11 @@ "type": "object", "title": "Facility Information", "required": [ - "naics", "bcghgid", "facilityName", - "facilityType", - "isFacilityLocationDifferent" + "facilityType" ], "properties": { - "naics": { - "type": "string", - "format": "naics", - "title": "NAICS code" - }, "bcghgid": { "type": "string", "format": "bcghgid", @@ -38,61 +31,6 @@ ], "type": "string", "title": "Facility Type" - }, - "mailingAddress": { - "$ref": "#/definitions/address", - "title": "Facility Mailing Address" - }, - "isFacilityLocationDifferent": { - "type": "boolean", - "title": "Is the facility location different from the mailing address?", - "enumNames": [ - " Yes", - " No" - ] - } - }, - "dependencies": { - "isFacilityLocationDifferent": { - "oneOf": [ - { - "properties": { - "isFacilityLocationDifferent": { - "const": false - } - } - }, - { - "properties": { - "facilityLocation": { - "type": "object", - "title": "Facility Location", - "properties": { - "latitude": { - "type": "number", - "title": "Latitude" - }, - "longitude": { - "type": "number", - "title": "Longitude" - - }, - "locationNearestCity": { - "type": "string", - "title": "Nearest City" - }, - "locationStreetAddress": { - "type": "string", - "title": "Location of the facility" - } - } - }, - "isFacilityLocationDifferent": { - "const": true - } - } - } - ] } } }, @@ -221,22 +159,8 @@ "facilityName", "facilityType", "bcghgid", - "naics", - "mailingAddress", - "isFacilityLocationDifferent", "facilityLocation" ], - "mailingAddress": { - "ui:order": [ - "streetAddress", - "city", - "postalCode", - "province" - ], - "postalCode": { - "ui:placeholder": "ex: A1A 1A1" - } - }, "facilityLocation": { "ui:order": [ "locationStreetAddress", @@ -244,9 +168,6 @@ "latitude", "longitude" ] - }, - "isFacilityLocationDifferent": { - "ui:widget": "radio" } }, "operator": {