ruby - Click not working with react component + capypara -


i've react component when click in icon, state change , put input instead of icon.

when try simulate on test, using capybara component doesn't change.

there's chance click doesn't work @ component because of capybara? or not work because it's react component?

component:

render() {   return (     <div>       { this.state.editable ? this.rendereditablecomponent() : this.rendernoteditablecomponent() }     </div> ) }    rendereditablecomponent() {    return (     <editabledeliverlimit       value={ this.state.value }       handleclick={ this.handleclick.bind(this) } />   ) }    rendernoteditablecomponent() {     return (       <noteditabledeliverlimit        value={ this.state.value }        handleclick={ this.handleclick.bind(this) } />   ) } 

test:

then "should successfuly change deliver limit"   wait_for_selector_appearance("##{ad_table_row_id(@ad)} .ad-table-row-deliver-limit span")   find("##{ad_table_row_id(@ad)} .ad-table-row-deliver-limit span").click   wait_for_selector_disappearance("##{ad_table_row_id(@ad)} .ad-table-row-deliver-limit span") end 

the version of phantomjs , qt webkit using outdated , don't support function.prototype.bind required react. upgrade phantomjs 2.1.1+ , rebuild capybara-webkit qt 5.5.1


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -