Skip to content

Commit c0a74ad

Browse files
committed
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-72879
2 parents e6b7c82 + 4c57fe0 commit c0a74ad

File tree

55 files changed

+1181
-364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1181
-364
lines changed

app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<?php $_tabType = (!preg_match('/\s?ajax\s?/', $_tabClass) && $block->getTabUrl($_tab) != '#') ? 'link' : '' ?>
1919
<?php $_tabHref = $block->getTabUrl($_tab) == '#' ? '#' . $block->getTabId($_tab) . '_content' : $block->getTabUrl($_tab) ?>
2020
<li>
21-
<a href="<?= /* @escapeNotVerified */ $_tabHref ?>" id="<?= /* @escapeNotVerified */ $block->getTabId($_tab) ?>" title="<?= /* @escapeNotVerified */ $block->getTabTitle($_tab) ?>" class="<?php $_tabClass ?>" data-tab-type="<?php $_tabType ?>">
21+
<a href="<?= $block->escapeHtmlAttr($_tabHref) ?>" id="<?= $block->escapeHtmlAttr($block->getTabId($_tab)) ?>" title="<?= $block->escapeHtmlAttr($block->getTabTitle($_tab)) ?>" class="<?= $block->escapeHtmlAttr($_tabClass) ?>" data-tab-type="<?= $block->escapeHtmlAttr($_tabType) ?>">
2222
<span>
2323
<span class="changed" title="<?= /* @escapeNotVerified */ __('The information in this tab has been changed.') ?>"></span>
2424
<span class="error" title="<?= /* @escapeNotVerified */ __('This tab contains invalid data. Please resolve this before saving.') ?>"></span>

app/code/Magento/Catalog/Model/Indexer/Product/Flat/TableBuilder.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ class TableBuilder
3434
*/
3535
private $tableBuilderFactory;
3636

37-
/**
38-
* Check whether builder was executed
39-
*
40-
* @var bool
41-
*/
42-
protected $_isExecuted = false;
43-
4437
/**
4538
* Constructor
4639
*
@@ -70,9 +63,6 @@ public function __construct(
7063
*/
7164
public function build($storeId, $changedIds, $valueFieldSuffix)
7265
{
73-
if ($this->_isExecuted) {
74-
return;
75-
}
7666
$entityTableName = $this->_productIndexerHelper->getTable('catalog_product_entity');
7767
$attributes = $this->_productIndexerHelper->getAttributes();
7868
$eavAttributes = $this->_productIndexerHelper->getTablesStructure($attributes);
@@ -117,7 +107,6 @@ public function build($storeId, $changedIds, $valueFieldSuffix)
117107
//Fill temporary tables with attributes grouped by it type
118108
$this->_fillTemporaryTable($tableName, $columns, $changedIds, $valueFieldSuffix, $storeId);
119109
}
120-
$this->_isExecuted = true;
121110
}
122111

123112
/**

app/code/Magento/CatalogInventory/Block/Stockqty/AbstractStockqty.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ public function getPlaceholderId()
131131
*/
132132
public function isMsgVisible()
133133
{
134-
return $this->getStockQty() > 0 && $this->getStockQtyLeft() <= $this->getThresholdQty();
134+
return $this->getStockQty() > 0 && $this->getStockQtyLeft() > 0
135+
&& $this->getStockQtyLeft() <= $this->getThresholdQty();
135136
}
136137

137138
/**

app/code/Magento/CatalogSearch/etc/indexer.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
<indexer id="catalogsearch_fulltext" view_id="catalogsearch_fulltext" class="Magento\CatalogSearch\Model\Indexer\Fulltext">
1010
<title translate="true">Catalog Search</title>
1111
<description translate="true">Rebuild Catalog product fulltext search index</description>
12-
13-
<saveHandler class="Magento\CatalogSearch\Model\Indexer\IndexHandler" />
1412
<structure class="Magento\CatalogSearch\Model\Indexer\IndexStructure" />
1513
</indexer>
1614
</config>

app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66
namespace Magento\Checkout\Block\Checkout;
77

88
use Magento\Customer\Api\CustomerRepositoryInterface as CustomerRepository;
9+
use Magento\Customer\Api\Data\CustomerInterface;
910
use Magento\Customer\Helper\Address as AddressHelper;
1011
use Magento\Customer\Model\Session;
1112
use Magento\Directory\Helper\Data as DirectoryHelper;
1213

14+
/**
15+
* Fields attribute merger.
16+
*/
1317
class AttributeMerger
1418
{
1519
/**
@@ -46,6 +50,7 @@ class AttributeMerger
4650
'alpha' => 'validate-alpha',
4751
'numeric' => 'validate-number',
4852
'alphanumeric' => 'validate-alphanum',
53+
'alphanum-with-spaces' => 'validate-alphanum-with-spaces',
4954
'url' => 'validate-url',
5055
'email' => 'email2',
5156
'length' => 'validate-length',
@@ -67,7 +72,7 @@ class AttributeMerger
6772
private $customerRepository;
6873

6974
/**
70-
* @var \Magento\Customer\Api\Data\CustomerInterface
75+
* @var CustomerInterface
7176
*/
7277
private $customer;
7378

@@ -309,6 +314,8 @@ protected function getMultilineFieldConfig($attributeCode, array $attributeConfi
309314
}
310315

311316
/**
317+
* Returns default attribute value.
318+
*
312319
* @param string $attributeCode
313320
* @return null|string
314321
*/
@@ -346,7 +353,9 @@ protected function getDefaultValue($attributeCode)
346353
}
347354

348355
/**
349-
* @return \Magento\Customer\Api\Data\CustomerInterface|null
356+
* Returns logged customer.
357+
*
358+
* @return CustomerInterface|null
350359
*/
351360
protected function getCustomer()
352361
{

app/code/Magento/Checkout/Model/ShippingInformationManagement.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ class ShippingInformationManagement implements \Magento\Checkout\Api\ShippingInf
9898
* @param \Magento\Customer\Api\AddressRepositoryInterface $addressRepository
9999
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
100100
* @param \Magento\Quote\Model\Quote\TotalsCollector $totalsCollector
101-
* @param CartExtensionFactory|null $cartExtensionFactory,
102-
* @param ShippingAssignmentFactory|null $shippingAssignmentFactory,
101+
* @param CartExtensionFactory|null $cartExtensionFactory
102+
* @param ShippingAssignmentFactory|null $shippingAssignmentFactory
103103
* @param ShippingFactory|null $shippingFactory
104104
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
105105
*/
@@ -150,6 +150,10 @@ public function saveAddressInformation(
150150
$address->setCustomerAddressId(null);
151151
}
152152

153+
if ($billingAddress && !$billingAddress->getCustomerAddressId()) {
154+
$billingAddress->setCustomerAddressId(null);
155+
}
156+
153157
if (!$address->getCountryId()) {
154158
throw new StateException(__('Shipping address is not set'));
155159
}
@@ -203,6 +207,8 @@ protected function validateQuote(\Magento\Quote\Model\Quote $quote)
203207
}
204208

205209
/**
210+
* Prepare shipping assignment.
211+
*
206212
* @param CartInterface $quote
207213
* @param AddressInterface $address
208214
* @param string $method

app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionActionGroup.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,13 @@
3232
<seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/>
3333
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask1"/>
3434
</actionGroup>
35+
36+
<actionGroup name="GuestCheckoutFillingShippingSectionWithoutPaymentsActionGroup" extends="GuestCheckoutFillingShippingSectionActionGroup">
37+
<waitForElement selector="{{CheckoutPaymentSection.isPaymentSection}}" time="30" stepKey="waitForPaymentSectionLoaded"/>
38+
</actionGroup>
39+
40+
<actionGroup name="GuestCheckoutFillingShippingSectionWithoutRegionActionGroup" extends="GuestCheckoutFillingShippingSectionActionGroup">
41+
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="{{customerAddressVar.country}}" after="enterPostcode" stepKey="selectCountry"/>
42+
<remove keyForRemoval="selectRegion"/>
43+
</actionGroup>
3544
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/LoggedInUserCheckoutAddNewAddressInShippingSectionActionGroup.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<!-- Logged in user checkout add new adress shipping section -->
1212
<actionGroup name="LoggedInUserCheckoutAddNewAddressInShippingSectionActionGroup">
1313
<arguments>
@@ -21,6 +21,14 @@
2121
<fillField selector="{{CheckoutShippingSection.addTelephone}}" userInput="{{customerAddressVar.telephone}}" stepKey="enterTelephone"/>
2222
<click selector="{{CheckoutShippingSection.addSaveButton}}" stepKey="clickSaveAdressAdd"/>
2323
<waitForPageLoad stepKey="waitPageLoad"/>
24-
<see stepKey="seeRegionSelected" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.state}}"/>
24+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.state}}" stepKey="seeRegionSelected"/>
25+
</actionGroup>
26+
27+
<actionGroup name="LoggedInUserCheckoutAddNewShippingSectionWithoutRegionActionGroup"
28+
extends="LoggedInUserCheckoutAddNewAddressInShippingSectionActionGroup">
29+
<remove keyForRemoval="selectRegion"/>
30+
<remove keyForRemoval="seeRegionSelected"/>
31+
<selectOption selector="{{CheckoutShippingSection.addCountry}}" userInput="{{customerAddressVar.country}}" after="enterPostcode" stepKey="enterCountry"/>
32+
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{customerAddressVar.city}}" after="waitPageLoad" stepKey="seeCitySelected"/>
2533
</actionGroup>
2634
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@
4242
<element name="billingAddressSameAsShipping" type="checkbox" selector=".payment-method._active [name='billing-address-same-as-shipping']"/>
4343
<element name="orderSummaryTotal" type="text" selector="tr.grand.totals span.price" />
4444
<element name="checkPaymentMethodByName" type="radio" selector="//div[@id='checkout-payment-method-load']//div[contains(., '{{paymentName}}')]/..//input[@type='radio']" parameterized="true"/>
45+
<element name="noPaymentMethods" type="text" selector=".no-quotes-block"/>
4546
</section>
4647
</sections>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<element name="addState" type="select" selector="#shipping-new-address-form select[name='region_id']"/>
3131
<element name="addPostcode" type="input" selector="#shipping-new-address-form input[name='postcode']"/>
3232
<element name="addTelephone" type="input" selector="#shipping-new-address-form input[name='telephone']"/>
33-
<element name="addcCountry" type="select" selector="#shipping-new-address-form select[name='country_id']"/>
33+
<element name="addCountry" type="select" selector="#shipping-new-address-form select[name='country_id']"/>
3434
<element name="addSaveButton" type="button" selector=".action.primary.action-save-address"/>
3535
<element name="editActiveAddress" type="button" selector="//div[@class='shipping-address-item selected-item']//span[text()='Edit']" timeout="30"/>
3636
</section>

0 commit comments

Comments
 (0)