Skip to content

Commit

Permalink
Update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
mpkorstanje committed Feb 25, 2025
1 parent 52b7d98 commit d091541
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 51 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- [Core] Improved caching glue performance ([#2971](https://github.com/cucumber/cucumber-jvm/pull/2971) M.P. Korstanje & Julien Kronegg)
- [Java, Java8] Significantly reduced number of emitted step- and hook-definition messages ([#2971](https://github.com/cucumber/cucumber-jvm/pull/2971) M.P. Korstanje & Julien Kronegg)
- [Core] Removed workarounds to limit size of html report ([#2971](https://github.com/cucumber/cucumber-jvm/pull/2971) M.P. Korstanje & Julien Kronegg)

### Deprecated
- [Core] Deprecated `ScenarioScoped` glue ([#2971](https://github.com/cucumber/cucumber-jvm/pull/2971) M.P. Korstanje & Julien Kronegg)

## [7.21.1] - 2025-02-07
### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
* scenario scoped object (e.g. a method closure).
*
* @deprecated backend with scenario scoped glue should hide this complexity
* from Cucumber by updating the registered glue during
* {@link Backend#buildWorld()} and transparently dispose of any closures during
* {@link Backend#disposeWorld()}.
* from Cucumber by updating the registered glue during
* {@link Backend#buildWorld()} and transparently dispose of any
* closures during {@link Backend#disposeWorld()}.
*/
@Deprecated
public interface ScenarioScoped {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,54 +48,6 @@ void writes_index_html() throws Throwable {
extractCucumberMessages(bytes), STRICT);
}

@Test
void ignores_step_definitions() throws Throwable {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
HtmlFormatter formatter = new HtmlFormatter(bytes);
EventBus bus = new TimeServiceEventBus(Clock.systemUTC(), UUID::randomUUID);
formatter.setEventPublisher(bus);

TestRunStarted testRunStarted = new TestRunStarted(new Timestamp(10L, 0L), null);
bus.send(Envelope.of(testRunStarted));

StepDefinition stepDefinition = new StepDefinition(
"",
new StepDefinitionPattern("", StepDefinitionPatternType.CUCUMBER_EXPRESSION),
SourceReference.of("https://example.com"));
bus.send(Envelope.of(stepDefinition));

Hook hook = new Hook("",
null,
SourceReference.of("https://example.com"),
null, null);
bus.send(Envelope.of(hook));

// public ParameterType(String name, List<String> regularExpressions,
// Boolean preferForRegularExpressionMatch, Boolean useForSnippets,
// String id) {
ParameterType parameterType = new ParameterType(
"",
Collections.emptyList(),
true,
false,
"",
null);
bus.send(Envelope.of(parameterType));

TestRunFinished testRunFinished = new TestRunFinished(
null,
true,
new Timestamp(15L, 0L),
null, null);
bus.send(Envelope.of(testRunFinished));

assertEquals("[" +
"{\"testRunStarted\":{\"timestamp\":{\"nanos\":0,\"seconds\":10}}}," +
"{\"testRunFinished\":{\"success\":true,\"timestamp\":{\"nanos\":0,\"seconds\":15}}}" +
"]",
extractCucumberMessages(bytes), STRICT);
}

private static String extractCucumberMessages(ByteArrayOutputStream bytes) {
Pattern pattern = Pattern.compile("^.*window\\.CUCUMBER_MESSAGES = (\\[.+]);.*$", Pattern.DOTALL);
Matcher matcher = pattern.matcher(new String(bytes.toByteArray(), UTF_8));
Expand Down

0 comments on commit d091541

Please sign in to comment.