cucumber / cucumber-jvm

Cucumber for the JVM
https://cucumber.io
MIT License
2.69k stars 2.02k forks source link

cucumber-archetype imports org.junit.jupiter.api.Assertions.* as a normal import not as a static import #2898

Closed paltaie closed 4 days ago

paltaie commented 6 days ago

πŸ‘“ What did you see?

I tried the 10 minute tutorial and noticed that the "hellocucumber" project that's created has these imports in StepDefinitions:

https://github.com/cucumber/cucumber-jvm/blob/e9f99b11d2d8668db461fc9b45f5eb231653c17a/cucumber-archetype/src/main/resources/archetype-resources/src/test/java/StepDefinitions.java#L3-L5

But I guess you wanted to import static the Assertions so that you can do things like assertEquals without having to import anything. And indeed in the "Ubiquitous Language" section it magically changes to an import static.

βœ… What did you expect to see?

A static import

πŸ“¦ Which tool/library version are you using?

            <dependency>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-bom</artifactId>
                <version>7.18.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

πŸ”¬ How could we reproduce it?

Create an empty cucumber project as per https://cucumber.io/docs/guides/10-minute-tutorial/?lang=java

πŸ“š Any additional context?

No response

paltaie commented 6 days ago

I am making a PR to fix