Skip to content

Commit a1c7584

Browse files
committed
Merge branch 'MAGETWO-93980' into 2.2-develop-mftf-pr11
2 parents af26538 + 0205843 commit a1c7584

File tree

126 files changed

+2227
-300
lines changed

Some content is hidden

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

126 files changed

+2227
-300
lines changed

app/code/Magento/Authorizenet/view/adminhtml/templates/order/view/info/fraud_details.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ $fraudDetails = $payment->getAdditionalInformation('fraud_details');
4444
<?php endif; ?>
4545

4646
<?php if(!empty($fraudDetails['fraud_filters'])): ?>
47-
<b><?= $block->escapeHtml(__('Fraud Filters')) ?>:
48-
</b></br>
47+
<strong><?= $block->escapeHtml(__('Fraud Filters')) ?>:
48+
</strong></br>
4949
<?php foreach($fraudDetails['fraud_filters'] as $filter): ?>
5050
<?= $block->escapeHtml($filter['name']) ?>:
5151
<?= $block->escapeHtml($filter['action']) ?>

app/code/Magento/Bundle/Test/Mftf/Page/StorefrontProductPage.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
1111
<page name="StorefrontProductPage" url="/{{var1}}.html" area="storefront" module="Magento_Catalog" parameterized="true">
1212
<section name="StorefrontBundledSection"/>
1313
</page>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
-->
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontProductInfoMainSection">
1212
<element name="priceFrom" type="text" selector=".product-info-price .price-from"/>
1313
<element name="priceTo" type="text" selector=".product-info-price .price-to"/>
1414
<element name="minPrice" type="text" selector="span[data-price-type='minPrice']"/>
1515
<element name="maxPrice" type="text" selector="span[data-price-type='minPrice']"/>
16+
<element name="productBundleOptionsCheckbox" type="checkbox" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{childName}}')]/../input" parameterized="true" timeout="30"/>
1617
</section>
1718
</sections>

app/code/Magento/Catalog/Model/ResourceModel/Category.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,20 @@ public function getProductsPosition($category)
484484
$this->getCategoryProductTable(),
485485
['product_id', 'position']
486486
)->where(
487-
'category_id = :category_id'
487+
"{$this->getTable('catalog_category_product')}.category_id = ?",
488+
$category->getId()
488489
);
490+
$websiteId = $category->getStore()->getWebsiteId();
491+
if ($websiteId) {
492+
$select->join(
493+
['product_website' => $this->getTable('catalog_product_website')],
494+
"product_website.product_id = {$this->getTable('catalog_category_product')}.product_id",
495+
[]
496+
)->where(
497+
'product_website.website_id = ?',
498+
$websiteId
499+
);
500+
}
489501
$bind = ['category_id' => (int)$category->getId()];
490502

491503
return $this->getConnection()->fetchPairs($select, $bind);

app/code/Magento/Catalog/Model/ResourceModel/Category/Flat.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,20 @@ public function getProductsPosition($category)
699699
$this->getTable('catalog_category_product'),
700700
['product_id', 'position']
701701
)->where(
702-
'category_id = :category_id'
702+
"{$this->getTable('catalog_category_product')}.category_id = ?",
703+
$category->getId()
703704
);
705+
$websiteId = $category->getStore()->getWebsiteId();
706+
if ($websiteId) {
707+
$select->join(
708+
['product_website' => $this->getTable('catalog_product_website')],
709+
"product_website.product_id = {$this->getTable('catalog_category_product')}.product_id",
710+
[]
711+
)->where(
712+
'product_website.website_id = ?',
713+
$websiteId
714+
);
715+
}
704716
$bind = ['category_id' => (int)$category->getId()];
705717

706718
return $this->getConnection()->fetchPairs($select, $bind);

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddProductToCartActionGroup.xml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
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
<actionGroup name="AddSimpleProductToCart">
1212
<arguments>
1313
<argument name="product" defaultValue="product"/>
1414
</arguments>
1515
<amOnPage stepKey="navigateProductPage" url="/{{product.name}}.html"/>
1616
<click stepKey="addToCart" selector="{{StorefrontProductPageSection.addToCartBtn}}"/>
1717
<waitForElementVisible selector="{{StorefrontProductPageSection.successMsg}}" time="30" stepKey="waitForProductAdded"/>
18-
</actionGroup>.
18+
</actionGroup>
19+
1920
<!--Click Add to Cart button in storefront product page-->
2021
<actionGroup name="addToCartFromStorefrontProductPage">
2122
<arguments>
@@ -28,4 +29,12 @@
2829
<waitForPageLoad stepKey="waitForPageLoad"/>
2930
<see selector="{{StorefrontMessagesSection.success}}" userInput="You added {{productName}} to your shopping cart." stepKey="seeAddToCartSuccessMessage"/>
3031
</actionGroup>
32+
33+
<actionGroup name="StorefrontAddProductToCartQuantityActionGroup" extends="addToCartFromStorefrontProductPage">
34+
<arguments>
35+
<argument name="quantity" type="string" defaultValue="1"/>
36+
</arguments>
37+
<waitForElementVisible selector="{{StorefrontProductPageSection.qtyInput}}" time="30" before="addToCart" stepKey="waitQuantityFieldVisible"/>
38+
<fillField selector="{{StorefrontProductPageSection.qtyInput}}" userInput="{{quantity}}" after="waitQuantityFieldVisible" stepKey="fillQuantityField"/>
39+
</actionGroup>
3140
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAddToCartCustomOptionsProductPageActionGroup.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<argument name="productName"/>
1414
</arguments>
1515
<click selector="{{StorefrontProductPageSection.addToCartBtn}}" stepKey="addToCart"/>
16-
<waitForPageLoad stepKey="waitForPageLoad"/>
1716
<see selector="{{StorefrontProductPageSection.successMsg}}" userInput="You added {{productName}} to your shopping cart." stepKey="seeAddToCartSuccessMessage"/>
1817
</actionGroup>
1918
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeOptionData.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1111
<entity name="productAttributeOption1" type="ProductAttributeOption">
1212
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
1313
<data key="label" unique="suffix">option1</data>
@@ -59,4 +59,20 @@
5959
<requiredEntity type="StoreLabel">Option6Store0</requiredEntity>
6060
<requiredEntity type="StoreLabel">Option6Store1</requiredEntity>
6161
</entity>
62+
<entity name="ProductAttributeOption7" type="ProductAttributeOption">
63+
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
64+
<data key="label" unique="suffix">Green</data>
65+
<data key="is_default">false</data>
66+
<data key="sort_order">3</data>
67+
<requiredEntity type="StoreLabel">Option7Store0</requiredEntity>
68+
<requiredEntity type="StoreLabel">Option8Store1</requiredEntity>
69+
</entity>
70+
<entity name="ProductAttributeOption8" type="ProductAttributeOption">
71+
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
72+
<data key="label" unique="suffix">Red</data>
73+
<data key="is_default">false</data>
74+
<data key="sort_order">3</data>
75+
<requiredEntity type="StoreLabel">Option9Store0</requiredEntity>
76+
<requiredEntity type="StoreLabel">Option10Store1</requiredEntity>
77+
</entity>
6278
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/StoreLabelData.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1111
<entity name="Option1Store0" type="StoreLabel">
1212
<data key="store_id">0</data>
1313
<data key="label">option1</data>
@@ -56,4 +56,20 @@
5656
<data key="store_id">1</data>
5757
<data key="label">option6</data>
5858
</entity>
59+
<entity name="Option7Store0" type="StoreLabel">
60+
<data key="store_id">0</data>
61+
<data key="label">Green</data>
62+
</entity>
63+
<entity name="Option8Store1" type="StoreLabel">
64+
<data key="store_id">1</data>
65+
<data key="label">Green</data>
66+
</entity>
67+
<entity name="Option9Store0" type="StoreLabel">
68+
<data key="store_id">0</data>
69+
<data key="label">Red</data>
70+
</entity>
71+
<entity name="Option10Store1" type="StoreLabel">
72+
<data key="store_id">1</data>
73+
<data key="label">Red</data>
74+
</entity>
5975
</entities>

app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryEditPage.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
<section name="AdminCategoryBasicFieldSection"/>
1717
<section name="AdminCategorySEOSection"/>
1818
<section name="AdminCategoryModalSection"/>
19+
<section name="AdminCategoryContentSection"/>
20+
<section name="AdminCategoryDisplaySettingsSection"/>
1921
</page>
2022
</pages>

0 commit comments

Comments
 (0)