Last active
January 5, 2016 21:39
-
-
Save jaymiejones86/965d89374d5196e7f061 to your computer and use it in GitHub Desktop.
React select box selection
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
scenario 'I can select an option through js rendered element', js: true do | |
fill_in 'email', with: '[email protected]' | |
script = "$('#role').val('admin')" | |
page.execute_script(script) | |
page.execute_script("React.addons.TestUtils.Simulate.change(document.getElementById('role'))") | |
click_button 'Add User' | |
expect(unread_emails_for('[email protected]').size).to eq(1) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment