Notes
diff --git a/frontend/stub/__files/response-clients-details-G.json b/frontend/stub/__files/response-clients-details-G.json
index eb0add297..b65857d07 100644
--- a/frontend/stub/__files/response-clients-details-G.json
+++ b/frontend/stub/__files/response-clients-details-G.json
@@ -28,22 +28,64 @@
],
"addresses": [
{
- "index": 0,
- "streetAddress":"{{randomValue length=3 type='NUMERIC'}} Richmond Ave",
- "country":"Canada",
- "province":"Saskatchewan",
+ "clientLocnName": "Mailing address",
+ "clientLocnCode": "00",
+ "addressOne":"{{randomValue length=3 type='NUMERIC'}} Richmond Ave",
+ "addressTwo":"C/O Tony Pineda",
+ "addressThree":"Sample additional info",
+ "countryCode":"CA",
+ "countryDesc":"Canada",
+ "provinceCode":"SK",
+ "provinceDesc":"Saskatchewan",
"city":"Hampton",
"postalCode": "{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
- "name": "Mailing address"
+ "emailAddress": "contact@mail.com",
+ "businessPhone": "(250) 286-3767",
+ "cellPhone": "(250) 555-3700",
+ "homePhone": "(250) 555-3101",
+ "faxNumber": "(250) 286-3768",
+ "cliLocnComment": "Sample location 00 comment",
+ "locnExpiredInd": "N"
+ },
+ {
+ "clientLocnName": "Accountant's address",
+ "clientLocnCode": "01",
+ "addressOne":"{{randomValue length=4 type='NUMERIC'}} Oak St",
+ "addressTwo":"C/O Mike Oliveira",
+ "addressThree":"",
+ "countryCode":"CA",
+ "countryDesc":"Canada",
+ "provinceCode":"BC",
+ "provinceDesc":"British Columbia",
+ "city":"Deer Lake",
+ "postalCode": "{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
+ "emailAddress": "account@mail.com",
+ "businessPhone": "(250) 286-4767",
+ "cellPhone": "(250) 555-4700",
+ "homePhone": "(250) 555-4101",
+ "faxNumber": "(250) 286-4768",
+ "cliLocnComment": "Sample location 01 comment",
+ "locnExpiredInd": "N"
},
{
- "index": 1,
- "streetAddress":"{{randomValue length=4 type='NUMERIC'}} Oak St",
- "country":"Canada",
- "province":"British Columbia",
+ "clientLocnName": "Warehouse",
+ "clientLocnCode": "02",
+ "addressOne":"{{randomValue length=4 type='NUMERIC'}} Joy St",
+ "addressTwo":"C/O John Wayne",
+ "addressThree":"",
+ "countryCode":"CA",
+ "countryDesc":"Canada",
+ "provinceCode":"BC",
+ "provinceDesc":"British Columbia",
"city":"Deer Lake",
- "postalCode":"{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
- "name": "Accountant's address"
+ "postalCode": "{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
+ "emailAddress": "warehouse@mail.com",
+ "businessPhone": "(250) 286-5767",
+ "cellPhone": "(250) 555-5700",
+ "homePhone": "(250) 555-5101",
+ "faxNumber": "(250) 286-5768",
+ "cliLocnComment": "Sample location 02 comment",
+ "locnExpiredInd": "N"
}
]
}
diff --git a/frontend/stub/__files/response-clients-details-GD.json b/frontend/stub/__files/response-clients-details-GD.json
index 5c6d774f8..9a18a16ef 100644
--- a/frontend/stub/__files/response-clients-details-GD.json
+++ b/frontend/stub/__files/response-clients-details-GD.json
@@ -33,22 +33,44 @@
],
"addresses": [
{
- "index": 0,
- "streetAddress":"{{randomValue length=3 type='NUMERIC'}} Richmond Ave",
- "country":"Canada",
- "province":"Saskatchewan",
+ "clientLocnName": "Mailing address",
+ "clientLocnCode": "00",
+ "addressOne":"{{randomValue length=3 type='NUMERIC'}} Richmond Ave",
+ "addressTwo":"C/O Tony Pineda",
+ "addressThree":"Sample additional info",
+ "countryCode":"CA",
+ "countryDesc":"Canada",
+ "provinceCode":"SK",
+ "provinceDesc":"Saskatchewan",
"city":"Hampton",
"postalCode": "{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
- "name": "Mailing address"
+ "emailAddress": "contact@mail.com",
+ "businessPhone": "(250) 286-3767",
+ "cellPhone": "",
+ "homePhone": "",
+ "faxNumber": "",
+ "cliLocnComment": "Sample location 00 comment",
+ "locnExpiredInd": "Y"
},
{
- "index": 1,
- "streetAddress":"{{randomValue length=4 type='NUMERIC'}} Oak St",
- "country":"Canada",
- "province":"British Columbia",
+ "clientLocnName": "Accountant's address",
+ "clientLocnCode": "01",
+ "addressOne":"{{randomValue length=4 type='NUMERIC'}} Oak St",
+ "addressTwo":"C/O Mike Oliveira",
+ "addressThree":"",
+ "countryCode":"CA",
+ "countryDesc":"Canada",
+ "provinceCode":"BC",
+ "provinceDesc":"British Columbia",
"city":"Deer Lake",
- "postalCode":"{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
- "name": "Accountant's address"
+ "postalCode": "{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
+ "emailAddress": "account@mail.com",
+ "businessPhone": "(250) 286-4767",
+ "cellPhone": "(250) 555-4700",
+ "homePhone": "",
+ "faxNumber": "",
+ "cliLocnComment": "Sample location 01 comment",
+ "locnExpiredInd": "N"
}
]
}
diff --git a/frontend/stub/__files/response-clients-details-I.json b/frontend/stub/__files/response-clients-details-I.json
index 676235035..af174cf53 100644
--- a/frontend/stub/__files/response-clients-details-I.json
+++ b/frontend/stub/__files/response-clients-details-I.json
@@ -34,22 +34,24 @@
],
"addresses": [
{
- "index": 0,
- "streetAddress":"{{randomValue length=3 type='NUMERIC'}} Richmond Ave",
- "country":"Canada",
- "province":"Saskatchewan",
+ "clientLocnName": "Mailing address",
+ "clientLocnCode": "00",
+ "addressOne":"{{randomValue length=3 type='NUMERIC'}} Richmond Ave",
+ "addressTwo":"C/O Tony Pineda",
+ "addressThree":"Sample additional info",
+ "countryCode":"CA",
+ "countryDesc":"Canada",
+ "provinceCode":"SK",
+ "provinceDesc":"Saskatchewan",
"city":"Hampton",
"postalCode": "{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
- "name": "Mailing address"
- },
- {
- "index": 1,
- "streetAddress":"{{randomValue length=4 type='NUMERIC'}} Oak St",
- "country":"Canada",
- "province":"British Columbia",
- "city":"Deer Lake",
- "postalCode":"{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
- "name": "Accountant's address"
+ "emailAddress": "tony.pineda@mail.com",
+ "businessPhone": "(250) 286-3767",
+ "cellPhone": "",
+ "homePhone": "",
+ "faxNumber": "",
+ "cliLocnComment": "Sample location 00 comment",
+ "locnExpiredInd": "N"
}
]
}
diff --git a/frontend/stub/__files/response-clients-details-IV.json b/frontend/stub/__files/response-clients-details-IV.json
index c4700e894..4c715d38f 100644
--- a/frontend/stub/__files/response-clients-details-IV.json
+++ b/frontend/stub/__files/response-clients-details-IV.json
@@ -34,22 +34,24 @@
],
"addresses": [
{
- "index": 0,
- "streetAddress":"{{randomValue length=3 type='NUMERIC'}} Richmond Ave",
- "country":"Canada",
- "province":"Saskatchewan",
+ "clientLocnName": "Mailing address",
+ "clientLocnCode": "00",
+ "addressOne":"{{randomValue length=3 type='NUMERIC'}} Richmond Ave",
+ "addressTwo":"C/O Tony Pineda",
+ "addressThree":"Sample additional info",
+ "countryCode":"CA",
+ "countryDesc":"Canada",
+ "provinceCode":"SK",
+ "provinceDesc":"Saskatchewan",
"city":"Hampton",
"postalCode": "{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
- "name": "Mailing address"
- },
- {
- "index": 1,
- "streetAddress":"{{randomValue length=4 type='NUMERIC'}} Oak St",
- "country":"Canada",
- "province":"British Columbia",
- "city":"Deer Lake",
- "postalCode":"{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
- "name": "Accountant's address"
+ "emailAddress": "tony.pineda@mail.com",
+ "businessPhone": "(250) 286-3767",
+ "cellPhone": "",
+ "homePhone": "",
+ "faxNumber": "",
+ "cliLocnComment": "Sample location 00 comment",
+ "locnExpiredInd": "N"
}
]
}
diff --git a/frontend/stub/__files/response-clients-details-S.json b/frontend/stub/__files/response-clients-details-S.json
index 9e273ce53..381043773 100644
--- a/frontend/stub/__files/response-clients-details-S.json
+++ b/frontend/stub/__files/response-clients-details-S.json
@@ -34,22 +34,44 @@
],
"addresses": [
{
- "index": 0,
- "streetAddress":"{{randomValue length=3 type='NUMERIC'}} Richmond Ave",
- "country":"Canada",
- "province":"Saskatchewan",
+ "clientLocnName": "Mailing address",
+ "clientLocnCode": "00",
+ "addressOne":"{{randomValue length=3 type='NUMERIC'}} Richmond Ave",
+ "addressTwo":"C/O Tony Pineda",
+ "addressThree":"Sample additional info",
+ "countryCode":"CA",
+ "countryDesc":"Canada",
+ "provinceCode":"SK",
+ "provinceDesc":"Saskatchewan",
"city":"Hampton",
"postalCode": "{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
- "name": "Mailing address"
+ "emailAddress": "contact@mail.com",
+ "businessPhone": "(250) 286-3767",
+ "cellPhone": "(250) 555-3700",
+ "homePhone": "(250) 555-3101",
+ "faxNumber": "(250) 286-3768",
+ "cliLocnComment": "Sample location 00 comment",
+ "locnExpiredInd": "N"
},
{
- "index": 1,
- "streetAddress":"{{randomValue length=4 type='NUMERIC'}} Oak St",
- "country":"Canada",
- "province":"British Columbia",
+ "clientLocnName": "Accountant's address",
+ "clientLocnCode": "01",
+ "addressOne":"{{randomValue length=4 type='NUMERIC'}} Oak St",
+ "addressTwo":"C/O Mike Oliveira",
+ "addressThree":"",
+ "countryCode":"CA",
+ "countryDesc":"Canada",
+ "provinceCode":"BC",
+ "provinceDesc":"British Columbia",
"city":"Deer Lake",
- "postalCode":"{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
- "name": "Accountant's address"
+ "postalCode": "{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
+ "emailAddress": "account@mail.com",
+ "businessPhone": "(250) 286-4767",
+ "cellPhone": "(250) 555-4700",
+ "homePhone": "(250) 555-4101",
+ "faxNumber": "(250) 286-4768",
+ "cliLocnComment": "Sample location 01 comment",
+ "locnExpiredInd": "N"
}
]
}
diff --git a/frontend/stub/__files/response-clients-details-SE.json b/frontend/stub/__files/response-clients-details-SE.json
index 8c9544fa9..c57933905 100644
--- a/frontend/stub/__files/response-clients-details-SE.json
+++ b/frontend/stub/__files/response-clients-details-SE.json
@@ -32,22 +32,44 @@
],
"addresses": [
{
- "index": 0,
- "streetAddress":"{{randomValue length=3 type='NUMERIC'}} Richmond Ave",
- "country":"Canada",
- "province":"Saskatchewan",
+ "clientLocnName": "Mailing address",
+ "clientLocnCode": "00",
+ "addressOne":"{{randomValue length=3 type='NUMERIC'}} Richmond Ave",
+ "addressTwo":"C/O Tony Pineda",
+ "addressThree":"Sample additional info",
+ "countryCode":"CA",
+ "countryDesc":"Canada",
+ "provinceCode":"SK",
+ "provinceDesc":"Saskatchewan",
"city":"Hampton",
"postalCode": "{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
- "name": "Mailing address"
+ "emailAddress": "contact@mail.com",
+ "businessPhone": "(250) 286-3767",
+ "cellPhone": "(250) 555-3700",
+ "homePhone": "(250) 555-3101",
+ "faxNumber": "(250) 286-3768",
+ "cliLocnComment": "Sample location 00 comment",
+ "locnExpiredInd": "N"
},
{
- "index": 1,
- "streetAddress":"{{randomValue length=4 type='NUMERIC'}} Oak St",
- "country":"Canada",
- "province":"British Columbia",
+ "clientLocnName": "Accountant's address",
+ "clientLocnCode": "01",
+ "addressOne":"{{randomValue length=4 type='NUMERIC'}} Oak St",
+ "addressTwo":"C/O Mike Oliveira",
+ "addressThree":"",
+ "countryCode":"CA",
+ "countryDesc":"Canada",
+ "provinceCode":"BC",
+ "provinceDesc":"British Columbia",
"city":"Deer Lake",
- "postalCode":"{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
- "name": "Accountant's address"
+ "postalCode": "{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}{{randomValue length=1 type='ALPHABETIC' uppercase=true}}{{randomValue length=1 type='NUMERIC'}}",
+ "emailAddress": "account@mail.com",
+ "businessPhone": "(250) 286-4767",
+ "cellPhone": "(250) 555-4700",
+ "homePhone": "(250) 555-4101",
+ "faxNumber": "(250) 286-4768",
+ "cliLocnComment": "Sample location 01 comment",
+ "locnExpiredInd": "N"
}
]
}
diff --git a/frontend/tests/components/pages/client-details/LocationView.cy.ts b/frontend/tests/components/pages/client-details/LocationView.cy.ts
new file mode 100644
index 000000000..b69e2ef9f
--- /dev/null
+++ b/frontend/tests/components/pages/client-details/LocationView.cy.ts
@@ -0,0 +1,161 @@
+import type { ClientLocation } from "@/dto/CommonTypesDto";
+import LocationView from "@/pages/client-details/LocationView.vue";
+
+describe("
", () => {
+ const getDefaultProps = () => ({
+ data: {
+ clientLocnName: "Mailing address",
+ clientLocnCode: "00",
+ addressOne: "886 Richmond Ave",
+ addressTwo: "C/O Tony Pineda",
+ addressThree: "Sample additional info",
+ countryCode: "CA",
+ countryDesc: "Canada",
+ provinceCode: "SK",
+ provinceDesc: "Saskatchewan",
+ city: "Hampton",
+ postalCode: "T4G5J1",
+ emailAddress: "contact@mail.com",
+ businessPhone: "(250) 286-3767",
+ cellPhone: "(250) 555-3700",
+ homePhone: "(250) 555-3101",
+ faxNumber: "(250) 286-3768",
+ cliLocnComment: "Sample location 00 comment",
+ locnExpiredInd: "N",
+ } as ClientLocation,
+ });
+
+ let currentProps: ReturnType
= null;
+ const mount = (props = getDefaultProps()) => {
+ currentProps = props;
+ return cy
+ .mount(LocationView, {
+ props,
+ })
+ .its("wrapper")
+ .as("vueWrapper");
+ };
+
+ const testField = (selector: string, value: string, linkPrefix?: string) => {
+ cy.get(selector).should("be.visible");
+ cy.get(selector).contains(value);
+ expect(value.length).to.be.greaterThan(0);
+
+ if (linkPrefix) {
+ cy.get(selector).within(() => {
+ cy.get("a").should("have.attr", "href", `${linkPrefix}${value}`);
+ });
+ }
+ };
+
+ const testFieldHidden = (selector: string) => {
+ cy.get(selector).should("not.exist");
+ };
+
+ it("renders the ClientLocation component", () => {
+ mount();
+
+ cy.get("#location-00-address-section").within(() => {
+ testField("#location-00-addressTwo", currentProps.data.addressTwo);
+ testField("#location-00-addressThree", currentProps.data.addressThree);
+ testField("#location-00-streetAddress", currentProps.data.addressOne);
+
+ // City, Province
+ testField(
+ "#location-00-city-province",
+ `${currentProps.data.city}, ${currentProps.data.provinceDesc}`,
+ );
+
+ testField("#location-00-country", currentProps.data.countryDesc);
+ testField("#location-00-postalCode", currentProps.data.postalCode);
+ });
+
+ const emailPrefix = "mailto:";
+
+ cy.get("#location-00-email-section").within(() => {
+ testField("#location-00-emailAddress", currentProps.data.emailAddress, emailPrefix);
+ });
+
+ const phonePrefix = "tel:";
+
+ cy.get("#location-00-phone-section").within(() => {
+ testField("#location-00-primaryPhoneNumber", currentProps.data.businessPhone, phonePrefix);
+ testField("#location-00-secondaryPhoneNumber", currentProps.data.cellPhone, phonePrefix);
+ testField("#location-00-tertiaryPhoneNumber", currentProps.data.homePhone, phonePrefix);
+ testField("#location-00-fax", currentProps.data.faxNumber, phonePrefix);
+ });
+
+ cy.get("#location-00-notes-section").within(() => {
+ testField("#location-00-notes", currentProps.data.cliLocnComment);
+ });
+ });
+
+ it("hides sections when they are empty", () => {
+ const data: ClientLocation = {
+ ...getDefaultProps().data,
+ addressTwo: "",
+ addressThree: "",
+ emailAddress: "",
+ businessPhone: "",
+ cellPhone: "",
+ homePhone: "",
+ faxNumber: "",
+ cliLocnComment: "",
+ };
+ mount({ data });
+
+ cy.get("#location-00-email-section").should("not.exist");
+ cy.get("#location-00-phone-section").should("not.exist");
+ cy.get("#location-00-notes-section").should("not.exist");
+ });
+
+ it("hides address fields when they are empty", () => {
+ const data: ClientLocation = {
+ ...getDefaultProps().data,
+ addressTwo: "",
+ addressThree: "",
+ };
+ mount({ data });
+
+ testFieldHidden("#location-00-addressTwo");
+ testFieldHidden("#location-00-addressThree");
+ });
+
+ describe("while there is at least one phone to be displayed", () => {
+ const scenarios = [
+ ["businessPhone", "#location-00-primaryPhoneNumber"],
+ ["cellPhone", "#location-00-secondaryPhoneNumber"],
+ ["homePhone", "#location-00-tertiaryPhoneNumber"],
+ ["faxNumber", "#location-00-fax"],
+ ];
+
+ scenarios.forEach((scenario) => {
+ const [propName, selector] = scenario;
+ const otherPhonesList = scenarios.filter((cur) => cur[0] !== propName);
+ describe(propName, () => {
+ beforeEach(() => {
+ const data: ClientLocation = {
+ ...getDefaultProps().data,
+ businessPhone: "",
+ cellPhone: "",
+ homePhone: "",
+ faxNumber: "",
+ [propName]: "(250) 555-9876",
+ };
+ mount({ data });
+ });
+ it(`displays the one phone with value: ${propName}`, () => {
+ cy.get("#location-00-phone-section").within(() => {
+ testField(selector, currentProps.data[propName]);
+ });
+ });
+ it("hides the other empty phones", () => {
+ otherPhonesList.forEach((cur) => {
+ const [, curSelector] = cur;
+ testFieldHidden(curSelector);
+ });
+ });
+ });
+ });
+ });
+});