use of ru.sbtqa.tag.pagefactory.data.DataReplacer in project page-factory-2 by sbtqa.
the class DataAspect method sendStepStart.
@Around("sendStepStart(event)")
public void sendStepStart(ProceedingJoinPoint joinPoint, TestStepStarted event) throws Throwable {
PickleStepTestStep testStep = (PickleStepTestStep) event.testStep;
DataReplacer dataParser = new DataReplacer();
dataParser.replace(testStep);
joinPoint.proceed(new Object[] { event });
}
use of ru.sbtqa.tag.pagefactory.data.DataReplacer in project page-factory-2 by sbtqa.
the class FragmentReplacer method isFragmentNameMatch.
private boolean isFragmentNameMatch(String name, Step step, String language, String data) throws DataException, FragmentException {
boolean isFragmentNameMatch = FragmentUtils.getFragmentName(step, language).equals(name);
if (!isFragmentNameMatch) {
String scenarioNameFromData = new DataReplacer().replaceDataPlaceholders(step.getText(), data);
Step stepNew = new Step(step.getLocation(), step.getKeyword(), scenarioNameFromData, step.getArgument());
isFragmentNameMatch = FragmentUtils.getFragmentName(stepNew, language).equals(name);
}
return isFragmentNameMatch;
}
Aggregations