Skip to content

Commit

Permalink
Merge remote-tracking branch 'mainline/2.3-develop' into resource-mod…
Browse files Browse the repository at this point in the history
…el-pool
  • Loading branch information
p-bystritsky committed Jan 8, 2019
2 parents 5fbfe77 + b3d9a05 commit e21f53b
Show file tree
Hide file tree
Showing 253 changed files with 3,466 additions and 732 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The Magento 2 development team will review all issues and contributions submitte
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.
3. PRs which include new logic or new features must be submitted along with:
* Unit/integration test coverage
* Proposed [documentation](http://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
* Proposed [documentation](https://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
4. For larger features or changes, please [open an issue](https://github.com/magento/magento2/issues) to discuss the proposed changes prior to development. This may prevent duplicate or unnecessary effort and allow other contributors to provide input.
5. All automated tests must pass (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).

Expand All @@ -27,7 +27,7 @@ If you are a new GitHub user, we recommend that you create your own [free github
1. Search current [listed issues](https://github.com/magento/magento2/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution.
2. Review the [Contributor License Agreement](https://magento.com/legaldocuments/mca) if this is your first time contributing.
3. Create and test your work.
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#pull_request).
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#pull_request).
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.

## Code of Conduct
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ To get detailed information about changes in Magento 2.3.0, see the [Release Not

2.1.0
=============
To get detailed information about changes in Magento 2.1.0, please visit [Magento Community Edition (CE) Release Notes](http://devdocs.magento.com/guides/v2.1/release-notes/ReleaseNotes2.1.0CE.html "Magento Community Edition (CE) Release Notes")
To get detailed information about changes in Magento 2.1.0, please visit [Magento Community Edition (CE) Release Notes](https://devdocs.magento.com/guides/v2.1/release-notes/ReleaseNotes2.1.0CE.html "Magento Community Edition (CE) Release Notes")

2.0.0
=============
Expand Down Expand Up @@ -1025,7 +1025,7 @@ Tests:
* Improved backend menu keyboard accessibility
* Accessibility improvements: WAI-ARIA in a product item on a category page and related products
* Checkout flow code can work with a separate DB storage
* <a href="http://devdocs.magento.com/guides/v1.0/release-notes/changes.html#change-devrc-unit">Unit tests moved to module directories</a>
* <a href="https://devdocs.magento.com/guides/v1.0/release-notes/changes.html#change-devrc-unit">Unit tests moved to module directories</a>
* Addressed naming inconsistencies in REST routes
* Added Advanced Developer workflow for frontend developers
* Setup
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Analytics/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Magento_Analytics Module

The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://magento.com/products/business-intelligence) to use [Advanced Reporting](http://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html) functionality.
The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://magento.com/products/business-intelligence) to use [Advanced Reporting](https://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html) functionality.

The module implements the following functionality:

Expand All @@ -16,8 +16,8 @@ The module implements the following functionality:

## Structure

Beyond the [usual module file structure](http://devdocs.magento.com/guides/v2.2/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `ReportXml`.
[Report XML](http://devdocs.magento.com/guides/v2.2/advanced-reporting/report-xml.html) is a markup language used to build reports for Advanced Reporting.
Beyond the [usual module file structure](https://devdocs.magento.com/guides/v2.2/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `ReportXml`.
[Report XML](https://devdocs.magento.com/guides/v2.2/advanced-reporting/report-xml.html) is a markup language used to build reports for Advanced Reporting.
The language declares SQL queries using XML declaration.

## Subscription Process
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Authorizenet/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<cgi_url_td_test_mode>https://apitest.authorize.net/xml/v1/request.api</cgi_url_td_test_mode>
<cgi_url_td>https://api2.authorize.net/xml/v1/request.api</cgi_url_td>
<paymentInfoKeys>x_card_type,x_account_number,x_avs_code,x_auth_code,x_response_reason_text,x_cvv2_resp_code</paymentInfoKeys>
<group>authorizenet</group>
</authorizenet_directpost>
</payment>
</default>
Expand Down
15 changes: 15 additions & 0 deletions app/code/Magento/Authorizenet/etc/payment.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<payment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Payment:etc/payment.xsd">
<groups>
<group id="authorizenet">
<label>Authorize.net</label>
</group>
</groups>
</payment>
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Model/Search/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function load()

$this->searchCriteriaBuilder->setCurrentPage($this->getStart());
$this->searchCriteriaBuilder->setPageSize($this->getLimit());
$searchFields = ['firstname', 'lastname', 'company'];
$searchFields = ['firstname', 'lastname', 'billing_company'];
$filters = [];
foreach ($searchFields as $field) {
$filters[] = $this->filterBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminSlideOutDialogSection">
<element name="closeButton" type="button" selector=".modal-slide._show [data-role='closeBtn']" timeout="30"/>
<element name="cancelButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Cancel']" timeout="30"/>
<element name="doneButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Done']" timeout="30"/>
<element name="saveButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Save']" timeout="30"/>
</section>
</sections>
4 changes: 4 additions & 0 deletions app/code/Magento/Braintree/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<paymentInfoKeys>cc_type,cc_number,avsPostalCodeResponseCode,avsStreetAddressResponseCode,cvvResponseCode,processorAuthorizationCode,processorResponseCode,processorResponseText,liabilityShifted,liabilityShiftPossible,riskDataId,riskDataDecision</paymentInfoKeys>
<avs_ems_adapter>Magento\Braintree\Model\AvsEmsCodeMapper</avs_ems_adapter>
<cvv_ems_adapter>Magento\Braintree\Model\CvvEmsCodeMapper</cvv_ems_adapter>
<group>braintree</group>
</braintree>
<braintree_paypal>
<model>BraintreePayPalFacade</model>
Expand All @@ -67,6 +68,7 @@
<privateInfoKeys>processorResponseCode,processorResponseText,paymentId</privateInfoKeys>
<paymentInfoKeys>processorResponseCode,processorResponseText,paymentId,payerEmail</paymentInfoKeys>
<supported_locales>en_US,en_GB,en_AU,da_DK,fr_FR,fr_CA,de_DE,zh_HK,it_IT,nl_NL,no_NO,pl_PL,es_ES,sv_SE,tr_TR,pt_BR,ja_JP,id_ID,ko_KR,pt_PT,ru_RU,th_TH,zh_CN,zh_TW</supported_locales>
<group>braintree</group>
</braintree_paypal>
<braintree_cc_vault>
<model>BraintreeCreditCardVaultFacade</model>
Expand All @@ -76,6 +78,7 @@
<tokenFormat>Magento\Braintree\Model\InstantPurchase\CreditCard\TokenFormatter</tokenFormat>
<additionalInformation>Magento\Braintree\Model\InstantPurchase\PaymentAdditionalInformationProvider</additionalInformation>
</instant_purchase>
<group>braintree</group>
</braintree_cc_vault>
<braintree_paypal_vault>
<model>BraintreePayPalVaultFacade</model>
Expand All @@ -85,6 +88,7 @@
<tokenFormat>Magento\Braintree\Model\InstantPurchase\PayPal\TokenFormatter</tokenFormat>
<additionalInformation>Magento\Braintree\Model\InstantPurchase\PaymentAdditionalInformationProvider</additionalInformation>
</instant_purchase>
<group>braintree</group>
</braintree_paypal_vault>
</payment>
</default>
Expand Down
15 changes: 15 additions & 0 deletions app/code/Magento/Braintree/etc/payment.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<payment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Payment:etc/payment.xsd">
<groups>
<group id="braintree">
<label>Braintree</label>
</group>
</groups>
</payment>
17 changes: 12 additions & 5 deletions app/code/Magento/Bundle/Model/Product/SaveHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public function __construct(
}

/**
* Perform action on Bundle product relation/extension attribute
*
* @param object $entity
* @param array $arguments
*
Expand All @@ -83,7 +85,7 @@ public function execute($entity, $arguments = [])
: [];

if (!$entity->getCopyFromView()) {
$this->processRemovedOptions($entity->getSku(), $existingOptionsIds, $optionIds);
$this->processRemovedOptions($entity, $existingOptionsIds, $optionIds);
$newOptionsIds = array_diff($optionIds, $existingOptionsIds);
$this->saveOptions($entity, $bundleProductOptions, $newOptionsIds);
} else {
Expand All @@ -96,6 +98,8 @@ public function execute($entity, $arguments = [])
}

/**
* Remove option product links
*
* @param string $entitySku
* @param \Magento\Bundle\Api\Data\OptionInterface $option
* @return void
Expand Down Expand Up @@ -154,16 +158,19 @@ private function getOptionIds(array $options): array
/**
* Removes old options that no longer exists.
*
* @param string $entitySku
* @param ProductInterface $entity
* @param array $existingOptionsIds
* @param array $optionIds
* @return void
*/
private function processRemovedOptions(string $entitySku, array $existingOptionsIds, array $optionIds): void
private function processRemovedOptions(ProductInterface $entity, array $existingOptionsIds, array $optionIds): void
{
$metadata = $this->metadataPool->getMetadata(ProductInterface::class);
$parentId = $entity->getData($metadata->getLinkField());
foreach (array_diff($existingOptionsIds, $optionIds) as $optionId) {
$option = $this->optionRepository->get($entitySku, $optionId);
$this->removeOptionLinks($entitySku, $option);
$option = $this->optionRepository->get($entity->getSku(), $optionId);
$option->setParentId($parentId);
$this->removeOptionLinks($entity->getSku(), $option);
$this->optionRepository->delete($option);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,20 @@ public function save(\Magento\Catalog\Api\Data\CategoryProductLinkInterface $pro
*
* @throws \Magento\Framework\Exception\CouldNotSaveException
* @throws \Magento\Framework\Exception\StateException
* @throws \Magento\Framework\Exception\InputException
*/
public function delete(\Magento\Catalog\Api\Data\CategoryProductLinkInterface $productLink);

/**
* Remove the product assignment from the category by category id and sku
*
* @param string $sku
* @param string $categoryId
* @param string $sku
* @return bool will returned True if products successfully deleted
*
* @throws \Magento\Framework\Exception\CouldNotSaveException
* @throws \Magento\Framework\Exception\StateException
* @throws \Magento\Framework\Exception\InputException
*/
public function deleteByIds($categoryId, $sku);
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function apply(\Magento\Framework\App\RequestInterface $request)
}

/**
* Get fiter items count
* Get filter items count
*
* @return int
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
<section name="StorefrontMessagesSection">
<element name="success" type="text" selector="div.message-success.success.message"/>
<element name="error" type="text" selector="div.message-error.error.message"/>
<element name="noticeMessage" type="text" selector="div.message-notice"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@
<!--Create new order-->
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="CreateNewOrder">
<argument name="customer" value="Simple_US_Customer"/>
<argument name="storeView" value="customStoreView"/>
</actionGroup>
<click selector="{{OrdersGridSection.website('secondStoreView')}}" stepKey="ClickToSelectStore"/>
<waitForPageLoad stepKey="waitForPageOpened"/>

<click selector="{{OrdersGridSection.addProducts}}" stepKey="clickToAddProduct"/>
<waitForPageLoad stepKey="waitForProductsOpened"/>
<!--TEST CASE #1-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<severity value="CRITICAL"/>
<testCaseId value="MAGETWO-61717"/>
<group value="Catalog"/>
<!-- skip due to MAGETWO-97424 -->
<group value="skip"/>
</annotations>
<before>
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CatalogAnalytics/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Magento_CatalogAnalytics module

The Magento_CatalogAnalytics module configures data definitions for a data collection related to the Catalog module entities to be used in [Advanced Reporting](http://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html).
The Magento_CatalogAnalytics module configures data definitions for a data collection related to the Catalog module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html).
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
<section name="StorefrontCheckoutPaymentMethodSection">
<element name="billingAddress" type="text" selector=".checkout-billing-address"/>
<element name="checkPaymentMethodByName" type="radio" selector="//div[@id='checkout-payment-method-load']//div[@class='payment-method']//label//span[contains(., '{{methodName}}')]/../..//input" parameterized="true"/>
<element name="billingAddressSameAsShipping" type="checkbox" selector=".payment-method._active [name='billing-address-same-as-shipping']"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?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="StorefrontShoppingCartCheckCustomerDefaultShippingAddressForVirtualQuoteTest">
<annotations>
<features value="Checkout"/>
<stories value="Estimator in Shopping cart must be pre-filled by Customer default shipping address for virtual quote"/>
<title value="Estimator in Shopping cart must be pre-filled by Customer default shipping address for virtual quote"/>
<description value="Estimator in Shopping cart must be pre-filled by Customer default shipping address for virtual quote"/>
<severity value="CRITICAL"/>
<testCaseId value="MAGETWO-46795"/>
<group value="checkout"/>
</annotations>
<before>
<createData entity="_defaultCategory" stepKey="createCategory"/>
<createData entity="defaultVirtualProduct" stepKey="createVirtualProduct">
<requiredEntity createDataKey="createCategory"/>
</createData>
<createData entity="Simple_US_Customer_CA" stepKey="createCustomer">
<field key="group_id">1</field>
</createData>
</before>
<after>
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
<deleteData createDataKey="createVirtualProduct" stepKey="deleteVirtualProduct"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
</after>
<!-- Steps -->
<!-- Step 1: Go to Storefront as Customer -->
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
<argument name="Customer" value="$$createCustomer$$" />
</actionGroup>
<!-- Step 2: Add virtual product to cart -->
<amOnPage url="{{StorefrontProductPage.url($$createVirtualProduct.custom_attributes[url_key]$)}}" stepKey="amOnPage"/>
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
<argument name="product" value="$$createVirtualProduct$$"/>
<argument name="productCount" value="1"/>
</actionGroup>
<!-- Step 3: Go to Shopping Cart -->
<actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="goToShoppingcart"/>
<!-- Step 4: Open Estimate Tax section -->
<click selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" stepKey="openEstimateTaxSection"/>
<see selector="{{CheckoutCartSummarySection.country}}" userInput="{{US_Address_CA.country_id}}" stepKey="checkCountry"/>
<see selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="{{US_Address_CA.state}}" stepKey="checkState"/>
<scrollTo selector="{{CheckoutCartSummarySection.postcode}}" stepKey="scrollToPostCodeField"/>
<grabValueFrom selector="{{CheckoutCartSummarySection.postcode}}" stepKey="grabTextPostCode"/>
<assertEquals message="Customer postcode is invalid" stepKey="checkCustomerPostcode">
<expectedResult type="string">{{US_Address_CA.postcode}}</expectedResult>
<actualResult type="variable">grabTextPostCode</actualResult>
</assertEquals>
</test>
</tests>
5 changes: 4 additions & 1 deletion app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
*/
namespace Magento\Cms\Controller\Adminhtml\Block;

use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
use Magento\Framework\App\Action\HttpGetActionInterface;

/**
* Edit CMS block action.
*/
class Edit extends \Magento\Cms\Controller\Adminhtml\Block implements HttpGetActionInterface
{
/**
Expand Down
Loading

0 comments on commit e21f53b

Please sign in to comment.