groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maigo Erit (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-7373) Interact Closures withing Groovy Trait methods are not recognized by the implementing class
Date Thu, 02 Jul 2015 06:42:04 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-7373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14611558#comment-14611558
] 

Maigo Erit commented on GROOVY-7373:
------------------------------------

Have same problem when upgrading to grails 2.5.0

> 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
>              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
(v6.3.4#6332)

Mime
View raw message