Skip to content

Commit

Permalink
Unit test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaleo committed Apr 19, 2019
1 parent 590d4a6 commit e289885
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ public DesiredCapabilities enhanced(DesiredCapabilities capabilities, SupportedW
AddEnvironmentSpecifiedDriverCapabilities.from(environmentVariables).forDriver(driver).to(capabilities);

if (StepEventBus.getEventBus() != null && StepEventBus.getEventBus().isBaseStepListenerRegistered()) {
TestOutcome currentTestOutcome = StepEventBus.getEventBus()
Optional<TestOutcome> currentTestOutcome = StepEventBus.getEventBus()
.getBaseStepListener()
.latestTestOutcome()
.orElse(null);
AddCustomDriverCapabilities.from(environmentVariables).withTestDetails(driver, currentTestOutcome).to(capabilities);
.latestTestOutcome();

TestOutcome outcome = (currentTestOutcome == null) ? null : currentTestOutcome.get();
AddCustomDriverCapabilities.from(environmentVariables).withTestDetails(driver, outcome).to(capabilities);
}

return capabilities;
Expand Down

0 comments on commit e289885

Please sign in to comment.