From 6933a7ade7f25263b4f40e0602e7741ed22e616c Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Fri, 30 Aug 2024 08:05:30 -0500 Subject: [PATCH] SSR-776 Linting and Map Pins zIndex --- src/iss-components/google-map/google-map.spec.js | 13 ++++++------- src/iss-components/google-map/google-map.vue | 3 ++- src/layouts/tpa-search/tpa-search.spec.js | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/iss-components/google-map/google-map.spec.js b/src/iss-components/google-map/google-map.spec.js index 3b4b9d37..631cfe71 100644 --- a/src/iss-components/google-map/google-map.spec.js +++ b/src/iss-components/google-map/google-map.spec.js @@ -316,7 +316,7 @@ describe('Google Map', () => { await awaitingSetupTicks(wrapper); const numberOfExtendCallsDuringMount = 2; - mockGeocode.mockImplementation((obj) => { + mockGeocode.mockImplementation(() => { const result = { results: [ { geometry: { location: 'p1' } } @@ -329,8 +329,7 @@ describe('Google Map', () => { const result = wrapper.vm.getBounds(locations); // Assert - expect(mockExtend).toHaveBeenCalledTimes( - numberOfExtendCallsDuringMount + numberOfExtendCallsPostMount); + expect(mockExtend).toHaveBeenCalledTimes(numberOfExtendCallsDuringMount + numberOfExtendCallsPostMount); expect(result).toBe(mockLatLngBound); } ); @@ -392,7 +391,7 @@ describe('Google Map', () => { expect(mockGeocode).toHaveBeenCalledTimes(numberOfCallsFromMount); // Act - await wrapper.vm.getLocationsFromAddresses(addresses?.map((a) => ({fullAddress: a}))); + await wrapper.vm.getLocationsFromAddresses(addresses?.map((a) => ({ fullAddress: a }))); await wrapper.vm.$nextTick(); // Assert @@ -404,7 +403,7 @@ describe('Google Map', () => { // Arrange const wrapper = shallowMount(googleMap, {}); await awaitingSetupTicks(wrapper); - const addresses = ['a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8'].map((a) => ({fullAddress: a})); + const addresses = ['a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8'].map((a) => ({ fullAddress: a })); mockGeocode.mockImplementationOnce(() => null) .mockImplementationOnce(() => ({ results: null })) .mockImplementationOnce(() => ({ results: [] })) @@ -432,7 +431,7 @@ describe('Google Map', () => { const expectedResult = ['some value', 'some other value']; // Act - const result = (await wrapper.vm.getLocationsFromAddresses(addresses)).map(a => a.position); + const result = (await wrapper.vm.getLocationsFromAddresses(addresses)).map((a) => a.position); // Assert expect(result.length).toBe(2); @@ -507,7 +506,7 @@ describe('Google Map', () => { Promise.resolve(obj.address.includes(zipCode) ? zipCodeGeocodeResult : shopGeocodeResult)); - const addresses = [{fullAddress:'a1'}, {fullAddress:'a2'}]; + const addresses = [{ fullAddress: 'a1' }, { fullAddress: 'a2' }]; const { wrapper } = getMountedComponent({}, { zipCode }); await awaitingSetupTicks(wrapper); diff --git a/src/iss-components/google-map/google-map.vue b/src/iss-components/google-map/google-map.vue index 1cf5840f..b3f1a7f5 100644 --- a/src/iss-components/google-map/google-map.vue +++ b/src/iss-components/google-map/google-map.vue @@ -63,7 +63,8 @@ export default { map, position: provider.position, title: provider.companyName, - content: pin.element + content: pin.element, + zIndex: 1000 - index }); this.createMarkerInfoWindows(marker, provider); }); diff --git a/src/layouts/tpa-search/tpa-search.spec.js b/src/layouts/tpa-search/tpa-search.spec.js index 1e1b1945..e74394cf 100644 --- a/src/layouts/tpa-search/tpa-search.spec.js +++ b/src/layouts/tpa-search/tpa-search.spec.js @@ -177,7 +177,7 @@ describe('TPA search page', () => { // Assert expect(map.exists()).toBeTruthy(); expect(map.classes()).toContain('mb-4'); - expect(map.props().providers.map(p => p.fullAddress)).toEqual(expectedAddresses); + expect(map.props().providers.map((p) => p.fullAddress)).toEqual(expectedAddresses); expect(map.props().zipCode).toBe(zipCode); }); test('search radius filter', async () => { @@ -582,7 +582,7 @@ describe('TPA search page', () => { ]; // Act - const result = wrapper.vm.providerAddresses.map(pa => pa.fullAddress); + const result = wrapper.vm.providerAddresses.map((pa) => pa.fullAddress); // Assert expect(result).toEqual(expectedResult);