9 use Magento\Checkout\Test\Page\CheckoutOnepageSuccess;
10 use Magento\Customer\Test\Page\CustomerAccountCreate;
11 use Magento\Mtf\TestStep\TestStepInterface;
12 use Magento\Mtf\Fixture\FixtureFactory;
31 private $checkoutMethod;
38 private $fixtureFactory;
45 private $customerAccountCreate;
52 private $customerPassword;
65 FixtureFactory $fixtureFactory,
66 CustomerAccountCreate $customerAccountCreate,
67 $customerPassword =
null 70 $this->checkoutMethod = $checkoutMethod;
71 $this->fixtureFactory = $fixtureFactory;
72 $this->customerAccountCreate = $customerAccountCreate;
73 $this->customerPassword = $customerPassword;
83 if ($this->checkoutMethod ===
'register') {
84 $this->checkoutOnepageSuccess->getRegistrationBlock()->createAccount();
86 $customerFixture = $this->fixtureFactory->createByCode(
90 'password' => $this->customerPassword,
91 'password_confirmation' => $this->customerPassword,
95 $this->customerAccountCreate->getRegisterForm()->registerCustomer($customerFixture);
__construct(CheckoutOnepageSuccess $checkoutOnepageSuccess, $checkoutMethod, FixtureFactory $fixtureFactory, CustomerAccountCreate $customerAccountCreate, $customerPassword=null)