Skip to content

Commit a3fe77f

Browse files
committed
Merge remote-tracking branch 'upstream/2.3-develop' into feature/bundle-cart
2 parents be26487 + 90200f6 commit a3fe77f

File tree

209 files changed

+5238
-530
lines changed

Some content is hidden

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

209 files changed

+5238
-530
lines changed

app/code/Magento/AuthorizenetGraphQl/etc/schema.graphqls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright © Magento, Inc. All rights reserved.
22
# See COPYING.txt for license details.
33

4-
input PaymentMethodAdditionalDataInput {
4+
input PaymentMethodInput {
55
authorizenet_acceptjs: AuthorizenetInput @doc(description: "Defines the required attributes for Authorize.Net payments")
66
}
77

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminClickFormActionButtonActionGroup">
12+
<arguments>
13+
<argument name="buttonSelector" type="string" />
14+
</arguments>
15+
<waitForElementVisible selector="{{buttonSelector}}" stepKey="waitForButton"/>
16+
<click selector="{{buttonSelector}}" stepKey="clickButton"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>
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="AdminFilterLegacyGridActionGroup">
12+
<arguments>
13+
<argument name="fieldSelector" type="string"/>
14+
<argument name="value" type="string"/>
15+
<argument name="button" type="string" defaultValue="{{AdminLegacyDataGridFilterSection.apply}}"/>
16+
</arguments>
17+
<click selector="{{AdminLegacyDataGridFilterSection.clear}}" stepKey="resetFilters" />
18+
<waitForPageLoad stepKey="waitForFilterReset" />
19+
<fillField selector="{{field}}" userInput="{{value}}" stepKey="fillFieldInFilter"/>
20+
<click selector="{{button}}" stepKey="clickSearchButton"/>
21+
<waitForPageLoad stepKey="waitForFiltersApply" />
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="AdminResetLegacyGridFilterActionGroup">
12+
<arguments>
13+
<argument name="selector" type="string" defaultValue="{{AdminLegacyDataGridFilterSection.clear}}"/>
14+
</arguments>
15+
<click selector="{{selector}}" stepKey="clickResetButton"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminLegacyDataGridFilterSection">
12+
<element name="filterForm" type="block" selector="[data-role='filter-form']" />
13+
<element name="inputFieldByNameAttr" type="input" selector="[data-role='filter-form'] input[name='{{inputNameAttr}}']" parameterized="true" />
14+
<element name="apply" type="button" selector=".admin__data-grid-header [data-action='grid-filter-apply']" />
15+
<element name="clear" type="button" selector=".admin__data-grid-header [data-action='grid-filter-reset']" />
16+
</section>
17+
</sections>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminLegacyDataGridTableSection">
12+
<element name="rowTemplateStrict" type="block" selector="//tbody/tr[td[text()[normalize-space()='{{text}}']]]" parameterized="true" />
13+
<element name="rowTemplate" type="block" selector="//tbody/tr[td[contains(.,normalize-space('{{text}}'))]]" parameterized="true" />
14+
<element name="columnTemplateStrict" type="block" selector="//tbody/tr[td[contains(.,normalize-space('{{text}}'))]]/td[@data-column='{{dataColumn}}']" parameterized="true" />
15+
<element name="columnTemplate" type="block" selector="//tbody/tr[td[contains(.,normalize-space('{{text}}'))]]/td[@data-column='{{dataColumn}}']" parameterized="true" />
16+
</section>
17+
</sections>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
<element name="saveAndContinue" type="button" selector="button[id*=save_and_continue]" timeout="30"/>
1414
<element name="delete" type="button" selector="#delete" timeout="30"/>
1515
<element name="add" type="button" selector="#add" timeout="30"/>
16+
<element name="cancelDelete" type="button" selector=".modal-popup.confirm button.action-dismiss" timeout="10"/>
17+
<element name="confirmDelete" type="button" selector=".modal-popup.confirm button.action-accept" timeout="10"/>
1618
</section>
1719
</sections>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
<element name="contentDropDownIfNotShowing" type="button" selector="//div[@data-index='content']//div[contains(@class, '_hide')]"/>
4242
<element name="longDescription" type="input" selector="#product_form_description"/>
4343
<element name="shortDescription" type="input" selector="#product_form_short_description"/>
44-
<!--BundleOptinsDropDown-->
44+
<!--BundleOptionsDropDown-->
4545
<element name="bundleOptionsDropDown" type="button" selector="div[data-index='bundle-items']" timeout="30"/>
46+
<element name="currentBundleOption" type="text" selector="//div[@data-index='bundle-items']//div[contains(@class, 'admin__collapsible-title')]/span"/>
4647
<!--AddingAnOption-->
4748
<element name="addOptions" type="button" selector="//tr[@data-repeat-index='0']//td[4]" timeout="30"/>
4849
<!--SEODropdownTab-->

app/code/Magento/Catalog/Model/CategoryList.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
8+
69
namespace Magento\Catalog\Model;
710

811
use Magento\Catalog\Api\CategoryListInterface;
@@ -50,7 +53,7 @@ class CategoryList implements CategoryListInterface
5053
* @param JoinProcessorInterface $extensionAttributesJoinProcessor
5154
* @param CategorySearchResultsInterfaceFactory $categorySearchResultsFactory
5255
* @param CategoryRepositoryInterface $categoryRepository
53-
* @param CollectionProcessorInterface $collectionProcessor
56+
* @param CollectionProcessorInterface|null $collectionProcessor
5457
*/
5558
public function __construct(
5659
CollectionFactory $categoryCollectionFactory,
@@ -74,12 +77,13 @@ public function getList(SearchCriteriaInterface $searchCriteria)
7477
/** @var Collection $collection */
7578
$collection = $this->categoryCollectionFactory->create();
7679
$this->extensionAttributesJoinProcessor->process($collection);
77-
7880
$this->collectionProcessor->process($searchCriteria, $collection);
7981

8082
$items = [];
81-
foreach ($collection->getAllIds() as $id) {
82-
$items[] = $this->categoryRepository->get($id);
83+
foreach ($collection->getData() as $categoryData) {
84+
$items[] = $this->categoryRepository->get(
85+
$categoryData[$collection->getEntity()->getIdFieldName()]
86+
);
8387
}
8488

8589
/** @var CategorySearchResultsInterface $searchResult */

app/code/Magento/Catalog/Model/Indexer/Product/Price/Action/Full.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ private function getBatchesForIndexer(string $typeId): BatchIterator
279279
$select = $connection->select();
280280
$select->distinct(true);
281281
$select->from(['e' => $entityMetadata->getEntityTable()], $entityMetadata->getIdentifierField());
282+
$select->where('type_id = ?', $typeId);
282283

283284
return $this->batchQueryGenerator->generate(
284285
$this->getProductMetaData()->getIdentifierField(),

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@
249249
<waitForPageLoad time="60" stepKey="WaitForProductSave1"/>
250250
<see userInput="You saved the product." stepKey="seeSaveConfirmation"/>
251251
</actionGroup>
252+
<actionGroup name="ProductSetAdvancedTierFixedPricing" extends="ProductSetAdvancedPricing">
253+
<remove keyForRemoval="selectProductTierPricePriceInput"/>
254+
<fillField selector="{{AdminProductFormAdvancedPricingSection.productTierPriceFixedPriceInput('0')}}" userInput="{{amount}}" stepKey="selectProductTierPricePriceInput" after="selectProductTierPriceValueType"/>
255+
</actionGroup>
252256

253257
<!--Assert text in Related, Up-Sell or Cross-Sell section in Admin Product page-->
254258
<actionGroup name="AssertTextInAdminProductRelatedUpSellCrossSellSection">
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminAddBundleProductToCartFromWishListPageTest">
11+
<annotations>
12+
<features value="Catalog"/>
13+
<stories value="Add bundle product to Cart"/>
14+
<title value="Add bundle product to Cart from Wish list page"/>
15+
<description value="Add bundle product to Cart from Wish list page"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MC-17782"/>
18+
<useCaseId value="MC-17387"/>
19+
<group value="catalog"/>
20+
</annotations>
21+
<before>
22+
<!-- Login as Admin -->
23+
<comment userInput="Login as Admin" stepKey="commentLoginAsAdmin"/>
24+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
25+
<!-- Create customer on Storefront and bundle product -->
26+
<comment userInput="Create customer on Storefront and bundle product" stepKey="commentCreateData"/>
27+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
28+
<createData entity="CustomerEntityOne" stepKey="createCustomerViaTheStorefront"/>
29+
<createData entity="_defaultProduct" stepKey="createSimpleProduct1">
30+
<requiredEntity createDataKey="createCategory"/>
31+
</createData>
32+
<createData entity="_defaultProduct" stepKey="createSimpleProduct2">
33+
<requiredEntity createDataKey="createCategory"/>
34+
</createData>
35+
<createData entity="ApiBundleProductPriceViewRange" stepKey="createProduct">
36+
<requiredEntity createDataKey="createCategory"/>
37+
</createData>
38+
<!-- Create Attribute -->
39+
<comment userInput="Create Attribute" stepKey="commentCreateAttribute"/>
40+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
41+
<requiredEntity createDataKey="createProduct"/>
42+
</createData>
43+
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
44+
<requiredEntity createDataKey="createProduct"/>
45+
<requiredEntity createDataKey="bundleOption"/>
46+
<requiredEntity createDataKey="createSimpleProduct1"/>
47+
</createData>
48+
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
49+
<requiredEntity createDataKey="createProduct"/>
50+
<requiredEntity createDataKey="bundleOption"/>
51+
<requiredEntity createDataKey="createSimpleProduct2"/>
52+
</createData>
53+
<amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="goToProductEditPage"/>
54+
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
55+
</before>
56+
<after>
57+
<!-- Delete created data -->
58+
<comment userInput="Delete created data" stepKey="commentDeleteCreatedData"/>
59+
<deleteData createDataKey="createCustomerViaTheStorefront" stepKey="deleteCustomerViaTheStorefront"/>
60+
<deleteData createDataKey="createProduct" stepKey="deleteProduct" />
61+
<!-- Log out -->
62+
<comment userInput="Log out" stepKey="commentLogOut"/>
63+
<actionGroup ref="logout" stepKey="logout"/>
64+
</after>
65+
<!-- Login to the Storefront as created customer -->
66+
<comment userInput="Login to the Storefront as created customer" stepKey="commentLoginAsCustomer"/>
67+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer">
68+
<argument name="Customer" value="$$createCustomerViaTheStorefront$$"/>
69+
</actionGroup>
70+
<!-- Add product to Wish List -->
71+
<comment userInput="Add product to Wish List" stepKey="commentAddProductToWishList"/>
72+
<amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="amOnBundleProductPage"/>
73+
<waitForPageLoad stepKey="waitForProductPage"/>
74+
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct">
75+
<argument name="productVar" value="$$createProduct$$"/>
76+
</actionGroup>
77+
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName($$createProduct.name$$)}}" stepKey="moveMouseOverProduct" />
78+
<click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName($$createProduct.name$$)}}" stepKey="clickAddToCart" />
79+
<waitForPageLoad stepKey="waitForProductBundlePage"/>
80+
<!-- See error message -->
81+
<comment userInput="See error message" stepKey="commentSeeErrorMessage"/>
82+
<see userInput=" Please specify product option(s)." stepKey="seeErrorMessage"/>
83+
</test>
84+
</tests>

app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleSetEditRelatedProductsTest.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2323
<createData entity="SimpleProduct2" stepKey="simpleProduct0"/>
2424
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
25+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
26+
<createData entity="SimpleProduct2" stepKey="simpleProduct3"/>
27+
<createData entity="SimpleProduct2" stepKey="simpleProduct4"/>
28+
<createData entity="SimpleProduct2" stepKey="simpleProduct5"/>
29+
<createData entity="SimpleProduct2" stepKey="simpleProduct6"/>
2530
</before>
2631
<after>
2732
<!-- Delete simple product -->
@@ -31,6 +36,11 @@
3136
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
3237
<deleteData createDataKey="simpleProduct0" stepKey="deleteSimpleProduct0"/>
3338
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
39+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
40+
<deleteData createDataKey="simpleProduct3" stepKey="deleteSimpleProduct3"/>
41+
<deleteData createDataKey="simpleProduct4" stepKey="deleteSimpleProduct4"/>
42+
<deleteData createDataKey="simpleProduct5" stepKey="deleteSimpleProduct5"/>
43+
<deleteData createDataKey="simpleProduct6" stepKey="deleteSimpleProduct6"/>
3444
</after>
3545

3646
<!--Create product-->
@@ -69,6 +79,28 @@
6979
<conditionalClick selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" dependentSelector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDependent}}" visible="false" stepKey="openDropDownIfClosedRelatedSee"/>
7080
<see selector="{{AdminProductFormRelatedUpSellCrossSellSection.selectedRelatedProduct}}" userInput="$$simpleProduct1.sku$$" stepKey="seeRelatedProduct"/>
7181

82+
<!--See more related products in admin-->
83+
<actionGroup ref="addRelatedProductBySku" stepKey="addRelatedProduct2">
84+
<argument name="sku" value="$$simpleProduct2.sku$$"/>
85+
</actionGroup>
86+
<actionGroup ref="addRelatedProductBySku" stepKey="addRelatedProduct3">
87+
<argument name="sku" value="$$simpleProduct3.sku$$"/>
88+
</actionGroup>
89+
<actionGroup ref="addRelatedProductBySku" stepKey="addRelatedProduct4">
90+
<argument name="sku" value="$$simpleProduct4.sku$$"/>
91+
</actionGroup>
92+
<actionGroup ref="addRelatedProductBySku" stepKey="addRelatedProduct5">
93+
<argument name="sku" value="$$simpleProduct5.sku$$"/>
94+
</actionGroup>
95+
<actionGroup ref="addRelatedProductBySku" stepKey="addRelatedProduct6">
96+
<argument name="sku" value="$$simpleProduct6.sku$$"/>
97+
</actionGroup>
98+
<scrollTo selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" stepKey="scrollTo2"/>
99+
<conditionalClick selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" dependentSelector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDependent}}" visible="false" stepKey="openDropDownIfClosedRelatedSee2"/>
100+
<see selector="{{AdminProductFormRelatedUpSellCrossSellSection.selectedRelatedProduct}}" userInput="$$simpleProduct6.sku$$" stepKey="seeSixthRelatedProduct"/>
101+
<selectOption selector=".admin__collapsible-block-wrapper[data-index='related'] .admin__control-select" userInput="5" stepKey="selectFivePerPage"/>
102+
<dontSee selector="{{AdminProductFormRelatedUpSellCrossSellSection.selectedRelatedProduct}}" userInput="$$simpleProduct6.sku$$" stepKey="dontSeeSixthRelatedProduct"/>
103+
72104
<!--See related product in storefront-->
73105
<amOnPage url="{{SimpleProduct3.sku}}.html" stepKey="goToStorefront"/>
74106
<waitForPageLoad stepKey="waitForStorefront"/>

app/code/Magento/Catalog/Test/Unit/Model/CategoryListTest.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
8+
69
namespace Magento\Catalog\Test\Unit\Model;
710

811
use Magento\Catalog\Api\CategoryRepositoryInterface;
@@ -52,6 +55,9 @@ class CategoryListTest extends \PHPUnit\Framework\TestCase
5255
*/
5356
private $collectionProcessorMock;
5457

58+
/**
59+
* @inheritdoc
60+
*/
5561
protected function setUp()
5662
{
5763
$this->categoryCollectionFactory = $this->getMockBuilder(CollectionFactory::class)
@@ -93,7 +99,12 @@ public function testGetList()
9399

94100
$collection = $this->getMockBuilder(Collection::class)->disableOriginalConstructor()->getMock();
95101
$collection->expects($this->once())->method('getSize')->willReturn($totalCount);
96-
$collection->expects($this->once())->method('getAllIds')->willReturn([$categoryIdFirst, $categoryIdSecond]);
102+
$collection->expects($this->once())->method('getData')->willReturn(
103+
[['entity_id' => $categoryIdFirst], ['entity_id' => $categoryIdSecond]]
104+
);
105+
$collection->expects($this->any())->method('getEntity')->willReturn(
106+
new \Magento\Framework\DataObject(['id_field_name' => 'entity_id'])
107+
);
97108

98109
$this->collectionProcessorMock->expects($this->once())
99110
->method('process')
@@ -106,10 +117,7 @@ public function testGetList()
106117

107118
$this->categoryRepository->expects($this->exactly(2))
108119
->method('get')
109-
->willReturnMap([
110-
[$categoryIdFirst, $categoryFirst],
111-
[$categoryIdSecond, $categorySecond],
112-
])
120+
->willReturnMap([[$categoryIdFirst, $categoryFirst], [$categoryIdSecond, $categorySecond]])
113121
->willReturn($categoryFirst);
114122

115123
$this->categorySearchResultsFactory->expects($this->once())->method('create')->willReturn($searchResult);

0 commit comments

Comments
 (0)