2020-10-05 08:49:05 -04:00
|
|
|
import React from 'react';
|
|
|
|
import {mountWithIntl} from '../../helpers/intl-helpers.jsx';
|
|
|
|
import MuteStep from '../../../src/components/modal/mute/mute-step';
|
|
|
|
|
|
|
|
describe('MuteStepTest', () => {
|
2023-10-24 14:22:28 -04:00
|
|
|
test('Mute Step with no images', () => {
|
2020-10-05 08:49:05 -04:00
|
|
|
const component = mountWithIntl(
|
|
|
|
<MuteStep
|
|
|
|
header="header text"
|
|
|
|
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
expect(component.find('div.mute-step').exists()).toEqual(true);
|
|
|
|
expect(component.find('div.mute-header').exists()).toEqual(true);
|
|
|
|
expect(component.find('div.mute-right-column').exists()).toEqual(true);
|
|
|
|
// No images and no left column.
|
|
|
|
expect(component.find('img').exists()).toEqual(false);
|
|
|
|
expect(component.find('div.left-column').exists()).toEqual(false);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2023-10-24 14:22:28 -04:00
|
|
|
test('Mute Step with side image', () => {
|
2020-10-05 08:49:05 -04:00
|
|
|
const component = mountWithIntl(
|
|
|
|
<MuteStep
|
|
|
|
sideImg="/path/to/img.png"
|
|
|
|
sideImgClass="side-img"
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
expect(component.find('div.mute-step').exists()).toEqual(true);
|
|
|
|
expect(component.find('div.mute-header').exists()).toEqual(true);
|
|
|
|
expect(component.find('div.mute-right-column').exists()).toEqual(true);
|
|
|
|
expect(component.find('div.left-column').exists()).toEqual(true);
|
|
|
|
expect(component.find('img.side-img').exists()).toEqual(true);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2023-10-24 14:22:28 -04:00
|
|
|
test('Mute Step with bottom image', () => {
|
2020-10-05 08:49:05 -04:00
|
|
|
const component = mountWithIntl(
|
|
|
|
<MuteStep
|
|
|
|
bottomImg="/path/to/img.png"
|
|
|
|
bottomImgClass="bottom-image"
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
expect(component.find('div.mute-step').exists()).toEqual(true);
|
|
|
|
expect(component.find('div.mute-header').exists()).toEqual(true);
|
|
|
|
expect(component.find('div.mute-right-column').exists()).toEqual(true);
|
|
|
|
expect(component.find('img.bottom-image').exists()).toEqual(true);
|
|
|
|
});
|
|
|
|
});
|