Skip to content

Commit 2c9e530

Browse files
pradeep.rauthanpradeep.rauthan
authored andcommitted
MC-42704:Admin Checkout validation bug
- Updated for static test failure
1 parent d3ed5d0 commit 2c9e530

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

dev/tests/integration/testsuite/Magento/Customer/_files/customer_address_street_attribute.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?php
22
/**
33
* Customer default address fixture with entity_id = 2,
4-
* this fixture also inherit other fixtures for creating simple product, a customer with entity_id=1 and default customer address.
4+
* this fixture also inherit other fixtures for creating simple product, a customer with entity_id=1
5+
* and default customer address.
56
* It also call a new fixture to update customer address `input_validation` rule for `street` field.
67
*
78
* Copyright © Magento, Inc. All rights reserved.

dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ private function preparePreconditionsForCreateOrder(
732732
/** Unset fake IDs for default billing and shipping customer addresses */
733733
/** @var Customer $customer */
734734
$customer = $this->objectManager->create(Customer::class);
735-
if(empty($orderData['checkForDefaultStreet'])){
735+
if (empty($orderData['checkForDefaultStreet'])) {
736736
$customer->load($customerIdFromFixture)->setDefaultBilling(null)->setDefaultShipping(null)->save();
737737
}
738738
} else {
@@ -873,11 +873,17 @@ public function testSetBillingAddressStreetValidationErrors()
873873
$errorMessages[] = $validationError->getText();
874874
}
875875
self::assertTrue(
876-
in_array('Billing Address: "Street Address" contains non-alphabetic or non-numeric characters.', $errorMessages),
876+
in_array(
877+
'Billing Address: "Street Address" contains non-alphabetic or non-numeric characters.',
878+
$errorMessages
879+
),
877880
'Expected validation message is absent.'
878881
);
879882
self::assertTrue(
880-
in_array('Shipping Address: "Street Address" contains non-alphabetic or non-numeric characters.', $errorMessages),
883+
in_array(
884+
'Shipping Address: "Street Address" contains non-alphabetic or non-numeric characters.',
885+
$errorMessages
886+
),
881887
'Expected validation message is absent.'
882888
);
883889
}
@@ -900,8 +906,8 @@ public function testCreateOrderExistingCustomerWhenDefaultAddressDiffersWithNew(
900906
$shippingAddressAsBilling = 1;
901907
$invalidAddressData = array_merge($this->getValidAddressData(), ['street' => [0 => 'White', 1 => 'Lane']]);
902908

903-
// Any change in default customer address should be treated as new address by setting up `customer_address_id` to `null`
904-
// in billing and shipping addresses.
909+
// Any change in default customer address should be treated as new address by setting up
910+
// `customer_address_id` to `null` in billing and shipping addresses.
905911
$address = array_merge($invalidAddressData, ['save_in_address_book' => '1', 'customer_address_id' => null]);
906912
$orderData = [
907913
'currency' => 'USD',

0 commit comments

Comments
 (0)