I write my cucumber scenario to include the following step:
And the frabjous bandersnatch whiffled "Callooh"
Type alt-enter, choose Create Step Definition, and it produces:
@And("^the frabjous bandersnatch whiffled \"([^\"]*)\"$")
public void the_frabjous_bandersnatch_whiffled(String arg1) throws Throwable {
// Express the Regexp above with the code you wish you had
throw new PendingException();
}
but our coding standards require camelCase for methods, so I have to manually change the_frabjous_bandersnatch_whiffled
to theFrabjousBandersnatchWhiffled
. Is there a setting somewhere that will tell Idea to use camel case instead of underscores in this situation?
Also, when it's offering possible classes into which to place my new stepdef, can I have it filter to only classes with names ending in "Steps"?
Add step definitionsfeature file and press Alt+Enter . The list of suggested intention actions opens. Select Create step definition to create a definition only for one step, or select Create all step definitions to add definitions for all steps in a scenario.
Step definition maps the Test Case Steps in the feature files(introduced by Given/When/Then) to code. It which executes the steps on Application Under Test and checks the outcomes against expected results. For a step definition to be executed, it must match the given component in a feature.
Open the desired . feature file in the editor. Click the hyperlink. The step definition file opens in the editor, with the caret resting at the desired step definition.
In IntelliJ IDEA, you can see where and how symbols, such as tags, classes, fields, methods, or functions are defined in your project. For this purpose, the IDE features the Quick Definition popup. To view definition of a symbol, select it in the editor and press Ctrl+Shift+I (or click View | Quick Definition).
Probably way too late, but maybe still helpful:
You can set the --snippets camelcase
option in the Edit Configurations in intelliJ:
Main menu Run -> Edit Configurations
(I have prepared a screenshot to show this, but almighty Stackoverflow deems me unworthy of posting images, well thought out, indeed!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With