diff --git a/src/components/sound-editor/sound-editor.jsx b/src/components/sound-editor/sound-editor.jsx index 8306229ebe8bb508ef4816d324a5b626074ead03..316a0e2cb4ed09e65cc95ed33c77010040e2a0fb 100644 --- a/src/components/sound-editor/sound-editor.jsx +++ b/src/components/sound-editor/sound-editor.jsx @@ -15,8 +15,6 @@ import styles from './sound-editor.css'; import playIcon from '../record-modal/icon--play.svg'; import stopIcon from '../record-modal/icon--stop-playback.svg'; -import trimIcon from './icon--trim.svg'; -import trimConfirmIcon from './icon--trim-confirm.svg'; import redoIcon from './icon--redo.svg'; import undoIcon from './icon--undo.svg'; import echoIcon from './icon--echo.svg'; diff --git a/test/unit/components/__snapshots__/sound-editor.test.jsx.snap b/test/unit/components/__snapshots__/sound-editor.test.jsx.snap index e589ce5bc3ae857a690ecc38fbb8e6f9c0e973d9..950a257045438c654ee0358e9de3a699eb582922 100644 --- a/test/unit/components/__snapshots__/sound-editor.test.jsx.snap +++ b/test/unit/components/__snapshots__/sound-editor.test.jsx.snap @@ -60,7 +60,59 @@ exports[`Sound Editor Component matches snapshot 1`] = ` </div> </div> <div - className="undefined" + className={undefined} + > + <div + className="" + onClick={undefined} + role="button" + > + <img + className={undefined} + draggable={false} + src="test-file-stub" + /> + <div + className={undefined} + > + Copy + </div> + </div> + <div + className="" + onClick={undefined} + role="button" + > + <img + className={undefined} + draggable={false} + src="test-file-stub" + /> + <div + className={undefined} + > + Paste + </div> + </div> + <div + className="" + onClick={undefined} + role="button" + > + <img + className={undefined} + draggable={false} + src="test-file-stub" + /> + <div + className={undefined} + > + Copy to New + </div> + </div> + </div> + <div + className="" onClick={[Function]} role="button" > @@ -72,9 +124,7 @@ exports[`Sound Editor Component matches snapshot 1`] = ` <div className={undefined} > - <span> - Save - </span> + Delete </div> </div> </div> diff --git a/test/unit/components/sound-editor.test.jsx b/test/unit/components/sound-editor.test.jsx index efb153b1ffb8fa6ac93a0dd054d1f072f882b511..7fd465241820834905714e7b795a1dfa5b9024fd 100644 --- a/test/unit/components/sound-editor.test.jsx +++ b/test/unit/components/sound-editor.test.jsx @@ -13,8 +13,8 @@ describe('Sound Editor Component', () => { playhead: 0.5, trimStart: 0.2, trimEnd: 0.8, - onActivateTrim: jest.fn(), onChangeName: jest.fn(), + onDelete: jest.fn(), onPlay: jest.fn(), onRedo: jest.fn(), onReverse: jest.fn(), @@ -36,19 +36,7 @@ describe('Sound Editor Component', () => { expect(component.toJSON()).toMatchSnapshot(); }); - test('trim button appears when trims are null', () => { - const wrapper = mountWithIntl( - <SoundEditor - {...props} - trimEnd={null} - trimStart={null} - /> - ); - wrapper.find('[children="Trim"]').simulate('click'); - expect(props.onActivateTrim).toHaveBeenCalled(); - }); - - test('save button appears when trims are not null', () => { + test('delete button appears when selection is not null', () => { const wrapper = mountWithIntl( <SoundEditor {...props} @@ -56,8 +44,8 @@ describe('Sound Editor Component', () => { trimStart={0.25} /> ); - wrapper.find('[children="Save"]').simulate('click'); - expect(props.onActivateTrim).toHaveBeenCalled(); + wrapper.find('[children="Delete"]').simulate('click'); + expect(props.onDelete).toHaveBeenCalled(); }); test('play button appears when playhead is null', () => {