geb prebuilt.feature file steps are not defined

37 views
Skip to first unread message

Max

unread,
Jan 30, 2017, 3:10:25 PM1/30/17
to Geb User Mailing List
Hi!

I am new to IntelliJ and Geb. I've downloaded the geb-example-cucumber-jvm project from https://github.com/geb/geb-example-cucumber-jvm. I then import the project into IntelliJ 2016.3 and run ./gradlew cucumber which is successful. However, when I open the feature file for gebish-prebuilt.feature, IntelliJ complains that each line is "Undefined Step Reference." I know that these are defined in the external library "geb-cucumber-0.3-sources.jar." Are there any configurations that I'm missing in IntelliJ?

Java Version:
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)


Error that I get when running feature file in IntelliJ: 
Testing started at 3:06 PM ...

Undefined step: When  I go to the Geb home page

Undefined step: Then  the first heading has the value |'What is it?|'

Undefined step: When  I click the cross browser link

Undefined step: Then  the first heading has the value |'Cross Browser Automation|'

1 Scenarios (1 undefined)
4 Steps (4 undefined)
0m0.000s


You can implement missing steps with the snippets below:

When(~/^I go to the Geb home page$/) { ->
    // Write code here that turns the phrase above into concrete actions
    throw new PendingException()
}

Then(~/^the first heading has the value 'What is it\?'$/) { ->
    // Write code here that turns the phrase above into concrete actions
    throw new PendingException()
}

When(~/^I click the cross browser link$/) { ->
    // Write code here that turns the phrase above into concrete actions
    throw new PendingException()
}

Then(~/^the first heading has the value 'Cross Browser Automation'$/) { ->
    // Write code here that turns the phrase above into concrete actions
    throw new PendingException()
}


Process finished with exit code 0

I've tried invalidating and restarting -- no luck.

Is anyone having similar issues? Thanks in advance!
Reply all
Reply to author
Forward
0 new messages