Skip to content

Commit 4eb1e61

Browse files
committed
chore(deps): update dependency @cucumber/compatibility-kit to v19
1 parent 55cd57e commit 4eb1e61

31 files changed

+124
-164
lines changed

compatibility/src/test/java/io/cucumber/compatibility/attachments/Attachments.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,6 @@ public void anArrayWithBytesAreAttachedAs(int n, String mediaType) {
4848
scenario.attach(bytes, mediaType, null);
4949
}
5050

51-
@When("a JPEG image is attached")
52-
public void aJPEGImageIsAttached() throws IOException {
53-
Path path = Paths.get("src/test/resources/features/attachments/cucumber.jpeg");
54-
byte[] bytes = Files.readAllBytes(path);
55-
String fileName = path.getFileName().toString();
56-
scenario.attach(bytes, "image/jpeg", fileName);
57-
}
58-
59-
@When("a PNG image is attached")
60-
public void aPNGImageIsAttached() throws IOException {
61-
Path path = Paths.get("src/test/resources/features/attachments/cucumber.png");
62-
byte[] bytes = Files.readAllBytes(path);
63-
String fileName = path.getFileName().toString();
64-
scenario.attach(bytes, "image/png", fileName);
65-
}
66-
6751
@When("a PDF document is attached and renamed")
6852
public void aPDFDocumentIsAttachedAndRenamed() throws IOException {
6953
Path path = Paths.get("src/test/resources/features/attachments/document.pdf");

compatibility/src/test/resources/features/attachments/attachments.feature

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
Feature: Attachments
2-
It is sometimes useful to take a screenshot while a scenario runs.
3-
Or capture some logs.
2+
It is sometimes useful to take a screenshot while a scenario runs or capture some logs.
43

54
Cucumber lets you `attach` arbitrary files during execution, and you can
65
specify a content type for the contents.
76

87
Formatters can then render these attachments in reports.
98

10-
Attachments must have a body and a content type
9+
Attachments must have a body and a content type.
1110

1211
Scenario: Strings can be attached with a media type
1312
Beware that some formatters such as @cucumber/react use the media type
@@ -30,12 +29,6 @@ Feature: Attachments
3029
Scenario: Byte arrays are base64-encoded regardless of media type
3130
When an array with 10 bytes is attached as "text/plain"
3231

33-
Scenario: Attaching JPEG images
34-
When a JPEG image is attached
35-
36-
Scenario: Attaching PNG images
37-
When a PNG image is attached
38-
3932
Scenario: Attaching PDFs with a different filename
4033
When a PDF document is attached and renamed
4134

compatibility/src/test/resources/features/attachments/attachments.feature.ndjson

Lines changed: 56 additions & 72 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Feature: cdata
2-
Cucumber xml formatters should be able to handle xml cdata elements
2+
Cucumber xml formatters should be able to handle xml cdata elements.
33

44
Scenario: cdata
55
Given I have 42 <![CDATA[cukes]]> in my belly

compatibility/src/test/resources/features/cdata/cdata.feature.ndjson

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"18.0.0"},"os":{"name":"darwin","version":"23.6.0"},"protocolVersion":"27.0.0","runtime":{"name":"node.js","version":"22.7.0"}}}
2-
{"source":{"data":"Feature: cdata\n Cucumber xml formatters should be able to handle xml cdata elements\n\n Scenario: cdata\n Given I have 42 <![CDATA[cukes]]> in my belly\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/cdata/cdata.feature"}}
3-
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"2","keyword":"Scenario","location":{"column":3,"line":4},"name":"cdata","steps":[{"id":"1","keyword":"Given ","keywordType":"Context","location":{"column":5,"line":5},"text":"I have 42 <![CDATA[cukes]]> in my belly"}],"tags":[]}}],"description":" Cucumber xml formatters should be able to handle xml cdata elements","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"cdata","tags":[]},"uri":"samples/cdata/cdata.feature"}}
1+
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"arm64"},"implementation":{"name":"fake-cucumber","version":"18.1.0"},"os":{"name":"darwin","version":"24.5.0"},"protocolVersion":"28.0.0","runtime":{"name":"node.js","version":"24.4.0"}}}
2+
{"source":{"data":"Feature: cdata\n Cucumber xml formatters should be able to handle xml cdata elements.\n\n Scenario: cdata\n Given I have 42 <![CDATA[cukes]]> in my belly\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/cdata/cdata.feature"}}
3+
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"2","keyword":"Scenario","location":{"column":3,"line":4},"name":"cdata","steps":[{"id":"1","keyword":"Given ","keywordType":"Context","location":{"column":5,"line":5},"text":"I have 42 <![CDATA[cukes]]> in my belly"}],"tags":[]}}],"description":" Cucumber xml formatters should be able to handle xml cdata elements.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"cdata","tags":[]},"uri":"samples/cdata/cdata.feature"}}
44
{"pickle":{"astNodeIds":["2"],"id":"4","language":"en","name":"cdata","steps":[{"astNodeIds":["1"],"id":"3","text":"I have 42 <![CDATA[cukes]]> in my belly","type":"Context"}],"tags":[],"uri":"samples/cdata/cdata.feature"}}
55
{"stepDefinition":{"id":"0","pattern":{"source":"I have {int} <![CDATA[cukes]]> in my belly","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":3},"uri":"samples/cdata/cdata.feature.ts"}}}
66
{"testRunStarted":{"id":"5","timestamp":{"nanos":0,"seconds":0}}}

compatibility/src/test/resources/features/data-tables/data-tables.feature.ndjson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"18.0.0"},"os":{"name":"darwin","version":"23.6.0"},"protocolVersion":"27.0.0","runtime":{"name":"node.js","version":"22.7.0"}}}
1+
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"arm64"},"implementation":{"name":"fake-cucumber","version":"18.1.0"},"os":{"name":"darwin","version":"24.5.0"},"protocolVersion":"28.0.0","runtime":{"name":"node.js","version":"24.4.0"}}}
22
{"source":{"data":"Feature: Data Tables\n Data Tables can be placed underneath a step and will be passed as the last\n argument to the step definition.\n\n They can be used to represent richer data structures, and can be transformed to other data-types.\n\n Scenario: transposed table\n When the following table is transposed:\n | a | b |\n | 1 | 2 |\n Then it should be:\n | a | 1 |\n | b | 2 |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/data-tables/data-tables.feature"}}
33
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"8","keyword":"Scenario","location":{"column":3,"line":7},"name":"transposed table","steps":[{"dataTable":{"location":{"column":7,"line":9},"rows":[{"cells":[{"location":{"column":9,"line":9},"value":"a"},{"location":{"column":13,"line":9},"value":"b"}],"id":"2","location":{"column":7,"line":9}},{"cells":[{"location":{"column":9,"line":10},"value":"1"},{"location":{"column":13,"line":10},"value":"2"}],"id":"3","location":{"column":7,"line":10}}]},"id":"4","keyword":"When ","keywordType":"Action","location":{"column":5,"line":8},"text":"the following table is transposed:"},{"dataTable":{"location":{"column":7,"line":12},"rows":[{"cells":[{"location":{"column":9,"line":12},"value":"a"},{"location":{"column":13,"line":12},"value":"1"}],"id":"5","location":{"column":7,"line":12}},{"cells":[{"location":{"column":9,"line":13},"value":"b"},{"location":{"column":13,"line":13},"value":"2"}],"id":"6","location":{"column":7,"line":13}}]},"id":"7","keyword":"Then ","keywordType":"Outcome","location":{"column":5,"line":11},"text":"it should be:"}],"tags":[]}}],"description":" Data Tables can be placed underneath a step and will be passed as the last\n argument to the step definition.\n\n They can be used to represent richer data structures, and can be transformed to other data-types.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Data Tables","tags":[]},"uri":"samples/data-tables/data-tables.feature"}}
44
{"pickle":{"astNodeIds":["8"],"id":"11","language":"en","name":"transposed table","steps":[{"argument":{"dataTable":{"rows":[{"cells":[{"value":"a"},{"value":"b"}]},{"cells":[{"value":"1"},{"value":"2"}]}]}},"astNodeIds":["4"],"id":"9","text":"the following table is transposed:","type":"Action"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"a"},{"value":"1"}]},{"cells":[{"value":"b"},{"value":"2"}]}]}},"astNodeIds":["7"],"id":"10","text":"it should be:","type":"Outcome"}],"tags":[],"uri":"samples/data-tables/data-tables.feature"}}

compatibility/src/test/resources/features/empty/empty.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ Feature: Empty Scenarios
22
Sometimes we want to quickly jot down a new scenario without specifying any actual steps
33
for what should be executed.
44

5-
In this instance we want to stipulate what should / shouldn't run and what the output is
5+
In this instance we want to stipulate what should / shouldn't run and what the output is.
66

77
Scenario: Blank Scenario

compatibility/src/test/resources/features/empty/empty.feature.ndjson

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"18.0.0"},"os":{"name":"darwin","version":"23.6.0"},"protocolVersion":"27.0.0","runtime":{"name":"node.js","version":"22.7.0"}}}
2-
{"source":{"data":"Feature: Empty Scenarios\n Sometimes we want to quickly jot down a new scenario without specifying any actual steps\n for what should be executed.\n\n In this instance we want to stipulate what should / shouldn't run and what the output is\n\n Scenario: Blank Scenario\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/empty/empty.feature"}}
3-
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"0","keyword":"Scenario","location":{"column":3,"line":7},"name":"Blank Scenario","steps":[],"tags":[]}}],"description":" Sometimes we want to quickly jot down a new scenario without specifying any actual steps\n for what should be executed.\n\n In this instance we want to stipulate what should / shouldn't run and what the output is","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Empty Scenarios","tags":[]},"uri":"samples/empty/empty.feature"}}
1+
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"arm64"},"implementation":{"name":"fake-cucumber","version":"18.1.0"},"os":{"name":"darwin","version":"24.5.0"},"protocolVersion":"28.0.0","runtime":{"name":"node.js","version":"24.4.0"}}}
2+
{"source":{"data":"Feature: Empty Scenarios\n Sometimes we want to quickly jot down a new scenario without specifying any actual steps\n for what should be executed.\n\n In this instance we want to stipulate what should / shouldn't run and what the output is.\n\n Scenario: Blank Scenario\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/empty/empty.feature"}}
3+
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"0","keyword":"Scenario","location":{"column":3,"line":7},"name":"Blank Scenario","steps":[],"tags":[]}}],"description":" Sometimes we want to quickly jot down a new scenario without specifying any actual steps\n for what should be executed.\n\n In this instance we want to stipulate what should / shouldn't run and what the output is.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Empty Scenarios","tags":[]},"uri":"samples/empty/empty.feature"}}
44
{"pickle":{"astNodeIds":["0"],"id":"1","language":"en","name":"Blank Scenario","steps":[],"tags":[],"uri":"samples/empty/empty.feature"}}
55
{"testRunStarted":{"id":"2","timestamp":{"nanos":0,"seconds":0}}}
66
{"testCase":{"id":"3","pickleId":"1","testRunStartedId":"2","testSteps":[]}}

compatibility/src/test/resources/features/examples-tables-attachment/examples-tables-attachment.feature

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
Feature: Examples Tables - With attachments
2-
It is sometimes useful to take a screenshot while a scenario runs.
3-
Or capture some logs.
4-
5-
This can also be done in an examples table.
2+
It is sometimes useful to take a screenshot while a scenario runs or capture some logs.
63

74
Scenario Outline: Attaching images in an examples table
85
When a <type> image is attached

compatibility/src/test/resources/features/examples-tables-attachment/examples-tables-attachment.feature.ndjson

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"18.0.0"},"os":{"name":"linux","version":"6.8.0-52-generic"},"protocolVersion":"27.2.0","runtime":{"name":"node.js","version":"18.19.1"}}}
2-
{"source":{"data":"Feature: Examples Tables - With attachments\n It is sometimes useful to take a screenshot while a scenario runs.\n Or capture some logs.\n\n This can also be done in an examples table.\n\n Scenario Outline: Attaching images in an examples table\n When a <type> image is attached\n\n Examples:\n | type |\n | JPEG |\n | PNG |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/examples-tables-attachment/examples-tables-attachment.feature"}}
3-
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"6","keyword":"Examples","location":{"column":5,"line":10},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":12},"value":"JPEG"}],"id":"4","location":{"column":7,"line":12}},{"cells":[{"location":{"column":9,"line":13},"value":"PNG"}],"id":"5","location":{"column":7,"line":13}}],"tableHeader":{"cells":[{"location":{"column":9,"line":11},"value":"type"}],"id":"3","location":{"column":7,"line":11}},"tags":[]}],"id":"7","keyword":"Scenario Outline","location":{"column":3,"line":7},"name":"Attaching images in an examples table","steps":[{"id":"2","keyword":"When ","keywordType":"Action","location":{"column":5,"line":8},"text":"a <type> image is attached"}],"tags":[]}}],"description":" It is sometimes useful to take a screenshot while a scenario runs.\n Or capture some logs.\n\n This can also be done in an examples table.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Examples Tables - With attachments","tags":[]},"uri":"samples/examples-tables-attachment/examples-tables-attachment.feature"}}
1+
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"arm64"},"implementation":{"name":"fake-cucumber","version":"18.1.0"},"os":{"name":"darwin","version":"24.5.0"},"protocolVersion":"28.0.0","runtime":{"name":"node.js","version":"24.4.0"}}}
2+
{"source":{"data":"Feature: Examples Tables - With attachments\n It is sometimes useful to take a screenshot while a scenario runs or capture some logs.\n\n Scenario Outline: Attaching images in an examples table\n When a <type> image is attached\n\n Examples:\n | type |\n | JPEG |\n | PNG |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/examples-tables-attachment/examples-tables-attachment.feature"}}
3+
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"6","keyword":"Examples","location":{"column":5,"line":7},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":9},"value":"JPEG"}],"id":"4","location":{"column":7,"line":9}},{"cells":[{"location":{"column":9,"line":10},"value":"PNG"}],"id":"5","location":{"column":7,"line":10}}],"tableHeader":{"cells":[{"location":{"column":9,"line":8},"value":"type"}],"id":"3","location":{"column":7,"line":8}},"tags":[]}],"id":"7","keyword":"Scenario Outline","location":{"column":3,"line":4},"name":"Attaching images in an examples table","steps":[{"id":"2","keyword":"When ","keywordType":"Action","location":{"column":5,"line":5},"text":"a <type> image is attached"}],"tags":[]}}],"description":" It is sometimes useful to take a screenshot while a scenario runs or capture some logs.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Examples Tables - With attachments","tags":[]},"uri":"samples/examples-tables-attachment/examples-tables-attachment.feature"}}
44
{"pickle":{"astNodeIds":["7","4"],"id":"9","language":"en","name":"Attaching images in an examples table","steps":[{"astNodeIds":["2","4"],"id":"8","text":"a JPEG image is attached","type":"Action"}],"tags":[],"uri":"samples/examples-tables-attachment/examples-tables-attachment.feature"}}
55
{"pickle":{"astNodeIds":["7","5"],"id":"11","language":"en","name":"Attaching images in an examples table","steps":[{"astNodeIds":["2","5"],"id":"10","text":"a PNG image is attached","type":"Action"}],"tags":[],"uri":"samples/examples-tables-attachment/examples-tables-attachment.feature"}}
66
{"stepDefinition":{"id":"0","pattern":{"source":"a JPEG image is attached","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":4},"uri":"samples/examples-tables-attachment/examples-tables-attachment.feature.ts"}}}

0 commit comments

Comments
 (0)