Skip to content

Upgrade cucumber to 7.5.0 #307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ See also the [CHANGELOG](https://github.com/cucumber/cucumber-jvm/blob/master/CH

### Changed

- [Core] Updated `cucumber-core` dependency to [7.5.0](https://github.com/cucumber/cucumber-jvm/blob/main/CHANGELOG.md)
- [Scala] Upgrade `scala-collection-compat` to 2.8.0

### Deprecated

### Removed

### Fixed

- [Scala] Process glue classes distinctly ([#2582](https://github.com/cucumber/cucumber-jvm/pull/2582))

## [8.5.1] (2022-06-24)

### Changed
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ scalaVersion := scala213

// Library versions

val cucumberVersion = "7.4.1"
val cucumberVersion = "7.5.0"
val jacksonVersion = "2.13.3"
val mockitoScalaVersion = "1.17.7"
val junitVersion = "4.13.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class ScalaBackend(
.asScala
)
.filter(glueClass => !glueClass.isInterface)
.distinct

// Voluntarily throw exception if not able to identify if it's a class
val (clsClasses, objClasses) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,32 @@ class ScalaBackendTest {
verify(fakeLookup, never()).getInstance(any())
}

@Test
def loadGlueAndBuildWorld_once_by_classpath_url(): Unit = {
// Load glue
backend.loadGlue(
fakeGlue,
List(
URI.create("classpath:io/cucumber/scala/steps/classes"),
URI.create("classpath:io/cucumber/scala/steps/classes")
).asJava
)

assertEquals(3, backend.scalaGlueClasses.size)
assertTrue(
backend.scalaGlueClasses.toSet == Set(
classOf[StepsA],
classOf[StepsB],
classOf[StepsC]
)
)

verify(fakeContainer, times(3)).addClass(any())
verify(fakeContainer, times(1)).addClass(classOf[StepsA])
verify(fakeContainer, times(1)).addClass(classOf[StepsB])
verify(fakeContainer, times(1)).addClass(classOf[StepsC])
}

@Test
def loadGlueAndBuildWorld_class_incorrect_hooks_definitions(): Unit = {
val result = Try {
Expand Down
4 changes: 2 additions & 2 deletions project/build-dependencies.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
libraryDependencies += "io.cucumber" % "cucumber-core" % "7.4.1"
libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.7.0"
libraryDependencies += "io.cucumber" % "cucumber-core" % "7.5.0"
libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.0"