DigitalConsumer.FixMyGlass/src/commonComponents/vehicleBanner/vehicleBanner.spec.js
2021-11-10 10:27:45 -05:00

41 lines
1,003 B
JavaScript

import { mount } from '@vue/test-utils';
import vehicleBanner from './vehicleBanner';
describe('vehicleBanner with no props', () => {
const wrapper = mount(vehicleBanner, {
propsData: {}
});
it('renders the blurrycar image', () => {
expect(wrapper.find('img').attributes('class')).toContain('blurrycar');
})
});
describe('vehicleBanner with isBlurred true', () => {
const wrapper = mount(vehicleBanner, {
propsData: {
isBlurred: true,
carId: "00test"
}
});
it('renders the blurrycar image', () => {
expect(wrapper.find('img').attributes('class')).toContain('blurrycar');
})
});
describe('vehicleBanner with valid src image', () => {
const wrapper = mount(vehicleBanner, {
propsData: {
carId: "00test"
}
});
it('does not render the blurry image', () => {
expect(wrapper.find('img').attributes('class')).not.toContain('blurrycar');
})
});