public java.util.Optional<TestStep> cloneCurrentStep() { return ((currentStepExists()) ? Optional.of(getCurrentStep().clone()) : Optional.empty()); }
public Optional<TestStep> cloneCurrentStep() { return (Optional<TestStep>) ((currentStepExists()) ? Optional.of(getCurrentStep().clone()) : Optional.absent()); }
public Optional<TestStep> cloneCurrentStep() { return (Optional<TestStep>) ((currentStepExists()) ? getCurrentStep().clone() : Optional.absent()); }
private void take(final ScreenshotType screenshotType) { if (currentStepExists() && browserIsOpen()) { try { Optional<ScreenshotAndHtmlSource> screenshotAndHtmlSource = grabScreenshot(); if (screenshotAndHtmlSource.isPresent()) { takeScreenshotIfRequired(screenshotType, screenshotAndHtmlSource.get()); } removeDuplicatedInitalScreenshotsIfPresent(); } catch (ScreenshotException e) { LOGGER.warn("Failed to take screenshot", e); } } }
private void currentStepDone(TestResult result) { if (!currentStepMethodStack.isEmpty()) { currentStepMethodStack.pop(); } if (currentStepExists()) { TestStep finishedStep = currentStepStack.pop(); finishedStep.recordDuration(); if (result != null) { finishedStep.setResult(result); } if ((finishedStep == getCurrentGroup())) { finishGroup(); } } updateExampleTableIfNecessary(result); }
private void takeInitialScreenshot() { if ((currentStepExists()) && (screenshots().areAllowed(TakeScreenshots.BEFORE_AND_AFTER_EACH_STEP))) { take(OPTIONAL_SCREENSHOT); } }
private void takeInitialScreenshot() { if ((currentStepExists()) && (screenshots().areAllowed(TakeScreenshots.BEFORE_AND_AFTER_EACH_STEP))) { take(OPTIONAL_SCREENSHOT); } }
private void takeInitialScreenshot() { if ((currentStepExists()) && (screenshots().areAllowed(TakeScreenshots.BEFORE_AND_AFTER_EACH_STEP))) { take(OPTIONAL_SCREENSHOT); } }
private void currentStepDone(TestResult result) { if ((!inFluentStepSequence) && currentStepExists()) { TestStep finishedStep = currentStepStack.pop(); finishedStep.recordDuration(); if (result != null) { finishedStep.setResult(result); } if ((finishedStep == getCurrentGroup())) { finishGroup(); } } updateExampleTableIfNecessary(result); }
private void currentStepDone(TestResult result) { if ((!inFluentStepSequence) && currentStepExists()) { TestStep finishedStep = currentStepStack.pop(); finishedStep.recordDuration(); if (result != null) { finishedStep.setResult(result); } if ((finishedStep == getCurrentGroup())) { finishGroup(); } } updateExampleTableIfNecessary(result); }
public void updateCurrentStepTitle(String updatedStepTitle) { if (currentStepExists()) { getCurrentStep().setDescription(updatedStepTitle); } else { stepStarted(ExecutedStepDescription.withTitle(updatedStepTitle)); } }
public void updateCurrentStepTitle(String updatedStepTitle) { if (currentStepExists()) { getCurrentStep().setDescription(updatedStepTitle); } else { stepStarted(ExecutedStepDescription.withTitle(updatedStepTitle)); } }
private void recordFailureDetailsInFailingTestStep(final StepFailure failure) { if (currentStepExists()) { getCurrentStep().failedWith(new StepFailureException(failure.getMessage(), failure.getException())); } }
public StepMutator updateCurrentStepTitle(String updatedStepTitle) { if (currentStepExists()) { getCurrentStep().setDescription(updatedStepTitle); } else { stepStarted(ExecutedStepDescription.withTitle(updatedStepTitle)); } return new StepMutator(this); }
private void recordFailureDetailsInFailingTestStep(final StepFailure failure) { if (currentStepExists()) { getCurrentStep().failedWith(new StepFailureException(failure.getMessage(), failure.getException())); } }
private boolean shouldTakeScreenshots() { return (currentStepExists() && browserIsOpen() && !StepEventBus.getEventBus().aStepInTheCurrentTestHasFailed() && !StepEventBus.getEventBus().isDryRun() && !StepEventBus.getEventBus().currentTestIsSuspended()); }
private void recordFailureDetails(final StepFailure failure) { if (currentStepExists()) { getCurrentStep().failedWith(new StepFailureException(failure.getMessage(), failure.getException())); } if (shouldTagErrors()) { addTagFor(getCurrentTestOutcome()); } lastFailingExample = currentExample; }
private boolean shouldTakeScreenshots() { if (StepEventBus.getEventBus().aStepInTheCurrentTestHasFailed() && !StepEventBus.getEventBus().softAssertsActive()) { return false; } return (currentStepExists() && browserIsOpen() && !StepEventBus.getEventBus().isDryRun() && !StepEventBus.getEventBus().currentTestIsSuspended()); }