Skip to content

Commit 2e9384d

Browse files
authored
Merge pull request #13 from magento/2.3-develop
2.3 develop
2 parents eaf98d1 + 3df1425 commit 2e9384d

File tree

127 files changed

+789
-112
lines changed

Some content is hidden

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

127 files changed

+789
-112
lines changed

app/code/Magento/AdvancedSearch/Block/SearchData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ abstract class SearchData extends Template implements SearchDataInterface
3030
/**
3131
* @var string
3232
*/
33-
protected $_template = 'search_data.phtml';
33+
protected $_template = 'Magento_AdvancedSearch::search_data.phtml';
3434

3535
/**
3636
* @param Template\Context $context

app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,18 @@ protected function _toHtml()
124124
if (!$this->_depends) {
125125
return '';
126126
}
127-
return '<script>
128-
require(["mage/adminhtml/form"], function(){
129-
new FormElementDependenceController(' .
130-
$this->_getDependsJson() .
131-
($this->_configOptions ? ', ' .
132-
$this->_jsonEncoder->encode(
133-
$this->_configOptions
134-
) : '') . '); });</script>';
127+
128+
$params = $this->_getDependsJson();
129+
130+
if ($this->_configOptions) {
131+
$params .= ', ' . $this->_jsonEncoder->encode($this->_configOptions);
132+
}
133+
134+
return "<script>
135+
require(['mage/adminhtml/form'], function(){
136+
new FormElementDependenceController({$params});
137+
});
138+
</script>";
135139
}
136140

137141
/**

app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<section name="AdminMessagesSection">
1212
<element name="success" type="text" selector="#messages div.message-success"/>
1313
<element name="nthSuccess" type="text" selector=".message.message-success.success:nth-of-type({{n}})>div" parameterized="true"/>
14+
<element name="error" type="text" selector="#messages div.message-error"/>
1415
</section>
1516
</sections>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<!-- Add Bundle Product to Cart from the category page with specified quantity to cart -->
12+
<actionGroup name="StorefrontAddCategoryBundleProductToCartActionGroup">
13+
<arguments>
14+
<argument name="product"/>
15+
<argument name="quantity" defaultValue="1" type="string"/>
16+
</arguments>
17+
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" />
18+
<click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="clickAddToCart" />
19+
<waitForPageLoad time="30" stepKey="waitForPageLoad1"/>
20+
<click selector="{{StorefrontBundleProductActionSection.customizeAndAddToCartButton}}" stepKey="clickCustomizeAndAddToCart"/>
21+
<waitForPageLoad time="30" stepKey="waitForPageLoad2"/>
22+
<fillField selector="{{StorefrontBundleProductActionSection.quantityField}}" userInput="{{quantity}}" stepKey="fillBundleProductQuantity"/>
23+
<click selector="{{StorefrontBundleProductActionSection.addToCartButton}}" stepKey="clickAddBundleProductToCart"/>
24+
<waitForPageLoad time="30" stepKey="waitForPageLoad3"/>
25+
<waitForText userInput="{{quantity}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/>
26+
</actionGroup>
27+
</actionGroups>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
10+
<section name="StorefrontBundleProductActionSection">
11+
<element name="customizeAndAddToCartButton" type="button" selector="#bundle-slide"/>
12+
<element name="quantityField" type="input" selector="#qty"/>
13+
<element name="addToCartButton" type="button" selector="#product-addtocart-button"/>
14+
</section>
15+
</sections>

app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,16 @@
7575
<seeElement stepKey="LookingForNameOfProduct" selector="{{BundleStorefrontSection.bundleProductName}}"/>
7676

7777
<!--Testing disabled view-->
78-
<actionGroup ref="FindProductToEdit" stepKey="FindProductEditPage"/>
78+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="GoToProductCatalog"/>
79+
<waitForPageLoad stepKey="WaitForCatalogProductPageToLoad"/>
80+
<actionGroup ref="filterProductGridBySku" stepKey="FindProductEditPage">
81+
<argument name="product" value="BundleProduct"/>
82+
</actionGroup>
83+
<click selector="{{AdminDataGridTableSection.rowViewAction('1')}}" stepKey="ClickProductInGrid"/>
7984
<click stepKey="ClickOnEnableDisableToggle" selector="{{AdminProductFormBundleSection.enableDisableToggle}}"/>
8085
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButtonAgain"/>
81-
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown2"/>
8286
<waitForPageLoad stepKey="PauseForSave"/>
87+
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShownAgain"/>
8388
<amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="GoToProductPageAgain"/>
8489
<waitForPageLoad stepKey="WaitForProductPageToLoadToShowElement"/>
8590
<dontSeeElement stepKey="LookingForNameOfProductTwo" selector="{{BundleStorefrontSection.bundleProductName}}"/>

app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Attribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ class Attribute extends \Magento\Backend\Block\Template
1414
/**
1515
* @var string
1616
*/
17-
protected $_template = 'catalog/product/attribute/set/main/tree/attribute.phtml';
17+
protected $_template = 'Magento_Catalog::catalog/product/attribute/set/main/tree/attribute.phtml';
1818
}

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormActionSection.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
<element name="backButton" type="button" selector="#back" timeout="30"/>
1313
<element name="saveButton" type="button" selector="#save-button" timeout="30"/>
1414
<element name="saveArrow" type="button" selector="button[data-ui-id='save-button-dropdown']" timeout="30"/>
15-
<!--<element name="saveAndClose" type="button" selector="span[title='Save &amp; Close']" timeout="30"/>-->
16-
<element name="saveAndClose" type="button" selector="span[id='save_and_close']" timeout="30"/>
15+
<element name="saveAndClose" type="button" selector="span[title='Save &amp; Close']" timeout="30"/>
1716
<element name="changeStoreButton" type="button" selector="#store-change-button" timeout="10"/>
1817
<element name="selectStoreView" type="button" selector="//ul[@data-role='stores-list']/li/a[normalize-space(.)='{{var1}}']" timeout="10" parameterized="true"/>
1918
</section>

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,24 @@
2121
<waitForText userInput="{{productCount}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/>
2222
</actionGroup>
2323

24+
<!-- Add Product to Cart from the category page with specified quantity and check message and product count in Minicart -->
25+
<actionGroup name="StorefrontAddCategoryProductToCartWithQuantityActionGroup">
26+
<arguments>
27+
<argument name="product"/>
28+
<argument name="quantity" defaultValue="1" type="string"/>
29+
<argument name="checkQuantity" defaultValue="1" type="string"/>
30+
</arguments>
31+
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" />
32+
<click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="clickAddToCart" />
33+
<!-- @TODO: Use general message selector after MQE-694 is fixed -->
34+
<waitForElement selector="{{StorefrontMessagesSection.messageProductAddedToCart(product.name)}}" time="30" stepKey="assertMessage"/>
35+
<waitForText userInput="{{checkQuantity}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/>
36+
<conditionalClick selector="{{StorefrontMinicartSection.showCart}}" dependentSelector="{{StorefrontMinicartSection.miniCartOpened}}" visible="false" stepKey="openMiniCart"/>
37+
<waitForElementVisible selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForViewAndEditCartVisible"/>
38+
<fillField selector="{{StorefrontMinicartSection.itemQuantity(product.name)}}" userInput="{{quantity}}" stepKey="setProductQtyToFiftyInMiniCart"/>
39+
<click selector="{{StorefrontMinicartSection.itemQuantityUpdate(product.name)}}" stepKey="updateQtyInMiniCart"/>
40+
</actionGroup>
41+
2442
<!-- Add Product to Cart from the product page and check message and product count in Minicart -->
2543
<actionGroup name="StorefrontAddProductToCartActionGroup">
2644
<arguments>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@
2323
<element name="viewAndEditCart" type="button" selector=".action.viewcart" timeout="30"/>
2424
<element name="miniCartItemsText" type="text" selector=".minicart-items"/>
2525
<element name="deleteMiniCartItem" type="button" selector=".action.delete" timeout="30"/>
26+
<element name="itemQuantity" type="input" selector="//a[text()='{{productName}}']/../..//input[contains(@class,'cart-item-qty')]" parameterized="true"/>
27+
<element name="itemQuantityUpdate" type="button" selector="//a[text()='{{productName}}']/../..//span[text()='Update']" parameterized="true"/>
2628
</section>
2729
</sections>

0 commit comments

Comments
 (0)