10 use Magento\Customer\Test\Fixture\Address;
11 use Magento\Customer\Test\Page\CustomerAccountAddress;
12 use Magento\Customer\Test\Page\CustomerAccountIndex;
13 use Magento\Mtf\Constraint\AbstractConstraint;
30 CustomerAccountIndex $customerAccountIndex,
35 $customerAccountIndex->open();
36 $customerAccountIndex->getAccountMenuBlock()->openMenuItem(
'Address Book');
38 $shippingAddressRendered = $this->createAddressRenderer(
$shippingAddress)->render();
39 $defaultShippingAddress =
$customerAddress->getDefaultAddressBlock()->getDefaultShippingAddress();
40 $validated = strpos($defaultShippingAddress, trim($shippingAddressRendered)) !==
false;
42 $billingAddressRendered =
$customerAddress->getDefaultAddressBlock()->getDefaultBillingAddress();
44 $validated && ($billingAddressRendered == $this->createAddressRenderer(
$billingAddress)->render());
47 \PHPUnit\Framework\Assert::assertTrue(
49 'Customer default address on address book tab is not matching the fixture.' 60 return 'Default billing and shipping address form is correct.';
71 return $this->objectManager->create(
73 [
'address' =>
$address,
'type' =>
'html']
processAssert(CustomerAccountIndex $customerAccountIndex, CustomerAccountAddress $customerAddress, Address $shippingAddress, Address $billingAddress=null)