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);
|
||||
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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue