9 use Magento\Customer\Test\Page\CustomerAccountIndex;
10 use Magento\Customer\Test\Page\CustomerAddressEdit;
11 use Magento\Mtf\Constraint\AbstractConstraint;
13 use Magento\Customer\Test\Fixture\Address;
30 CustomerAccountIndex $customerAccountIndex,
31 CustomerAddressEdit $customerAddressEdit,
35 $this->objectManager->create(
36 \
Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
40 $customerAccountIndex->getAccountMenuBlock()->openMenuItem(
'Address Book');
41 $addressRenderer = $this->objectManager->create(
43 [
'address' => $addressToDelete,
'type' =>
'html']
45 $deletedAddress = $addressRenderer->render();
47 $isAddressDeleted =
false;
48 if ($customerAddressEdit->getEditForm()->isVisible()
49 || ($customerAccountIndex->getAdditionalAddressBlock()->getBlockText() !==
null 50 && $deletedAddress != $customerAccountIndex->getAdditionalAddressBlock()->getBlockText())
51 || ($customerAccountIndex->getDefaultAddressBlock()->getBlockText() !==
null 52 && $deletedAddress != $customerAccountIndex->getAdditionalAddressBlock()->getBlockText())
54 $isAddressDeleted =
true;
57 \PHPUnit\Framework\Assert::assertTrue(
59 'Customer address was not deleted.' 70 return 'Deleted address is absent in Frontend.';
processAssert(CustomerAccountIndex $customerAccountIndex, CustomerAddressEdit $customerAddressEdit, Customer $customer, Address $addressToDelete)