Skip to content

Commit

Permalink
Revert "Issue 1793"
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrthomas committed Nov 7, 2021
1 parent f87143e commit 1b17385
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public void beforeRun() {
if (this.isDynamicBackground()) {
steps = scenario.getBackgroundSteps();
} else {
steps = background == null ? scenario.getStepsIncludingBackground() : scenario.getSteps();
steps = scenario.getStepsIncludingBackground();
}
ScenarioEngine.set(engine);
engine.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,12 @@ void testDynamicOutlineHookNoScenarioExecution() {
assertEquals(0, testRuntimeHook.getRuntimeHookTracker().get("beforeScenario").values().stream().mapToInt(Integer::intValue).sum());
assertEquals(0, testRuntimeHook.getRuntimeHookTracker().get("afterScenario").values().stream().mapToInt(Integer::intValue).sum());

// 5 because steps are added again to each scenario outline to execute again ...
// background steps are re-run on each scenario outline
// so 2 steps per each scenario outline + 1 step that takes to compute the background section
// needed to provide the value on the Examples table
assertEquals(3, testRuntimeHook.getRuntimeHookTracker().get("beforeStep").values().stream().mapToInt(Integer::intValue).sum());
assertEquals(3, testRuntimeHook.getRuntimeHookTracker().get("afterStep").values().stream().mapToInt(Integer::intValue).sum());
assertEquals(5, testRuntimeHook.getRuntimeHookTracker().get("beforeStep").values().stream().mapToInt(Integer::intValue).sum());
assertEquals(5, testRuntimeHook.getRuntimeHookTracker().get("afterStep").values().stream().mapToInt(Integer::intValue).sum());
}

@Test
Expand Down

0 comments on commit 1b17385

Please sign in to comment.