SSR-776 Linting and Map Pins zIndex
This commit is contained in:
parent
20774378ec
commit
6933a7ade7
3 changed files with 10 additions and 10 deletions
|
|
@ -316,7 +316,7 @@ describe('Google Map', () => {
|
||||||
await awaitingSetupTicks(wrapper);
|
await awaitingSetupTicks(wrapper);
|
||||||
const numberOfExtendCallsDuringMount = 2;
|
const numberOfExtendCallsDuringMount = 2;
|
||||||
|
|
||||||
mockGeocode.mockImplementation((obj) => {
|
mockGeocode.mockImplementation(() => {
|
||||||
const result = {
|
const result = {
|
||||||
results: [
|
results: [
|
||||||
{ geometry: { location: 'p1' } }
|
{ geometry: { location: 'p1' } }
|
||||||
|
|
@ -329,8 +329,7 @@ describe('Google Map', () => {
|
||||||
const result = wrapper.vm.getBounds(locations);
|
const result = wrapper.vm.getBounds(locations);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(mockExtend).toHaveBeenCalledTimes(
|
expect(mockExtend).toHaveBeenCalledTimes(numberOfExtendCallsDuringMount + numberOfExtendCallsPostMount);
|
||||||
numberOfExtendCallsDuringMount + numberOfExtendCallsPostMount);
|
|
||||||
expect(result).toBe(mockLatLngBound);
|
expect(result).toBe(mockLatLngBound);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -392,7 +391,7 @@ describe('Google Map', () => {
|
||||||
expect(mockGeocode).toHaveBeenCalledTimes(numberOfCallsFromMount);
|
expect(mockGeocode).toHaveBeenCalledTimes(numberOfCallsFromMount);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await wrapper.vm.getLocationsFromAddresses(addresses?.map((a) => ({fullAddress: a})));
|
await wrapper.vm.getLocationsFromAddresses(addresses?.map((a) => ({ fullAddress: a })));
|
||||||
await wrapper.vm.$nextTick();
|
await wrapper.vm.$nextTick();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
|
|
@ -404,7 +403,7 @@ describe('Google Map', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const wrapper = shallowMount(googleMap, {});
|
const wrapper = shallowMount(googleMap, {});
|
||||||
await awaitingSetupTicks(wrapper);
|
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)
|
mockGeocode.mockImplementationOnce(() => null)
|
||||||
.mockImplementationOnce(() => ({ results: null }))
|
.mockImplementationOnce(() => ({ results: null }))
|
||||||
.mockImplementationOnce(() => ({ results: [] }))
|
.mockImplementationOnce(() => ({ results: [] }))
|
||||||
|
|
@ -432,7 +431,7 @@ describe('Google Map', () => {
|
||||||
const expectedResult = ['some value', 'some other value'];
|
const expectedResult = ['some value', 'some other value'];
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
const result = (await wrapper.vm.getLocationsFromAddresses(addresses)).map(a => a.position);
|
const result = (await wrapper.vm.getLocationsFromAddresses(addresses)).map((a) => a.position);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(result.length).toBe(2);
|
expect(result.length).toBe(2);
|
||||||
|
|
@ -507,7 +506,7 @@ describe('Google Map', () => {
|
||||||
Promise.resolve(obj.address.includes(zipCode)
|
Promise.resolve(obj.address.includes(zipCode)
|
||||||
? zipCodeGeocodeResult
|
? zipCodeGeocodeResult
|
||||||
: shopGeocodeResult));
|
: shopGeocodeResult));
|
||||||
const addresses = [{fullAddress:'a1'}, {fullAddress:'a2'}];
|
const addresses = [{ fullAddress: 'a1' }, { fullAddress: 'a2' }];
|
||||||
const { wrapper } = getMountedComponent({}, { zipCode });
|
const { wrapper } = getMountedComponent({}, { zipCode });
|
||||||
await awaitingSetupTicks(wrapper);
|
await awaitingSetupTicks(wrapper);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,8 @@ export default {
|
||||||
map,
|
map,
|
||||||
position: provider.position,
|
position: provider.position,
|
||||||
title: provider.companyName,
|
title: provider.companyName,
|
||||||
content: pin.element
|
content: pin.element,
|
||||||
|
zIndex: 1000 - index
|
||||||
});
|
});
|
||||||
this.createMarkerInfoWindows(marker, provider);
|
this.createMarkerInfoWindows(marker, provider);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ describe('TPA search page', () => {
|
||||||
// Assert
|
// Assert
|
||||||
expect(map.exists()).toBeTruthy();
|
expect(map.exists()).toBeTruthy();
|
||||||
expect(map.classes()).toContain('mb-4');
|
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);
|
expect(map.props().zipCode).toBe(zipCode);
|
||||||
});
|
});
|
||||||
test('search radius filter', async () => {
|
test('search radius filter', async () => {
|
||||||
|
|
@ -582,7 +582,7 @@ describe('TPA search page', () => {
|
||||||
];
|
];
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
const result = wrapper.vm.providerAddresses.map(pa => pa.fullAddress);
|
const result = wrapper.vm.providerAddresses.map((pa) => pa.fullAddress);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(result).toEqual(expectedResult);
|
expect(result).toEqual(expectedResult);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue