Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f895d4a
19085-Translation-in-tier-price-phtml-not-working
Nov 6, 2018
74396e1
19085-Translation-in-tier-price-phtml-not-working
Nov 21, 2018
587447f
ENGCOM-3554: Back port pull #19094 #19377
magento-engcom-team Nov 24, 2018
3bdded5
MAGETWO-72839: Customer can't see available Payment Method for specif…
OlgaVasyltsun Dec 28, 2018
b481066
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-72839
OlgaVasyltsun Dec 31, 2018
fb405b1
MAGETWO-72839: Customer can't see available Payment Method for specif…
OlgaVasyltsun Dec 31, 2018
96467a6
MAGETWO-72839: Customer can't see available Payment Method for specif…
OlgaVasyltsun Dec 31, 2018
bfe4619
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-72839
OlgaVasyltsun Jan 4, 2019
5c0f9c9
MAGETWO-72839: Customer can't see available Payment Method for specif…
OlgaVasyltsun Jan 4, 2019
c6df596
MAGETWO-94862: Acceptance tests improvement
OlgaVasyltsun Jan 9, 2019
5ee6e5e
MAGETWO-94862: Acceptance tests improvement
OlgaVasyltsun Jan 9, 2019
63bd239
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-72839
DianaRusin Jan 11, 2019
5f67587
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-94862
svitja Jan 11, 2019
860f46f
Merge remote-tracking branch 'origin/2.2-develop-pr69' into 2.2-devel…
svitja Jan 11, 2019
1ad527b
MAGETWO-89039: Allow Validation of customer address attributes to inc…
viktorpetryk Jan 14, 2019
b33de4e
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-89039
viktorpetryk Jan 14, 2019
08fe817
Merge remote-tracking branch 'mainline/2.2-develop' into back-port-pu…
nmalevanec Jan 14, 2019
df417b9
ENGCOM-3554: Back port pull #19094 #19377
magento-engcom-team Jan 14, 2019
fba4bc8
Static tests fix.
p-bystritsky Dec 6, 2018
a180d19
ENGCOM-3554: Back port pull #19094 #19377
magento-engcom-team Jan 14, 2019
f989d67
MAGETWO-89079: Different order statuses with zero value and none zero…
SeruyV Jan 14, 2019
1d66ad7
MAGETWO-89039: Allow Validation of customer address attributes to inc…
viktorpetryk Jan 14, 2019
35e38af
MAGETWO-89079: Different order statuses with zero value and none zero…
SeruyV Jan 15, 2019
c2dc028
MAGETWO-73409: Function test Magento\GroupedProduct\Test\TestCase\Cre…
StasKozar Jan 15, 2019
4d2f636
MC-10825: [2.2] Update GB country name in USPS API
zakdma Jan 15, 2019
06a32e1
MAGETWO-89079: Different order statuses with zero value and none zero…
SeruyV Jan 15, 2019
285c6f4
MAGETWO-96010: [2.2] Restricted admin still able to send order commen…
SeruyV Jan 16, 2019
d17db62
Merge remote-tracking branch 'origin/MC-10825' into 2.2-develop-pr69
DianaRusin Jan 16, 2019
c0ec315
Merge remote-tracking branch 'origin/2.2-develop-pr69' into 2.2-devel…
DianaRusin Jan 16, 2019
7088ce7
MAGETWO-96010: [2.2] Restricted admin still able to send order commen…
SeruyV Jan 16, 2019
6df3be7
MAGETWO-95663: If number of entities to be updated in flat tables exc…
DianaRusin Jan 17, 2019
092835b
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-89079
DianaRusin Jan 17, 2019
345e288
Merge remote-tracking branch 'origin/MAGETWO-89079' into 2.2-develop-…
DianaRusin Jan 17, 2019
336e850
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-73409
SeruyV Jan 17, 2019
ff5ede3
Merge remote-tracking branch 'origin/MAGETWO-73409' into 2.2-develop-…
SeruyV Jan 17, 2019
e8ba314
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-96010
DianaRusin Jan 18, 2019
a307478
Merge remote-tracking branch 'origin/MAGETWO-96010' into 2.2-develop-…
DianaRusin Jan 18, 2019
e028cfd
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-95663
zakdma Jan 21, 2019
808c6cb
Merge remote-tracking branch 'origin/MAGETWO-95663' into 2.2-develop-…
zakdma Jan 21, 2019
ca5c273
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-89039
zakdma Jan 21, 2019
d7b523d
Merge remote-tracking branch 'origin/MAGETWO-89039' into 2.2-develop-…
zakdma Jan 21, 2019
043981c
Merge remote-tracking branch 'origin/2.2-develop' into 2.2-develop-pr69
zakdma Jan 23, 2019
e3b5297
ENGCOM-3554: Back port pull #19094 #19377
sidolov Jan 23, 2019
1c23e21
Merge pull request #3623 from magento-tsg/2.2-develop-pr69
Jan 23, 2019
4c57fe0
:arrows_clockwise: [EngCom] Public Pull Requests - 2.2-develop
magento-engcom-team Jan 23, 2019
f8d67c7
Order API resources updated.
milindsingh Jan 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ class TableBuilder
*/
private $tableBuilderFactory;

/**
* Check whether builder was executed
*
* @var bool
*/
protected $_isExecuted = false;

/**
* Constructor
*
Expand Down Expand Up @@ -70,9 +63,6 @@ public function __construct(
*/
public function build($storeId, $changedIds, $valueFieldSuffix)
{
if ($this->_isExecuted) {
return;
}
$entityTableName = $this->_productIndexerHelper->getTable('catalog_product_entity');
$attributes = $this->_productIndexerHelper->getAttributes();
$eavAttributes = $this->_productIndexerHelper->getTablesStructure($attributes);
Expand Down Expand Up @@ -117,7 +107,6 @@ public function build($storeId, $changedIds, $valueFieldSuffix)
//Fill temporary tables with attributes grouped by it type
$this->_fillTemporaryTable($tableName, $columns, $changedIds, $valueFieldSuffix, $storeId);
}
$this->_isExecuted = true;
}

/**
Expand Down
13 changes: 11 additions & 2 deletions app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
namespace Magento\Checkout\Block\Checkout;

use Magento\Customer\Api\CustomerRepositoryInterface as CustomerRepository;
use Magento\Customer\Api\Data\CustomerInterface;
use Magento\Customer\Helper\Address as AddressHelper;
use Magento\Customer\Model\Session;
use Magento\Directory\Helper\Data as DirectoryHelper;

/**
* Fields attribute merger.
*/
class AttributeMerger
{
/**
Expand Down Expand Up @@ -46,6 +50,7 @@ class AttributeMerger
'alpha' => 'validate-alpha',
'numeric' => 'validate-number',
'alphanumeric' => 'validate-alphanum',
'alphanum-with-spaces' => 'validate-alphanum-with-spaces',
'url' => 'validate-url',
'email' => 'email2',
'length' => 'validate-length',
Expand All @@ -67,7 +72,7 @@ class AttributeMerger
private $customerRepository;

/**
* @var \Magento\Customer\Api\Data\CustomerInterface
* @var CustomerInterface
*/
private $customer;

Expand Down Expand Up @@ -309,6 +314,8 @@ protected function getMultilineFieldConfig($attributeCode, array $attributeConfi
}

/**
* Returns default attribute value.
*
* @param string $attributeCode
* @return null|string
*/
Expand Down Expand Up @@ -346,7 +353,9 @@ protected function getDefaultValue($attributeCode)
}

/**
* @return \Magento\Customer\Api\Data\CustomerInterface|null
* Returns logged customer.
*
* @return CustomerInterface|null
*/
protected function getCustomer()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ class ShippingInformationManagement implements \Magento\Checkout\Api\ShippingInf
* @param \Magento\Customer\Api\AddressRepositoryInterface $addressRepository
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Quote\Model\Quote\TotalsCollector $totalsCollector
* @param CartExtensionFactory|null $cartExtensionFactory,
* @param ShippingAssignmentFactory|null $shippingAssignmentFactory,
* @param CartExtensionFactory|null $cartExtensionFactory
* @param ShippingAssignmentFactory|null $shippingAssignmentFactory
* @param ShippingFactory|null $shippingFactory
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
Expand Down Expand Up @@ -150,6 +150,10 @@ public function saveAddressInformation(
$address->setCustomerAddressId(null);
}

if ($billingAddress && !$billingAddress->getCustomerAddressId()) {
$billingAddress->setCustomerAddressId(null);
}

if (!$address->getCountryId()) {
throw new StateException(__('Shipping address is not set'));
}
Expand Down Expand Up @@ -203,6 +207,8 @@ protected function validateQuote(\Magento\Quote\Model\Quote $quote)
}

/**
* Prepare shipping assignment.
*
* @param CartInterface $quote
* @param AddressInterface $address
* @param string $method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@
<seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask1"/>
</actionGroup>

<actionGroup name="GuestCheckoutFillingShippingSectionWithoutPaymentsActionGroup" extends="GuestCheckoutFillingShippingSectionActionGroup">
<waitForElement selector="{{CheckoutPaymentSection.isPaymentSection}}" time="30" stepKey="waitForPaymentSectionLoaded"/>
</actionGroup>

<actionGroup name="GuestCheckoutFillingShippingSectionWithoutRegionActionGroup" extends="GuestCheckoutFillingShippingSectionActionGroup">
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="{{customerAddressVar.country}}" after="enterPostcode" stepKey="selectCountry"/>
<remove keyForRemoval="selectRegion"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<!-- Logged in user checkout add new adress shipping section -->
<actionGroup name="LoggedInUserCheckoutAddNewAddressInShippingSectionActionGroup">
<arguments>
Expand All @@ -21,6 +21,14 @@
<fillField selector="{{CheckoutShippingSection.addTelephone}}" userInput="{{customerAddressVar.telephone}}" stepKey="enterTelephone"/>
<click selector="{{CheckoutShippingSection.addSaveButton}}" stepKey="clickSaveAdressAdd"/>
<waitForPageLoad stepKey="waitPageLoad"/>
<see stepKey="seeRegionSelected" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.state}}"/>
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.state}}" stepKey="seeRegionSelected"/>
</actionGroup>

<actionGroup name="LoggedInUserCheckoutAddNewShippingSectionWithoutRegionActionGroup"
extends="LoggedInUserCheckoutAddNewAddressInShippingSectionActionGroup">
<remove keyForRemoval="selectRegion"/>
<remove keyForRemoval="seeRegionSelected"/>
<selectOption selector="{{CheckoutShippingSection.addCountry}}" userInput="{{customerAddressVar.country}}" after="enterPostcode" stepKey="enterCountry"/>
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.city}}" after="waitPageLoad" stepKey="seeCitySelected"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@
<element name="billingAddressSameAsShipping" type="checkbox" selector=".payment-method._active [name='billing-address-same-as-shipping']"/>
<element name="orderSummaryTotal" type="text" selector="tr.grand.totals span.price" />
<element name="checkPaymentMethodByName" type="radio" selector="//div[@id='checkout-payment-method-load']//div[contains(., '{{paymentName}}')]/..//input[@type='radio']" parameterized="true"/>
<element name="noPaymentMethods" type="text" selector=".no-quotes-block"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<element name="addState" type="select" selector="#shipping-new-address-form select[name='region_id']"/>
<element name="addPostcode" type="input" selector="#shipping-new-address-form input[name='postcode']"/>
<element name="addTelephone" type="input" selector="#shipping-new-address-form input[name='telephone']"/>
<element name="addcCountry" type="select" selector="#shipping-new-address-form select[name='country_id']"/>
<element name="addCountry" type="select" selector="#shipping-new-address-form select[name='country_id']"/>
<element name="addSaveButton" type="button" selector=".action.primary.action-save-address"/>
<element name="editActiveAddress" type="button" selector="//div[@class='shipping-address-item selected-item']//span[text()='Edit']" timeout="30"/>
</section>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="StorefrontCustomerCheckoutTestWithRestrictedCountriesForPaymentTest"
extends="StorefrontGuestCheckoutTestWithRestrictedCountriesForPaymentTest">
<annotations>
<stories value="Checkout via the Storefront"/>
<title value="Checkout via Customer Checkout with restricted countries for payment"/>
<description value="Should be able to place an order as a Customer with restricted countries for payment."/>
<testCaseId value="MC-10831"/>
</annotations>
<before>
<createData entity="Simple_US_Customer" stepKey="createSimpleUsCustomer"/>
</before>
<after>
<actionGroup ref="CustomerLogoutStorefrontActionGroup" stepKey="customerLogoutStorefront"/>
<deleteData createDataKey="createSimpleUsCustomer" stepKey="deleteCustomer"/>
</after>

<remove keyForRemoval="guestCheckoutFillingShippingSection"/>
<remove keyForRemoval="guestCheckoutFillingShippingSectionUK"/>
<remove keyForRemoval="guestPlaceOrder"/>

<!-- Login as Customer -->
<actionGroup ref="CustomerLoginOnStorefront" before="goToProductPage" stepKey="customerLogin">
<argument name="customer" value="$$createSimpleUsCustomer$$" />
</actionGroup>

<!-- Select address and go to payments page-->
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{US_Address_TX.state}}" after="shippingStepIsOpened" stepKey="seeRegion" />
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" after="seeRegion" stepKey="waitNextButton"/>
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" after="waitNextButton" stepKey="selectShippingMethod"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" after="selectShippingMethod" stepKey="clickNextButton" />
<waitForPageLoad after="clickNextButton" stepKey="waitBillingForm"/>
<seeElement selector="{{CheckoutPaymentSection.isPaymentSection}}" after="waitBillingForm" stepKey="checkoutPaymentStepIsOpened"/>

<!-- Fill UK Address and verify that payment available and checkout successful -->
<click selector="{{CheckoutShippingSection.newAdress}}" after="shippingStepIsOpened1" stepKey="fillNewAddress" />
<actionGroup ref="LoggedInUserCheckoutAddNewShippingSectionWithoutRegionActionGroup" after="fillNewAddress" stepKey="customerCheckoutFillingShippingSectionUK">
<argument name="customerVar" value="$$createSimpleUsCustomer$$" />
<argument name="customerAddressVar" value="UK_Default_Address" />
</actionGroup>
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" after="customerCheckoutFillingShippingSectionUK" stepKey="waitNextButton1"/>
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" after="waitNextButton1" stepKey="selectShippingMethod1"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" after="selectShippingMethod1" stepKey="clickNextButton1" />

<actionGroup ref="CheckoutPlaceOrderActionGroup" after="selectCheckMoneyOrderPayment" stepKey="customerPlaceorder">
<argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage" />
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" />
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="StorefrontGuestCheckoutTestWithRestrictedCountriesForPaymentTest">
<annotations>
<features value="Checkout"/>
<stories value="Checkout via Guest Checkout"/>
<title value="Checkout via Guest Checkout with restricted countries for payment"/>
<description value="Should be able to place an order as a Guest with restricted countries for payment."/>
<severity value="MAJOR"/>
<testCaseId value="MC-8243"/>
<group value="checkout"/>
</annotations>
<before>
<createData entity="_defaultCategory" stepKey="createCategory"/>
<createData entity="ApiSimpleProduct" stepKey="createProduct">
<requiredEntity createDataKey="createCategory"/>
</createData>
<magentoCLI command="config:set payment/checkmo/allowspecific" arguments="1" stepKey="setAllowSpecificCountiesValue" />
<magentoCLI command="config:set payment/checkmo/specificcountry" arguments="GB" stepKey="setSpecificCountryValue" />
</before>
<after>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
<magentoCLI command="config:set payment/checkmo/allowspecific" arguments="0" stepKey="unsetAllowSpecificCountiesValue"/>
<magentoCLI command="config:set payment/checkmo/specificcountry" arguments="''" stepKey="unsetSpecificCountryValue" />
</after>

<!-- Add product to cart -->
<amOnPage url="{{StorefrontProductPage.url($$createProduct.sku$$)}}" stepKey="goToProductPage"/>
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addProductToCart">
<argument name="productName" value="$$createProduct.name$$"/>
</actionGroup>
<!-- Go to checkout page -->
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart" />

<!-- Fill US Address and verify that no payment available -->
<seeElement selector="{{CheckoutShippingSection.isShippingStep}}" stepKey="shippingStepIsOpened"/>
<actionGroup ref="GuestCheckoutFillingShippingSectionWithoutPaymentsActionGroup" stepKey="guestCheckoutFillingShippingSection">
<argument name="customerVar" value="Simple_US_Customer"/>
<argument name="customerAddressVar" value="US_Address_TX"/>
<argument name="shippingMethod" value="Flat Rate" type="string"/>
</actionGroup>

<waitForElementVisible selector="{{CheckoutPaymentSection.noPaymentMethods}}" stepKey="waitMessage"/>
<see userInput="No Payment method available." stepKey="checkMessage"/>

<!-- Fill UK Address and verify that payment available and checkout successful -->
<click selector="{{CheckoutHeaderSection.shippingMethodStep}}" stepKey="goToShipping" />
<waitForElementVisible selector="{{CheckoutShippingSection.isShippingStep}}" stepKey="shippingStepIsOpened1"/>

<actionGroup ref="GuestCheckoutFillingShippingSectionWithoutRegionActionGroup" stepKey="guestCheckoutFillingShippingSectionUK">
<argument name="customerVar" value="Simple_US_Customer" />
<argument name="customerAddressVar" value="UK_Default_Address" />
<argument name="shippingMethod" value="Flat Rate" type="string"/>
</actionGroup>
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrderPayment" />
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="guestPlaceOrder">
<argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage" />
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" />
</actionGroup>
</test>
</tests>
Loading