This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
en: | |
views: | |
pagination: | |
first: "« First" | |
last: "Last»" | |
previous: "‹ Prev" | |
next: "Next ›" | |
truncate: "…" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Enzyme, { mount } from 'enzyme'; | |
// mount a component with props | |
const loginProps = { title: 'Login Form' } | |
const loginForm = mount(<LoginPage {...loginProps} />); | |
// access child component based on prop key value | |
const passwordField = loginForm.find('FormItem').filterWhere((item => { | |
return item.prop('name') === 'password'; | |
})); |