From 6e72f6b4eef87e2a4989c3c3409e5cb6cadee243 Mon Sep 17 00:00:00 2001 From: picklesrus Date: Mon, 5 Oct 2020 08:49:05 -0400 Subject: [PATCH] Add mute-step unit test. --- test/unit/components/mute-step.test.jsx | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 test/unit/components/mute-step.test.jsx diff --git a/test/unit/components/mute-step.test.jsx b/test/unit/components/mute-step.test.jsx new file mode 100644 index 000000000..1d77e5d7e --- /dev/null +++ b/test/unit/components/mute-step.test.jsx @@ -0,0 +1,49 @@ +import React from 'react'; +import {mountWithIntl} from '../../helpers/intl-helpers.jsx'; +import MuteStep from '../../../src/components/modal/mute/mute-step'; + +describe('MuteStepTest', () => { + test('Mute Step with no images ', () => { + const component = mountWithIntl( + + ); + 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); + + }); + + test('Mute Step with side image ', () => { + const component = mountWithIntl( + + ); + 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); + + }); + + test('Mute Step with bottom image ', () => { + const component = mountWithIntl( + + ); + 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); + }); +});