@Override public boolean currentTestIsSuspended() { return super.currentTestIsSuspended(); }
private boolean testIsPending() { return StepEventBus.getEventBus().currentTestIsSuspended(); }
private boolean testIsPending() { return StepEventBus.getEventBus().currentTestIsSuspended(); }
private boolean testIsPending() { return StepEventBus.getEventBus().currentTestIsSuspended(); }
public boolean webdriverCallsAreSuspended() { if (softAssertsActive()) { return !webdriverSuspensions.isEmpty(); } return currentTestIsSuspended() || aStepInTheCurrentTestHasFailed() || !webdriverSuspensions.isEmpty(); }
private <T extends Performable> void performTask(T todo) { if (!StepEventBus.getEventBus().currentTestIsSuspended()) { todo.performAs(this); } }
/** * Override this method */ public void callWhenPageOpensMethods() { if (StepEventBus.getEventBus().currentTestIsSuspended()) { return; } for (Method annotatedMethod : methodsAnnotatedWithWhenPageOpens()) { try { annotatedMethod.setAccessible(true); annotatedMethod.invoke(this); } catch (Throwable e) { LOGGER.error("Could not execute @WhenPageOpens annotated method: " + e.getMessage()); if (e instanceof InvocationTargetException) { e = ((InvocationTargetException) e).getTargetException(); } if (AssertionError.class.isAssignableFrom(e.getClass())) { throw (AssertionError) e; } else { throw new UnableToInvokeWhenPageOpensMethods("Could not execute @WhenPageOpens annotated method: " + e.getMessage(), e); } } } }
protected boolean thisStepShouldBeIgnored() { return (StepEventBus.getEventBus().currentTestIsSuspended() || StepEventBus.getEventBus().aStepInTheCurrentTestHasFailed()); }
protected boolean thisStepShouldBeIgnored() { return (StepEventBus.getEventBus().currentTestIsSuspended() || StepEventBus.getEventBus().aStepInTheCurrentTestHasFailed()); }
public boolean shouldIgnoreConsequences() { if (StepEventBus.getEventBus().isDryRun()) { return true; } if (StepEventBus.getEventBus().softAssertsActive() && !StepEventBus.getEventBus().currentTestIsSuspended() ) { return false; } return (StepEventBus.getEventBus().currentTestIsSuspended() || StepEventBus.getEventBus().aStepInTheCurrentTestHasFailed()); }
private boolean shouldExecuteJavascript() { return (!StepEventBus.getEventBus().aStepInTheCurrentTestHasFailed() && !StepEventBus.getEventBus().isDryRun() && !StepEventBus.getEventBus().currentTestIsSuspended()); }
private boolean shouldExecuteJavascript() { return (!StepEventBus.getEventBus().aStepInTheCurrentTestHasFailed() && !StepEventBus.getEventBus().isDryRun() && !StepEventBus.getEventBus().currentTestIsSuspended()); }
private boolean shouldTakeScreenshots() { return (currentStepExists() && browserIsOpen() && !StepEventBus.getEventBus().aStepInTheCurrentTestHasFailed() && !StepEventBus.getEventBus().isDryRun() && !StepEventBus.getEventBus().currentTestIsSuspended()); }
private boolean shouldTakeScreenshots() { if (StepEventBus.getEventBus().aStepInTheCurrentTestHasFailed() && !StepEventBus.getEventBus().softAssertsActive()) { return false; } return (currentStepExists() && browserIsOpen() && !StepEventBus.getEventBus().isDryRun() && !StepEventBus.getEventBus().currentTestIsSuspended()); }
private <T> void check(Consequence<T> consequence) { try { eventBusInterface.reportNewStepWithTitle(FormattedTitle.ofConsequence(consequence)); if (StepEventBus.getEventBus().currentTestIsSuspended() || StepEventBus.getEventBus().aStepInTheCurrentTestHasFailed()) { StepEventBus.getEventBus().stepIgnored(); } consequence.evaluateFor(this); eventBusInterface.reportStepFinished(); } catch (IgnoreStepException e) { eventBusInterface.reportStepIgnored(); } catch (Throwable e) { eventBusInterface.reportStepFailureFor(consequence, e); if (Serenity.shouldThrowErrorsImmediately()) { throw e; } } }
private void recordStepResult(Result result, Step currentStep, TestStep currentTestStep) { if (StepEventBus.getEventBus().currentTestIsSuspended()) { getStepEventBus(currentFeaturePath()).stepIgnored(); } else if (Result.Type.PASSED.equals(result.getStatus())) { getStepEventBus(currentFeaturePath()).stepFinished(); } else if (Result.Type.FAILED.equals(result.getStatus())) { failed(stepTitleFrom(currentStep, currentTestStep), result.getError()); } else if (Result.Type.SKIPPED.equals(result.getStatus())) { getStepEventBus(currentFeaturePath()).stepIgnored(); } else if (Result.Type.PENDING.equals(result.getStatus())) { getStepEventBus(currentFeaturePath()).stepPending(); } else if (Result.Type.SKIPPED.equals(result.getStatus())) { getStepEventBus(currentFeaturePath()).stepIgnored(); } else if (Result.Type.UNDEFINED.equals(result.getStatus())) { getStepEventBus(currentFeaturePath()).stepPending(); } }
private void recordStepResult(Result result, Step currentStep, TestStep currentTestStep) { if (StepEventBus.getEventBus().currentTestIsSuspended()) { getStepEventBus(currentFeaturePath()).stepIgnored(); } else if (Result.Type.PASSED.equals(result.getStatus())) { getStepEventBus(currentFeaturePath()).stepFinished(); } else if (Result.Type.FAILED.equals(result.getStatus())) { failed(stepTitleFrom(currentStep, currentTestStep), result.getError()); } else if (Result.Type.SKIPPED.equals(result.getStatus())) { getStepEventBus(currentFeaturePath()).stepIgnored(); } else if (Result.Type.PENDING.equals(result.getStatus())) { getStepEventBus(currentFeaturePath()).stepPending(); } else if (Result.Type.SKIPPED.equals(result.getStatus())) { getStepEventBus(currentFeaturePath()).stepIgnored(); } else if (Result.Type.UNDEFINED.equals(result.getStatus())) { getStepEventBus(currentFeaturePath()).stepPending(); } }