10 use Magento\Customer\Test\Page\CustomerAccountEdit;
11 use Magento\Mtf\Fixture\FixtureFactory;
12 use Magento\Mtf\TestCase\Injectable;
13 use Magento\Mtf\TestStep\TestStepFactory;
47 private $fixtureFactory;
54 private $customerAccountEdit;
72 TestStepFactory $stepFactory,
73 FixtureFactory $fixtureFactory,
74 CustomerAccountEdit $customerAccountEdit
76 $this->stepFactory = $stepFactory;
77 $this->fixtureFactory = $fixtureFactory;
78 $this->customerAccountEdit = $customerAccountEdit;
98 $this->configData = $configData;
102 $this->stepFactory->create(
103 \
Magento\Config\Test\TestStep\SetupConfigurationStep::class,
104 [
'configData' => $this->configData]
106 $this->stepFactory->create(
112 $this->customerAccountEdit->getAccountMenuBlock()->openMenuItem(
'Account Information');
115 $this->customerEdit($initCustomer, $attempts);
118 $data = $initCustomer->getData();
120 $data[
'group_id'] = [];
123 $initCustomer = $this->fixtureFactory->createByCode(
'customer', [
'data' =>
$data]);
125 $this->customerEdit($initCustomer, $attempts + 1);
135 private function customerEdit(Customer
$customer, $attempts)
137 $accountInfoForm = $this->customerAccountEdit->getAccountInfoForm();
138 for (
$i = 0;
$i < $attempts;
$i++) {
139 $accountInfoForm->setChangeEmail(
true);
141 $accountInfoForm->submit();
152 $this->stepFactory->create(
153 \
Magento\Config\Test\TestStep\SetupConfigurationStep::class,
154 [
'configData' => $this->configData,
'rollback' =>
true]
__inject(TestStepFactory $stepFactory, FixtureFactory $fixtureFactory, CustomerAccountEdit $customerAccountEdit)