Skip to content

Commit

Permalink
【ut】fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongjiaojiao committed Oct 23, 2024
1 parent e7a44df commit 3af3bb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ describe('LayerHighlight.vue', () => {
highlightStyle: {}
}
});
const setSpy = jest.spyOn(wrapper.vm.viewModel, 'clickTolerance');
const setSpy = jest.spyOn(wrapper.vm.viewModel, 'setClickTolerance');
wrapper.setProps({ clickTolerance: 8 });
wrapper.vm.$nextTick();
expect(setSpy).toBeCalled();
Expand Down
6 changes: 3 additions & 3 deletions src/mapboxgl/map-popup/__tests__/MapPopup.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('MapPopup.vue', () => {
expect(wrapper.find('.sm-component-map-popup__self-content').exists()).toBe(true);
expect(wrapper.vm.currentIndex).toBe(0);
expect(wrapper.vm.headerTitle).toBe('图层1');
expect(wrapper.vm.tablePopupProps).toEqual({ data: data[0], columns: columns });
expect(wrapper.vm.tablePopupProps).toEqual({ data: data[0], columns: columns, showHeader: true, background: 'transparent', color: 'inherit' });

done();
});
Expand Down Expand Up @@ -129,7 +129,7 @@ describe('MapPopup.vue', () => {
expect(wrapper.vm.showIcon).toBe(true);
expect(wrapper.vm.headerTitle).toBe('2/2');
expect(wrapper.vm.currentCoordinate).toEqual([120, 31]);
expect(wrapper.vm.tablePopupProps).toEqual({ data: data[1], columns: columns });
expect(wrapper.vm.tablePopupProps).toEqual({ data: data[1], columns: columns, showHeader: true, background: 'transparent', color: 'inherit' });
done();
});
it('trigger change index', done => {
Expand All @@ -155,7 +155,7 @@ describe('MapPopup.vue', () => {
});
wrapper.find('.right-icon').trigger('click');
expect(wrapper.vm.currentCoordinate).toEqual([120, 31]);
expect(wrapper.vm.tablePopupProps).toEqual({ data: data[1], columns: columns });
expect(wrapper.vm.tablePopupProps).toEqual({ data: data[1], columns: columns, showHeader: true, background: 'transparent', color: 'inherit' });
done();
});
it('change background', done => {
Expand Down

0 comments on commit 3af3bb1

Please sign in to comment.