Search in sources :

Example 1 with PickleStepTestStep

use of cucumber.api.PickleStepTestStep in project page-factory-2 by sbtqa.

the class PrintParameters method beforeSendStepFinished.

@Before("sendStepFinished(event)")
public void beforeSendStepFinished(JoinPoint joinPoint, Event event) {
    TestStep testStep = ((TestStepFinished) event).testStep;
    if (testStep instanceof PickleStepTestStep) {
        this.testArguments.set(((PickleStepTestStep) testStep).getStepArgument());
        addAllureArguments();
    }
}
Also used : PickleStepTestStep(cucumber.api.PickleStepTestStep) TestStep(cucumber.api.TestStep) PickleStepTestStep(cucumber.api.PickleStepTestStep) TestStepFinished(cucumber.api.event.TestStepFinished) Before(org.aspectj.lang.annotation.Before)

Example 2 with PickleStepTestStep

use of cucumber.api.PickleStepTestStep in project page-factory-2 by sbtqa.

the class PrintSteps method sendStepStarted.

@Around("sendStepStarted(event)")
public void sendStepStarted(ProceedingJoinPoint joinPoint, Event event) throws Throwable {
    PickleStepTestStep testStep = (PickleStepTestStep) ((TestStepStarted) event).testStep;
    String stepText = testStep.getStepText();
    if (!previous.equals(stepText) && testStep.getPickleStep() instanceof PickleStepTag && !((PickleStepTag) testStep.getPickleStep()).isSkipped()) {
        System.out.println("    * " + stepText);
        previous = stepText;
    }
    joinPoint.proceed();
}
Also used : PickleStepTestStep(cucumber.api.PickleStepTestStep) PickleStepTag(ru.sbtqa.tag.pagefactory.optional.PickleStepTag) Around(org.aspectj.lang.annotation.Around)

Aggregations

PickleStepTestStep (cucumber.api.PickleStepTestStep)2 TestStep (cucumber.api.TestStep)1 TestStepFinished (cucumber.api.event.TestStepFinished)1 Around (org.aspectj.lang.annotation.Around)1 Before (org.aspectj.lang.annotation.Before)1 PickleStepTag (ru.sbtqa.tag.pagefactory.optional.PickleStepTag)1