Skip to content

Commit

Permalink
Merge branch '2.4-develop' of github.com:magento/magento2ce into impo…
Browse files Browse the repository at this point in the history
…rted-magento-magento2-30565
  • Loading branch information
omiroshnichenko committed Oct 21, 2020
2 parents 245b7e9 + 2f4d989 commit 72fea37
Show file tree
Hide file tree
Showing 43 changed files with 617 additions and 140 deletions.
1 change: 0 additions & 1 deletion app/code/Magento/AdminNotification/Block/ToolbarEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* Toolbar entry that shows latest notifications
*
* @api
* @author Magento Core Team <core@magentocommerce.com>
* @since 100.0.2
*/
class ToolbarEntry extends \Magento\Backend\Block\Template
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/AdminNotification/Model/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
/**
* AdminNotification Feed model
*
* @author Magento Core Team <core@magentocommerce.com>
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @api
* @since 100.0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
* AdminNotification Inbox interface
*
* @author Magento Core Team <core@magentocommerce.com>
* @api
* @since 100.0.2
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
* Notification service model
*
* @author Magento Core Team <core@magentocommerce.com>
* @api
* @since 100.0.2
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

/**
* AdminNotification Inbox model
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\AdminNotification\Model\ResourceModel\Grid;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
* AdminNotification Inbox model
*
* @api
* @author Magento Core Team <core@magentocommerce.com>
* @api
* @since 100.0.2
*/
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

/**
* Collection of unread notifications
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\AdminNotification\Model\ResourceModel\Inbox\Collection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

/**
* AdminNotification observer
*
* @author Magento Core Team <core@magentocommerce.com>
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
*/
class PredispatchAdminActionControllerObserver implements ObserverInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* Search queries relations grid container
*
* @api
* @author Magento Core Team <core@magentocommerce.com>
* @since 100.0.2
*/
class Edit extends \Magento\Backend\Block\Widget\Grid\Container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* Search query relations edit grid
*
* @api
* @author Magento Core Team <core@magentocommerce.com>
* @since 100.0.2
*/
class Grid extends \Magento\Backend\Block\Widget\Grid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
* Catalog search recommendations resource model
*
* @author Magento Core Team <core@magentocommerce.com>
* @api
* @since 100.0.2
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php
/**
* @category Magento
* @package Magento_CatalogInventory
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand All @@ -14,8 +12,6 @@

/**
* Abstract action reindex class
*
* @package Magento\CatalogInventory\Model\Indexer\Stock
*/
abstract class AbstractAction
{
Expand Down Expand Up @@ -283,6 +279,8 @@ private function doReindex($productIds = [])
}

/**
* Get cache cleaner object
*
* @return CacheCleaner
*/
private function getCacheCleaner()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php
/**
* @category Magento
* @package Magento_CatalogInventory
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand All @@ -10,8 +8,6 @@

/**
* Class Row reindex action
*
* @package Magento\CatalogInventory\Model\Indexer\Stock\Action
*/
class Row extends \Magento\CatalogInventory\Model\Indexer\Stock\AbstractAction
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php
/**
* @category Magento
* @package Magento_CatalogInventory
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand All @@ -10,8 +8,6 @@

/**
* Class Rows reindex action for mass actions
*
* @package Magento\CatalogInventory\Model\Indexer\Stock\Action
*/
class Rows extends \Magento\CatalogInventory\Model\Indexer\Stock\AbstractAction
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php
/**
* @category Magento
* @package Magento_CatalogInventory
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php
/**
* @category Magento
* @package Magento_CatalogInventory
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand All @@ -11,7 +9,7 @@
class Processor extends \Magento\Framework\Indexer\AbstractProcessor
{
/**
* Indexer ID
* Get Indexer ID for cataloginventory_stock
*/
const INDEXER_ID = 'cataloginventory_stock';
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?php
/**
* @category Magento
* @package Magento_CatalogInventory
* @subpackage unit_tests
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?php
/**
* @category Magento
* @package Magento_CatalogInventory
* @subpackage unit_tests
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?php
/**
* @category Magento
* @package Magento_CatalogInventory
* @subpackage unit_tests
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?php
/**
* @category Magento
* @package Magento_CatalogInventory
* @subpackage unit_tests
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="CheckoutSelectPurchaseOrderPaymentActionGroup">
<annotations>
<description>Selects the 'Purchase Order' Payment Method on the Storefront Checkout page.</description>
</annotations>

<arguments>
<argument name="purchaseOrderNumber" type="string"/>
</arguments>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<remove keyForRemoval="checkCheckMoneyOption"/>
<conditionalClick selector="{{CheckoutPaymentSection.purchaseOrderPayment}}" dependentSelector="{{CheckoutPaymentSection.purchaseOrderPayment}}" visible="true" stepKey="checkPurchaseOrderOption"/>
<fillField selector="{{StorefrontCheckoutPaymentMethodSection.purchaseOrderNumber}}" userInput="{{purchaseOrderNumber}}" stepKey="fillPurchaseOrderNumber"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<element name="cartItemsArea" type="button" selector="div.block.items-in-cart"/>
<element name="cartItemsAreaActive" type="textarea" selector="div.block.items-in-cart.active" timeout="30"/>
<element name="checkMoneyOrderPayment" type="radio" selector="input#checkmo.radio" timeout="30"/>
<element name="purchaseOrderPayment" type="radio" selector="input#purchaseorder.radio" timeout="30"/>
<element name="placeOrder" type="button" selector=".payment-method._active button.action.primary.checkout" timeout="30"/>
<element name="placeOrderWithoutTimeout" type="button" selector=".payment-method._active button.action.primary.checkout"/>
<element name="paymentSectionTitle" type="text" selector="//*[@id='checkout-payment-method-load']//div[@data-role='title']" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?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="StorefrontCheckoutWithPurchaseOrderNumberPressKeyEnterTest">
<annotations>
<features value="Checkout"/>
<stories value="Checkout with Purchase Order Payment. Create Order with Press Key Enter."/>
<title value="Create Checkout with purchase order payment method test. Press key Enter on field Purchase Order Number for create Order."/>
<description value="Create Checkout with purchase order payment method. Press key Enter on field Purchase Order Number for create Order."/>
<severity value="MAJOR"/>
<testCaseId value="MC-37227"/>
<group value="checkout"/>
</annotations>

<before>
<createData entity="SimpleTwo" stepKey="createSimpleProduct"/>

<!-- Enable payment method -->
<magentoCLI command="config:set {{PurchaseOrderEnableConfigData.path}} {{PurchaseOrderEnableConfigData.value}}" stepKey="enablePaymentMethod"/>
</before>

<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
<deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>

<!-- Disable payment method -->
<magentoCLI command="config:set {{PurchaseOrderDisabledConfigData.path}} {{PurchaseOrderDisabledConfigData.value}}" stepKey="disablePaymentMethod"/>
</after>

<!--Go to product page-->
<amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage"/>
<waitForPageLoad stepKey="waitForCatalogPageLoad"/>

<!--Add Product to Shopping Cart-->
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
<argument name="productName" value="$$createSimpleProduct.name$$"/>
</actionGroup>

<!--Go to Checkout-->
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>

<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSection">
<argument name="customerVar" value="CustomerEntityOne"/>
<argument name="customerAddressVar" value="CustomerAddressSimple"/>
</actionGroup>

<!-- Checkout select Purchase Order payment -->
<actionGroup ref="CheckoutSelectPurchaseOrderPaymentActionGroup" stepKey="selectPurchaseOrderPayment">
<argument name="purchaseOrderNumber" value="12345"/>
</actionGroup>

<!--Press Key ENTER-->
<pressKey selector="{{StorefrontCheckoutPaymentMethodSection.purchaseOrderNumber}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="pressKeyEnter"/>
<waitForPageLoad stepKey="waitForPageLoad"/>

<!--See success messages-->
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="seeSuccessTitle"/>
<see selector="{{CheckoutSuccessMainSection.orderNumberText}}" userInput="Your order # is: " stepKey="seeOrderNumber"/>

</test>

</tests>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?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="StorefrontCheckoutWithPurchaseOrderNumberTest">
<annotations>
<features value="Checkout"/>
<stories value="Checkout with Purchase Order Payment"/>
<title value="Create Checkout with purchase order payment method test"/>
<description value="Create Checkout with purchase order payment method"/>
<severity value="MAJOR"/>
<group value="checkout"/>
</annotations>

<before>
<createData entity="SimpleTwo" stepKey="createSimpleProduct"/>

<!-- Enable payment method -->
<magentoCLI command="config:set {{PurchaseOrderEnableConfigData.path}} {{PurchaseOrderEnableConfigData.value}}" stepKey="enablePaymentMethod"/>
</before>

<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
<deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>

<!-- Disable payment method -->
<magentoCLI command="config:set {{PurchaseOrderDisabledConfigData.path}} {{PurchaseOrderDisabledConfigData.value}}" stepKey="disablePaymentMethod"/>
</after>

<!--Go to product page-->
<amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage"/>
<waitForPageLoad stepKey="waitForCatalogPageLoad"/>

<!--Add Product to Shopping Cart-->
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
<argument name="productName" value="$$createSimpleProduct.name$$"/>
</actionGroup>

<!--Go to Checkout-->
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>

<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSection">
<argument name="customerVar" value="CustomerEntityOne"/>
<argument name="customerAddressVar" value="CustomerAddressSimple"/>
</actionGroup>

<!-- Checkout select Purchase Order payment -->
<actionGroup ref="CheckoutSelectPurchaseOrderPaymentActionGroup" stepKey="selectPurchaseOrderPayment">
<argument name="purchaseOrderNumber" value="12345"/>
</actionGroup>

<!--Click Place Order button-->
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
<waitForPageLoad stepKey="waitForPageLoad"/>

<!--See success messages-->
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="seeSuccessTitle"/>
<see selector="{{CheckoutSuccessMainSection.orderNumberText}}" userInput="Your order # is: " stepKey="seeOrderNumber"/>

</test>

</tests>
Loading

0 comments on commit 72fea37

Please sign in to comment.