[ https://issues.apache.org/jira/browse/GROOVY-7373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles reassigned GROOVY-7373: ----------------------------------- Assignee: Eric Milles > Interact Closures withing Groovy Trait methods are not recognized by the > implementing class > ------------------------------------------------------------------------------------------- > > Key: GROOVY-7373 > URL: https://issues.apache.org/jira/browse/GROOVY-7373 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime > Affects Versions: 2.4.0, 2.4.1, 2.4.2, 2.4.3 > Environment: Win 7x64 > Ubuntu 14.04 (Gnome) > Ubuntu 12.04 > Java: 1.8.0_40-b26 > Reporter: Lee Davis > Assignee: Eric Milles > Priority: Major > Labels: closure, geb, groovy, interact, spock, traits > > Since moving to grails 2.5.0 (groovy 2.4.x) our functional tests (geb/spock) > are failing when we try to run interact closures inside of a trait. I'm not > entirely sure who owns this one as there are three or four players groovy, > grails, geb/spock, but groovy seemed like the most logical culprit. > {code:Java|title=Example Usage} > trait DoStuff { > def clickItemOnPage() { > interact { > moveToElement($('.myDiv')) > click() > } > } > } > class MySpec extends GebReportingSpec implements DoStuff { > def clickItemOnPage2() { > interact { > moveToElement($('.myDiv')) > click() > } > } > def 'Test some stuff' { > clickItemOnPage2() //Passes > clickItemOnPage() //Fails > } > } > {code} > Error: groovy.lang.MissingMethodException: No signature of method: > geb.navigator.NonEmptyNavigator.moveToElement() > It really doesn't matter what you have in the interact closure anything > fails... -- This message was sent by Atlassian Jira (v8.3.4#803005)