Skip to content

Commit

Permalink
Feedback prompt, shallow to mount, codeforboston#966
Browse files Browse the repository at this point in the history
  • Loading branch information
knod committed Nov 4, 2018
1 parent 71c1687 commit a1a9e64
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 39 deletions.
4 changes: 2 additions & 2 deletions src/test/components/prompts/FeedbackPrompt.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { shallow } from 'enzyme';
import { mount } from 'enzyme';


import FeedbackPrompt from '../../../components/prompts/FeedbackPrompt';
Expand All @@ -12,7 +12,7 @@ test('A feedback prompt should match the snapshot', () => {
leaveText: 'Reset',
};

const wrapper = shallow(
const wrapper = mount(
<FeedbackPrompt
{ ...promptData }
isBlocking={ isBlocking }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,32 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`A feedback prompt should match the snapshot 1`] = `
<Modal
closeOnDimmerClick={true}
closeOnDocumentClick={false}
dimmer={true}
eventPool="Modal"
mountNode={null}
<FeedbackPrompt
header="Test prompt data"
isBlocking={true}
leaveText="Reset"
openFeedback={[Function]}
>
<ModalHeader>
Test prompt data
</ModalHeader>
<ModalContent>
<p>
</p>
</ModalContent>
<ModalActions>
<Button
as="button"
onClick={[Function]}
>
Cancel
</Button>
<Button
as="button"
onClick={[Function]}
>
Reset
</Button>
<Button
as="button"
onClick={[Function]}
primary={true}
>
Tell Us More
</Button>
</ModalActions>
</Modal>
<Modal
closeOnDimmerClick={true}
closeOnDocumentClick={false}
dimmer={true}
eventPool="Modal"
mountNode={null}
>
<Portal
className="ui page modals dimmer transition visible active"
closeOnDocumentClick={false}
closeOnEscape={true}
closeOnRootNodeClick={true}
eventPool="Modal"
mountNode={<body />}
onClose={[Function]}
onMount={[Function]}
onOpen={[Function]}
onUnmount={[Function]}
openOnTriggerClick={true}
/>
</Modal>
</FeedbackPrompt>
`;

0 comments on commit a1a9e64

Please sign in to comment.