/** * Fill customer addresses and proceed to next step. * * @return void */ public function run() { $bindings = []; foreach ($this->products as $key => $product) { $productName = $product->getName(); $addressRender = $this->objectManeger->create('\\Magento\\Customer\\Test\\Block\\Address\\Renderer', ['address' => $this->customer->getAddress()[$key], 'type' => 'oneline']); $bindings[$productName] = $addressRender->render(); } $this->addresses->getAddressesBlock()->selectAddresses($bindings); }
/** * Fill customer addresses and proceed to next step. * * @return void */ public function run() { $addresses = $this->customer->getDataFieldConfig('address')['source']->getAddresses(); $bindings = []; foreach ($this->products as $key => $product) { $productName = $product->getName(); $addressRender = $this->objectManager->create(\Magento\Customer\Test\Block\Address\Renderer::class, ['address' => $addresses[$key], 'type' => 'oneline']); $bindings[$productName] = $addressRender->render(); } $this->addresses->getAddressesBlock()->selectAddresses($bindings); }