8 use Magento\Mtf\TestStep\TestStepFactory;
9 use Magento\Mtf\TestStep\TestStepInterface;
24 private $placeOrderStatus;
38 private $testStepFactory;
47 OrderInjectable $order,
48 TestStepFactory $testStepFactory
50 $this->placeOrderStatus = $placeOrderStatus;
52 $this->testStepFactory = $testStepFactory;
64 if ($this->placeOrderStatus ===
'On Hold') {
65 $this->getStepInstance(UnholdOrderStep::class)->run();
68 $this->getStepInstance(CancelOrderStep::class)->run();
77 private function getStepInstance(
$class)
79 return $this->testStepFactory->create(
81 [
'order' => $this->order]
$_option $_optionId $class
__construct( $placeOrderStatus, OrderInjectable $order, TestStepFactory $testStepFactory)