Formatting
This commit is contained in:
parent
5be62aefb0
commit
05df252bb6
1 changed files with 14 additions and 8 deletions
|
|
@ -16,14 +16,16 @@ describe("Service Location Review Block", () => {
|
||||||
const props = generateDefaultProps();
|
const props = generateDefaultProps();
|
||||||
|
|
||||||
const { wrapper } = setupMocks({
|
const { wrapper } = setupMocks({
|
||||||
propsData: props
|
propsData: props,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await wrapper.vm.$nextTick();
|
await wrapper.vm.$nextTick();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(wrapper.vm.displayContent).toEqual(["Mobile Address 1, Mobile Address 2, Mobile City, MO 11111"]);
|
expect(wrapper.vm.displayContent).toEqual([
|
||||||
|
"Mobile Address 1, Mobile Address 2, Mobile City, MO 11111",
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should render service location address if inshop appointment.", async () => {
|
it("Should render service location address if inshop appointment.", async () => {
|
||||||
|
|
@ -33,14 +35,16 @@ describe("Service Location Review Block", () => {
|
||||||
props.serviceLocation.appointmentType = AppointmentTypeStrings.IN_SHOP;
|
props.serviceLocation.appointmentType = AppointmentTypeStrings.IN_SHOP;
|
||||||
|
|
||||||
const { wrapper } = setupMocks({
|
const { wrapper } = setupMocks({
|
||||||
propsData: props
|
propsData: props,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await wrapper.vm.$nextTick();
|
await wrapper.vm.$nextTick();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(wrapper.vm.displayContent).toEqual(["Service Location Address, Service Location City, SL 22222"]);
|
expect(wrapper.vm.displayContent).toEqual([
|
||||||
|
"Service Location Address, Service Location City, SL 22222",
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should render service location address if drop-off appointment", async () => {
|
it("Should render service location address if drop-off appointment", async () => {
|
||||||
|
|
@ -50,14 +54,16 @@ describe("Service Location Review Block", () => {
|
||||||
props.serviceLocation.appointmentType = AppointmentTypeStrings.DROP_OFF;
|
props.serviceLocation.appointmentType = AppointmentTypeStrings.DROP_OFF;
|
||||||
|
|
||||||
const { wrapper } = setupMocks({
|
const { wrapper } = setupMocks({
|
||||||
propsData: props
|
propsData: props,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await wrapper.vm.$nextTick();
|
await wrapper.vm.$nextTick();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(wrapper.vm.displayContent).toEqual(["Service Location Address, Service Location City, SL 22222"]);
|
expect(wrapper.vm.displayContent).toEqual([
|
||||||
|
"Service Location Address, Service Location City, SL 22222",
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should not add comma or any text if address2 is null", async () => {
|
it("Should not add comma or any text if address2 is null", async () => {
|
||||||
|
|
@ -67,7 +73,7 @@ describe("Service Location Review Block", () => {
|
||||||
props.serviceLocation.address2 = null;
|
props.serviceLocation.address2 = null;
|
||||||
|
|
||||||
const { wrapper } = setupMocks({
|
const { wrapper } = setupMocks({
|
||||||
propsData: props
|
propsData: props,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
@ -120,4 +126,4 @@ function setupMocks(customMountOptions) {
|
||||||
const wrapper = shallowMount(serviceLocationReview, mountOptions);
|
const wrapper = shallowMount(serviceLocationReview, mountOptions);
|
||||||
wrapper.vm.setCmsContent = jest.fn();
|
wrapper.vm.setCmsContent = jest.fn();
|
||||||
return { wrapper };
|
return { wrapper };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue