Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

Commit

Permalink
adding 'prompt' test for Modal
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Aug 19, 2016
1 parent 09fb277 commit 5f533e1
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/Modal/__tests__/__snapshots__/index-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,55 @@ exports[`Modal renders an confirm modal 1`] = `
</div>
`;

exports[`Modal renders an prompt modal 1`] = `
<div>
<button
handleOpen={[Function anonymous]}>
Open
</button>
<div
aria-hidden={false}
className="uk-modal"
onClick={false}
style={
Object {
"display": false
}
}>
<div
className="uk-modal-dialog"
onClick={[Function anonymous]}>
<div
className="uk-margin-small-top uk-modal-content uk-form">
<p>
<input
className="uk-width-1-1"
type="text" />
</p>
</div>
<div
className="uk-modal-footer uk-text-right">
<button
className="uk-button"
onClick={[Function anonymous]}
type="button">
Cancel
</button>
<span>
 
</span>
<button
className="uk-button uk-button-primary"
onClick={[Function anonymous]}
type="button">
Ok
</button>
</div>
</div>
</div>
</div>
`;

exports[`Modal renders correctly 1`] = `
<div>
<button
Expand Down
11 changes: 11 additions & 0 deletions src/Modal/__tests__/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,15 @@ describe('Modal', () => {
)
expect(component.toJSON()).toMatchSnapshot()
})

it('renders an prompt modal', () => {
const component = renderer.create(
<Modal
type="prompt"
>
Please enter the name of the repo you're deleting:
</Modal>
)
expect(component.toJSON()).toMatchSnapshot()
})
})

0 comments on commit 5f533e1

Please sign in to comment.