Skip to content

Commit ba45670

Browse files
committed
feat: πŸš€ Use Cucumber Core 7.0.0-RC1
1 parent 26a6bfd commit ba45670

File tree

12 files changed

+59
-33
lines changed

12 files changed

+59
-33
lines changed

β€ŽCHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,20 @@ See also the [CHANGELOG](https://github.com/cucumber/cucumber-jvm/blob/master/CH
99
----
1010
## [Unreleased] (In Git)
1111

12+
Check out the [Upgrade Guide](docs/upgrade_v8.md).
13+
1214
### Added
1315

1416
### Changed
1517

16-
- [Build] Upgrade sbt to 1.5.5
18+
- [Core] Updated `cucumber-core` dependency to [7.0.0-RC1](https://github.com/cucumber/cucumber-jvm/blob/main/CHANGELOG.md)
1719

1820
### Deprecated
1921

2022
### Removed
2123

24+
- [Core] Remove deprecated `io.cucumber.scala.TL`
25+
2226
### Fixed
2327

2428
## [7.1.0] (2021-08-06)

β€ŽREADME.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ The table below shows the compatible versions:
2121

2222
| Cucumber Scala version | Cucumber Core version | Scala versions |
2323
|------------------------|-----------------------|-----------------------|
24+
| 8.x | 7.x | 2.11, 2.12, 2.13, 3.0 |
2425
| 7.x | 6.x | 2.11, 2.12, 2.13, 3.0 |
2526
| 6.x | 6.x | 2.11, 2.12, 2.13 |
2627
| 5.x | 5.x | 2.11, 2.12, 2.13 |
@@ -30,6 +31,7 @@ The table below shows the compatible versions:
3031

3132
- [Installation](./docs/install.md)
3233
- Upgrade notes
34+
- [Version 8.x](docs/upgrade_v8.md)
3335
- [Version 7.x](docs/upgrade_v7.md)
3436
- [Version 6.x](docs/upgrade_v6.md)
3537
- [Version 5.x](docs/upgrade_v5.md)

β€Žbuild.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ scalaVersion := scala213
3939

4040
// Library versions
4141

42-
val cucumberVersion = "6.11.0"
42+
val cucumberVersion = "7.0.0-RC1"
4343
val jacksonVersion = "2.12.5"
4444
val mockitoScalaVersion = "1.16.42"
4545
val junitVersion = "4.13.2"

β€Žcucumber-scala/src/main/scala/io/cucumber/scala/Scenario.scala

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,29 @@ class Scenario(val delegate: TestCaseState) {
7777
*/
7878
def getName: String = delegate.getName
7979

80-
/** @return the id of the Scenario.
80+
/** Returns the unique identifier for this scenario.
81+
* <p>
82+
* If this is a Scenario from Scenario Outlines this will return the id of
83+
* the example row in the Scenario Outline.
84+
* <p>
85+
* The id is not stable across multiple executions of Cucumber but does
86+
* correlate with ids used in messages output. Use the uri + line number to
87+
* obtain a somewhat stable identifier of a scenario.
88+
*
89+
* @return the id of the Scenario.
8190
*/
8291
def getId: String = delegate.getId
8392

8493
/** @return the uri of the Scenario.
8594
*/
8695
def getUri: URI = delegate.getUri
8796

88-
/** @return the line in the feature file of the Scenario. If this is a Scenario
89-
* from Scenario Outlines this will return the line of the example row in
90-
* the Scenario Outline.
97+
/** Returns the line in the feature file of the Scenario.
98+
* <p>
99+
* If this is a Scenario from Scenario Outlines this will return the line of
100+
* the example row in the Scenario Outline.
101+
*
102+
* @return the line in the feature file of the Scenario
91103
*/
92104
def getLine: Integer = delegate.getLine
93105

β€Žcucumber-scala/src/main/scala/io/cucumber/scala/TL.scala

Lines changed: 0 additions & 16 deletions
This file was deleted.

β€Žcucumber-scala/src/test/scala/io/cucumber/scala/ScalaDslDataTableTypeTest.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class ScalaDslDataTableTypeTest {
175175
class Glue extends ScalaDsl with EN {
176176
DataTableType { (table: DataTable) =>
177177
val authors = table
178-
.asMaps()
178+
.entries()
179179
.asScala
180180
.map(_.asScala)
181181
.map(entry =>
@@ -208,7 +208,7 @@ class ScalaDslDataTableTypeTest {
208208
class Glue extends ScalaDsl with EN {
209209
DataTableType("[empty]") { (table: DataTable) =>
210210
val authors = table
211-
.asMaps()
211+
.entries()
212212
.asScala
213213
.map(_.asScala)
214214
.map(entry =>
@@ -370,7 +370,7 @@ class ScalaDslDataTableTypeTest {
370370
object Glue extends ScalaDsl with EN {
371371
DataTableType { (table: DataTable) =>
372372
val authors = table
373-
.asMaps()
373+
.entries()
374374
.asScala
375375
.map(_.asScala)
376376
.map(entry =>
@@ -401,7 +401,7 @@ class ScalaDslDataTableTypeTest {
401401
object Glue extends ScalaDsl with EN {
402402
DataTableType("[empty]") { (table: DataTable) =>
403403
val authors = table
404-
.asMaps()
404+
.entries()
405405
.asScala
406406
.map(_.asScala)
407407
.map(entry =>

β€Žcucumber-scala/src/test/scala/tests/datatables/DataTableTypeSteps.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class DataTableTypeSteps extends ScalaDsl with EN {
107107

108108
DataTableType { (table: DataTable) =>
109109
val authors = table
110-
.asMaps()
110+
.entries()
111111
.asScala
112112
.map(_.asScala)
113113
.map(entry =>
@@ -119,7 +119,7 @@ class DataTableTypeSteps extends ScalaDsl with EN {
119119

120120
DataTableType("[empty]") { (table: DataTable) =>
121121
val authors = table
122-
.asMaps()
122+
.entries()
123123
.asScala
124124
.map(_.asScala)
125125
.map(entry =>

β€Ždocs/transformers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ case class Author(name: String, surname: String, famousBook: String)
166166
case class GroupOfAuthor(authors: Seq[Author])
167167

168168
DataTableType { table: DataTable =>
169-
val authors = table.asMaps().asScala
169+
val authors = table.entries().asScala
170170
.map(_.asScala)
171171
.map(entry => Author(entry("name"), entry("surname"), entry("famousBook")))
172172
.toSeq

β€Ždocs/upgrade_v8.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Upgrading from 7.x to 8.x
2+
3+
Prior to upgrading to v8.0.0 upgrade to latest v7.x and stop using all deprecated features.
4+
Some features will log a deprecation warning.
5+
6+
See also:
7+
- [Cucumber Scala CHANGELOG](../CHANGELOG.md)
8+
- [Cucumber JVM CHANGELOG](https://github.com/cucumber/cucumber-jvm/blob/main/CHANGELOG.md)
9+
10+
## Cannot use `DataTable#asX` inside a `DataTableType`
11+
12+
You should not use the methods `DataTable#asX()` in `DataTableType`s.
13+
It was working in previous versions, but it will now raise an exception when running your tests.
14+
15+
Instead you should use:
16+
- Replace `DataTable#asList()` with `DataTable#values()`
17+
- Replace `DataTable#asLists()` with `DataTable#cells()`
18+
- Replace `DataTable#asMaps()` with `DataTable#entries()`
19+
20+
21+
More context for this change at https://github.com/cucumber/common/pull/1419

β€Žproject/I18nGenerator.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ object I18nGenerator {
55

66
private val dialectProvider = new GherkinDialectProvider()
77

8+
// The generated files for these languages don't compile
89
private val unsupported = Seq(
9-
"em"
10-
) // The generated files for Emoji do not compile.
10+
"em", // Emoji
11+
"en-tx" // Texan
12+
)
13+
1114
private val allLanguages = dialectProvider
1215
.getLanguages()
1316
.asScala

β€Žproject/build-dependencies.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
libraryDependencies += "io.cucumber" % "cucumber-core" % "6.11.0"
1+
libraryDependencies += "io.cucumber" % "cucumber-core" % "7.0.0-RC1"
22
libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.5.0"

β€Žversion.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ThisBuild / version := "7.1.1-SNAPSHOT"
1+
ThisBuild / version := "8.0.0-SNAPSHOT"

0 commit comments

Comments
Β (0)