import { mount } from '../../../test';
test('icon slot', () => {
const wrapper = mount({
template: `
Custim Inactive Icon
A
Custim Active Icon
B
Custim Inactive Icon
C
`,
});
expect(wrapper).toMatchSnapshot();
});
test('click-step event', () => {
const onClickStep = jest.fn();
const wrapper = mount({
template: `
A
B
C
`,
methods: {
onClickStep,
},
});
wrapper.find('.van-step').trigger('click');
expect(onClickStep).toHaveBeenCalledTimes(0);
wrapper.find('.van-step__title').trigger('click');
expect(onClickStep).toHaveBeenCalledWith(0);
wrapper.findAll('.van-step__circle-container').at(2).trigger('click');
expect(onClickStep).toHaveBeenCalledTimes(2);
expect(onClickStep).toHaveBeenLastCalledWith(2);
});