Skip to content

Commit f3e43d8

Browse files
Merge branch '2.4-develop' into ref-CreateOrderFromEditCustomerPageTest
2 parents b77c9db + c398634 commit f3e43d8

File tree

206 files changed

+4443
-3333
lines changed

Some content is hidden

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

206 files changed

+4443
-3333
lines changed

app/code/Magento/AdvancedSearch/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The Magento_AdvancedSearch module introduces advanced search functionality and p
77
Before disabling or uninstalling this module, note that the following modules depends on this module:
88

99
- Magento_Elasticsearch
10-
- Magento_Elasticsearch6
10+
- Magento_Elasticsearch7
1111

1212
For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html).
1313

app/code/Magento/AwsS3/Driver/AwsS3.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,10 @@ public function getRealPath($path)
527527
*/
528528
public function rename($oldPath, $newPath, DriverInterface $targetDriver = null): bool
529529
{
530+
if ($oldPath === $newPath) {
531+
return true;
532+
}
533+
530534
try {
531535
$this->adapter->move(
532536
$this->normalizeRelativePath($oldPath, true),

app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,4 +496,21 @@ public function testCreateDirectory(): void
496496

497497
self::assertTrue($this->driver->createDirectory(self::URL . 'test/test2/'));
498498
}
499+
500+
public function testRename(): void
501+
{
502+
$this->adapterMock->expects(self::once())
503+
->method('move')
504+
->with('test/path', 'test/path2');
505+
506+
self::assertTrue($this->driver->rename('test/path', 'test/path2'));
507+
}
508+
509+
public function testRenameSameDestination(): void
510+
{
511+
$this->adapterMock->expects(self::never())
512+
->method('move');
513+
514+
self::assertTrue($this->driver->rename('test/path', 'test/path'));
515+
}
499516
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,6 @@
112112
<element name="categoriesLabel" type="text" selector="//div[@class='action-menu _active']//button[@data-action='close-advanced-select']"/>
113113
<element name="userDefinedQuantity" type="checkbox" selector="[name='bundle_options[bundle_options][{{option}}][bundle_selections][{{product}}][selection_can_change_qty]'][type='checkbox']" parameterized="true"/>
114114
<element name="bundleItemsOptionTableRows" type="button" selector=".admin__dynamic-rows[data-index='bundle_selections'] tr.data-row" timeout="30"/>
115+
<element name="isDefault" type="button" selector="//table[@class='admin__dynamic-rows admin__control-table']//span[contains(text(),'{{var1}}')]/../../../../..//input[@type='radio']" parameterized="true"/>
115116
</section>
116117
</sections>

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@
4040

4141
<!-- Go to new product page and see a default attribute -->
4242
<!-- Switch from default attribute set to new attribute set -->
43-
<amOnPage url="{{AdminProductCreatePage.url('4', 'bundle')}}" stepKey="goToNewProductPage"/>
44-
<waitForPageLoad stepKey="wait2"/>
43+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToNewProductPage">
44+
<argument name="attributeSetId" value="4"/>
45+
<argument name="productType" value="bundle"/>
46+
</actionGroup>
47+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait2"/>
4548

4649
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet">
4750
<argument name="attributeSet" value="{{ProductAttributeFrontendLabel.label}}"/>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@
4040
</actionGroup>
4141

4242
<!--Go to product creation page-->
43-
<actionGroup ref="AdminOpenCreateBundleProductPageActionGroup" stepKey="goToBundleProductCreationPage"/>
43+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage">
44+
<argument name="attributeSetId" value="{{BundleProduct.set}}"/>
45+
<argument name="productType" value="{{BundleProduct.type}}"/>
46+
</actionGroup>
4447
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreationPage"/>
4548

4649
<!--Enable/Disable Toggle-->
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
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="AdminCreateBundleProductTest">
11+
<annotations>
12+
<features value="BundleProduct"/>
13+
<stories value="Create product"/>
14+
<title value="Admin Create Bundle Product"/>
15+
<description value="Admin should be able to create a Bundle product"/>
16+
<testCaseId value="MC-27223"/>
17+
<severity value="MAJOR"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
<before>
21+
<!-- creating category, simple products -->
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
<createData entity="_defaultCategory" stepKey="createCategory"/>
24+
<createData entity="ImportProductSimple2_Bundle" stepKey="simpleProduct1"/>
25+
<createData entity="ImportProductSimple1_Bundle" stepKey="simpleProduct2"/>
26+
</before>
27+
<after>
28+
<!-- Delete bundle product -->
29+
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteProduct">
30+
<argument name="product" value="BundleProduct"/>
31+
</actionGroup>
32+
<!-- deleting category, simple products -->
33+
<deleteData createDataKey="simpleProduct1" stepKey="deleteProductOne"/>
34+
<deleteData createDataKey="simpleProduct2" stepKey="deleteProductTwo"/>
35+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
36+
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
37+
</after>
38+
39+
<!-- Create Bundle product via Admin -->
40+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
41+
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
42+
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
43+
<argument name="product" value="BundleProduct"/>
44+
</actionGroup>
45+
46+
<!-- Entering Bundle Product name,SKU, category, url key -->
47+
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
48+
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createCategory.name$$]" stepKey="fillCategory"/>
49+
50+
<!-- Add two bundle items -->
51+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
52+
<!-- Add bundle option to the product -->
53+
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="clickAddSelectedBundleProducts">
54+
<argument name="x" value="0"/>
55+
<argument name="n" value="1"/>
56+
<argument name="prodOneSku" value="$$simpleProduct1.sku$$"/>
57+
<argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/>
58+
<argument name="optionTitle" value="{{DropDownBundleOption.title}}"/>
59+
<argument name="inputType" value="{{DropDownBundleOption.type}}"/>
60+
</actionGroup>
61+
62+
<!-- Check that Bundle Options initialized with proper quantity -->
63+
<grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" stepKey="grabbedFirstBundleOptionQuantity"/>
64+
<assertEquals stepKey="assertFirstBundleOptionDefaultQuantity">
65+
<expectedResult type="string">50</expectedResult>
66+
<actualResult type="string">$grabbedFirstBundleOptionQuantity</actualResult>
67+
</assertEquals>
68+
<grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" stepKey="grabbedSecondBundleOptionQuantity"/>
69+
<assertEquals stepKey="assertSecondBundleOptionDefaultQuantity">
70+
<expectedResult type="string">50</expectedResult>
71+
<actualResult type="string">$grabbedSecondBundleOptionQuantity</actualResult>
72+
</assertEquals>
73+
74+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty1"/>
75+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty2"/>
76+
77+
<wait stepKey="k1" time="10"/>
78+
<click selector="{{AdminProductFormBundleSection.isDefault('$$simpleProduct1.name$$')}}" stepKey="clickIsDefault"/>
79+
80+
<!--Save the product-->
81+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
82+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown">
83+
<argument name="message" value="You saved the product."/>
84+
</actionGroup>
85+
86+
<!-- Verify we see created bundle product(from the above step) on the product grid page-->
87+
<actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="openProductCatalogPage1"/>
88+
<actionGroup ref="FilterProductGridBySkuAndNameActionGroup" stepKey="clickSearch">
89+
<argument name="product" value="BundleProduct"/>
90+
</actionGroup>
91+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="openCreatedBundleProduct"/>
92+
93+
<!-- Admin: Verify Bundle Product Information on Edit Product Page -->
94+
<scrollTo selector="{{AdminProductFormBundleSection.allBundleOptions}}" stepKey="scrollToAllBundleOptions" />
95+
<actionGroup ref="AdminVerifyProductInBundleProductOptionActionGroup" stepKey="verifyBundleProductOption1Product1">
96+
<argument name="name" value="{{ImportProductSimple2_Bundle.name}}"/>
97+
<argument name="sku" value="{{ImportProductSimple2_Bundle.sku}}"/>
98+
<argument name="defaultQuantity" value="50"/>
99+
<argument name="isDefault" value="{{ImportProductSimple2_Bundle.bundleIsDefault}}"/>
100+
<argument name="userDefined" value="{{ImportProductSimple2_Bundle.bundleUserDefined}}"/>
101+
<argument name="optionIndex" value="1"/>
102+
<argument name="productIndex" value="1"/>
103+
</actionGroup>
104+
<actionGroup ref="AdminVerifyProductInBundleProductOptionActionGroup" stepKey="verifyBundleProductOption1Product2">
105+
<argument name="name" value="{{ImportProductSimple1_Bundle.name}}"/>
106+
<argument name="sku" value="{{ImportProductSimple1_Bundle.sku}}"/>
107+
<argument name="defaultQuantity" value="50"/>
108+
<argument name="isDefault" value="{{ImportProductSimple1_Bundle.bundleIsDefault}}"/>
109+
<argument name="userDefined" value="false"/>
110+
<argument name="optionIndex" value="1"/>
111+
<argument name="productIndex" value="2"/>
112+
</actionGroup>
113+
114+
<!-- Storefront: Verify Bundle Product In Category -->
115+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPage">
116+
<argument name="productUrl" value="{{BundleProduct.urlKey}}"/>
117+
</actionGroup>
118+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductPageToLoad"/>
119+
120+
<!-- Storefront: Verify Product details -->
121+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="LookingForNameOfProduct">
122+
<argument name="productName" value="{{BundleProduct.name}}"/>
123+
</actionGroup>
124+
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="seeProductName"/>
125+
<see selector="{{StorefrontProductInfoMainSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="seeSku"/>
126+
<see userInput="From $500.00 To $1,000.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="seePrice"/>
127+
128+
<!-- Storefront: Verify Product option details -->
129+
<click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomizeAndAddToCart"/>
130+
<click selector="{{StorefrontBundleProductActionSection.dropdownSelectOption}}" stepKey="clickOnSelectOption"/>
131+
<wait stepKey="k2" time="10"/>
132+
<seeElement selector="{{StorefrontBundleProductActionSection.dropdownProductSelection('$$simpleProduct1.name$$ +$$$simpleProduct1.price$$')}}" stepKey="seeOption1Product1Details"/>
133+
<seeElement selector="{{StorefrontBundleProductActionSection.dropdownProductSelection('$$simpleProduct2.name$$ +$$$simpleProduct2.price$$')}}" stepKey="seeOption1Product2Details"/>
134+
135+
136+
</test>
137+
</tests>

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@
3131
</after>
3232

3333
<!--Create bundle product-->
34-
<actionGroup ref="AdminOpenCreateBundleProductPageActionGroup" stepKey="goToBundleProductCreationPage"/>
34+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage">
35+
<argument name="attributeSetId" value="{{BundleProduct.set}}"/>
36+
<argument name="productType" value="{{BundleProduct.type}}"/>
37+
</actionGroup>
38+
3539
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreationPage"/>
3640
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
3741
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/>

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@
3131
</after>
3232

3333
<!--Create bundle product-->
34-
<actionGroup ref="AdminOpenCreateBundleProductPageActionGroup" stepKey="goToBundleProductCreationPage"/>
34+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage">
35+
<argument name="attributeSetId" value="{{BundleProduct.set}}"/>
36+
<argument name="productType" value="{{BundleProduct.type}}"/>
37+
</actionGroup>
38+
3539
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreationPage"/>
3640
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
3741
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@
3939
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
4040
</after>
4141
<!--Go to bundle product creation page-->
42-
<actionGroup ref="AdminOpenCreateBundleProductPageActionGroup" stepKey="goToBundleProductCreationPage"/>
42+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage">
43+
<argument name="attributeSetId" value="{{BundleProduct.set}}"/>
44+
<argument name="productType" value="{{BundleProduct.type}}"/>
45+
</actionGroup>
4346
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreatePageToLoad"/>
4447

4548
<!-- Add two bundle items -->

0 commit comments

Comments
 (0)