Skip to content

Commit 9787c95

Browse files
committed
Merge branch '2.3-develop' into 622-customizable-options-update-cart
2 parents 62e0530 + c56341c commit 9787c95

File tree

305 files changed

+10371
-557
lines changed

Some content is hidden

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

305 files changed

+10371
-557
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontSelectBundleProductDropDownOptionActionGroup">
12+
<arguments>
13+
<argument name="productName" type="string"/>
14+
</arguments>
15+
<click selector="{{StorefrontBundleProductActionSection.dropdownSelectOption}}" stepKey="clickOnSelectOption"/>
16+
<click selector="{{StorefrontBundleProductActionSection.dropdownProductSelection(productName)}}" stepKey="selectProduct"/>
17+
</actionGroup>
18+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup">
12+
<waitForElementVisible selector="{{StorefrontBundleProductActionSection.customizeAndAddToCartButton}}" stepKey="waitForCustomizeAndAddToCartButton"/>
13+
<click selector="{{StorefrontBundleProductActionSection.customizeAndAddToCartButton}}" stepKey="clickOnCustomizeAndAddToCartButton"/>
14+
<waitForPageLoad stepKey="waitForPageLoad"/>
15+
</actionGroup>
16+
</actionGroups>

app/code/Magento/Bundle/Test/Mftf/Data/ProductData.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,20 @@
9191
<requiredEntity type="custom_attribute">CustomAttributeFixPrice</requiredEntity>
9292
<requiredEntity type="custom_attribute">CustomAttributePriceView</requiredEntity>
9393
</entity>
94+
<entity name="BundleProductPriceViewRange" type="product2">
95+
<data key="name" unique="suffix">BundleProduct</data>
96+
<data key="sku" unique="suffix">bundle-product</data>
97+
<data key="type_id">bundle</data>
98+
<data key="attribute_set_id">4</data>
99+
<data key="visibility">4</data>
100+
<data key="status">1</data>
101+
<data key="urlKey" unique="suffix">bundle-product</data>
102+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
103+
<requiredEntity type="custom_attribute">CustomAttributeCategoryIds</requiredEntity>
104+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
105+
<requiredEntity type="custom_attribute">ApiProductDescription</requiredEntity>
106+
<requiredEntity type="custom_attribute">ApiProductShortDescription</requiredEntity>
107+
<requiredEntity type="custom_attribute">CustomAttributeDynamicPrice</requiredEntity>
108+
<requiredEntity type="custom_attribute">CustomAttributePriceViewRange</requiredEntity>
109+
</entity>
94110
</entities>

app/code/Magento/Bundle/Test/Mftf/Section/StorefrontBundledSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@
3737
<element name="multiselectOptionFourProducts" type="multiselect" selector="//label//span[contains(text(), '{{productName}}')]/../..//select[@multiple='multiple']" parameterized="true"/>
3838
<element name="currencyTrigger" type="select" selector="#switcher-currency-trigger" timeout="30"/>
3939
<element name="currency" type="select" selector="//a[text()='{{arg}}']" parameterized="true"/>
40+
<element name="multiSelectOption" type="select" selector="//div[@class='field option required']//select"/>
4041
</section>
4142
</sections>

app/code/Magento/Bundle/Test/Mftf/Section/StorefrontProductActionSection.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="StorefrontBundleProductActionSection">
11-
<element name="customizeAndAddToCartButton" type="button" selector="#bundle-slide"/>
11+
<element name="customizeAndAddToCartButton" type="button" selector="#bundle-slide" timeout="30"/>
1212
<element name="quantityField" type="input" selector="#qty"/>
13-
<element name="addToCartButton" type="button" selector="#product-addtocart-button"/>
13+
<element name="addToCartButton" type="button" selector="#product-addtocart-button" timeout="30"/>
14+
<element name="dropdownSelectOption" type="select" selector="//div[@class='control']/select"/>
15+
<element name="dropdownProductSelection" type="select" selector="//div[@class='control']/select/option[contains(.,'{{productName}}')]" parameterized="true"/>
1416
</section>
1517
</sections>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
<features value="Bundle"/>
1414
<stories value="View bundle products"/>
1515
<title value="Check tier prices for bundle options"/>
16+
<description value="Check tier prices for bundle options"/>
1617
<testCaseId value="MAGETWO-98968"/>
1718
<useCaseId value="MAGETWO-98603"/>
19+
<severity value="AVERAGE"/>
1820
<group value="catalog"/>
1921
<group value="bundle"/>
2022
</annotations>

app/code/Magento/Catalog/Block/Product/View.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,7 @@ public function getAddToCartUrl($product, $additional = [])
169169
}
170170

171171
/**
172-
* Get JSON encoded configuration array which can be used for JS dynamic
173-
* price calculation depending on product options
172+
* Get JSON encoded configuration which can be used for JS dynamic price calculation depending on product options
174173
*
175174
* @return string
176175
*/
@@ -262,6 +261,7 @@ public function isStartCustomization()
262261

263262
/**
264263
* Get default qty - either as preconfigured, or as 1.
264+
*
265265
* Also restricts it by minimal qty.
266266
*
267267
* @param null|\Magento\Catalog\Model\Product $product
@@ -323,10 +323,7 @@ public function getQuantityValidators()
323323
public function getIdentities()
324324
{
325325
$identities = $this->getProduct()->getIdentities();
326-
$category = $this->_coreRegistry->registry('current_category');
327-
if ($category) {
328-
$identities[] = Category::CACHE_TAG . '_' . $category->getId();
329-
}
326+
330327
return $identities;
331328
}
332329

app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use Magento\Framework\DB\Select;
2020
use Magento\Framework\EntityManager\MetadataPool;
2121
use Magento\Framework\Indexer\DimensionFactory;
22-
use Magento\Framework\Model\ResourceModel\ResourceModelPoolInterface;
2322
use Magento\Store\Model\Indexer\WebsiteDimensionProvider;
2423
use Magento\Store\Model\Store;
2524

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AddWebsiteToProductActionGroup">
12+
<arguments>
13+
<argument name="website" type="string"/>
14+
</arguments>
15+
<scrollTo selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="scrollToProductInWebsiteSectionHeader"/>
16+
<click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="clickProductInWebsiteSectionHeader"/>
17+
<checkOption selector="{{ProductInWebsitesSection.website(website)}}" stepKey="checkWebsite"/>
18+
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
19+
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
20+
<waitForPageLoad stepKey="waitForSimpleProductSaved"/>
21+
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertProductSaveSuccessMessage"/>
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<!-- You must already be on the product form > Advanced Inventory;
11+
Action group can be used for customer group price and tier price -->
12+
<actionGroup name="AdminAddAdvancedPricingToTheProductActionGroup">
13+
<arguments>
14+
<argument name="index" type="string"/>
15+
<argument name="groupPrice" type="entity"/>
16+
</arguments>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
<click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickAdvancedPricingLink"/>
19+
<click selector="{{AdminProductFormAdvancedPricingSection.addCustomerGroupPrice}}" stepKey="clickCustomerGroupPriceAddButton"/>
20+
<selectOption selector="{{AdminProductFormAdvancedPricingSection.productTierPriceWebsiteSelect(index)}}" userInput="{{groupPrice.website_id}}" stepKey="selectProductTierPriceWebsiteInput"/>
21+
<selectOption selector="{{AdminProductFormAdvancedPricingSection.productTierPriceCustGroupSelect(index)}}" userInput="{{groupPrice.customer_group}}" stepKey="selectProductTierPriceCustomerGroupInput"/>
22+
<fillField selector="{{AdminProductFormAdvancedPricingSection.productTierPriceQtyInput(index)}}" userInput="{{groupPrice.quantity}}" stepKey="fillProductTierPriceQuantityInput"/>
23+
<fillField selector="{{AdminProductFormAdvancedPricingSection.productTierPriceFixedPriceInput(index)}}" userInput="{{groupPrice.price}}" stepKey="selectProductTierPriceFixedPrice"/>
24+
<click selector="{{AdminProductFormAdvancedPricingSection.doneButton}}" stepKey="clickDoneButton"/>
25+
</actionGroup>
26+
27+
<!-- Customer group is selected in different way for B2B -->
28+
<actionGroup name="AdminAddAdvancedPricingToTheProductExtendedActionGroup" extends="AdminAddAdvancedPricingToTheProductActionGroup">
29+
<remove keyForRemoval="selectProductTierPriceCustomerGroupInput"/>
30+
<click selector="{{AdminProductFormAdvancedPricingSection.productTierPriceCustGroupSelect(index)}}" stepKey="clickProductTierPriceCustGroupSelect" after="selectProductTierPriceWebsiteInput"/>
31+
<waitForElement selector="{{AdminProductFormAdvancedPricingSection.productTierPriceGroupOrCatalogOption(groupPrice.customer_group)}}" time="30" stepKey="waitProductTierPriceGroupOrCatalogOption" after="clickProductTierPriceCustGroupSelect"/>
32+
<click selector="{{AdminProductFormAdvancedPricingSection.productTierPriceGroupOrCatalogOption(groupPrice.customer_group)}}" stepKey="clickAllGroupsOption" after="waitProductTierPriceGroupOrCatalogOption"/>
33+
</actionGroup>
34+
</actionGroups>

0 commit comments

Comments
 (0)