Skip to content

Commit 54012a5

Browse files
merge magento-commerce/2.4-develop into magento-trigger/MC-24057
2 parents aca349e + 0a55921 commit 54012a5

File tree

86 files changed

+3659
-436
lines changed

Some content is hidden

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

86 files changed

+3659
-436
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<section name="AdminHeaderSection">
1212
<element name="pageTitle" type="text" selector=".page-header h1.page-title"/>
1313
<element name="adminUserAccountText" type="text" selector=".page-header .admin-user-account-text" />
14+
<element name="globalSearchInput" type="text" selector="#search-global" />
15+
<element name="globalSearchInputVisible" type="text" selector=".search-global-field._active #search-global" />
1416
<!-- Legacy heading section. Mostly used for admin 404 and 403 pages -->
1517
<element name="pageHeading" type="text" selector=".page-content .page-heading"/>
1618
<!-- Used for page not found error -->

app/code/Magento/Backend/Test/Mftf/Test/AdminExpireAdminSessionTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<!-- 2. Wait for session to expire. -->
3030
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
3131
<wait time="60" stepKey="waitForSessionLifetime"/>
32-
<reloadPage stepKey="reloadPage"/>
32+
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
3333

3434
<!-- 3. Perform asserts. -->
3535
<seeElement selector="{{AdminLoginFormSection.loginBlock}}" stepKey="assertAdminLoginPageIsAvailable"/>

app/code/Magento/Backend/Test/Mftf/Test/AdminExpireCustomerSessionTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<argument name="Customer" value="$$createCustomer$$" />
4141
</actionGroup>
4242
<wait time="60" stepKey="waitForCookieLifetime"/>
43-
<reloadPage stepKey="reloadPage"/>
43+
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
4444

4545
<!-- 5. Perform asserts. -->
4646
<seeElement selector="{{StorefrontPanelHeaderSection.customerLoginLink}}" stepKey="assertAuthorizationLinkIsVisibleOnStoreFront"/>
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminSearchHotkeyTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Search form hotkey in backend"/>
15+
<title value="Admin should be able focus on the search field with a hotkey"/>
16+
<description value="Admin should be able focus on the search field with a hotkey - forwardslash"/>
17+
<severity value="MINOR"/>
18+
<group value="backend"/>
19+
<group value="search"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
23+
</before>
24+
<after>
25+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
26+
</after>
27+
28+
<pressKey selector="body" parameterArray="[/]" stepKey="pressForwardslashKey"/>
29+
<seeElement selector="{{AdminHeaderSection.globalSearchInputVisible}}" stepKey="seeActiveGlobalSearchInput"/>
30+
<seeInField userInput="" selector="{{AdminHeaderSection.globalSearchInput}}" stepKey="seeEmptyGlobalSearchInput"/>
31+
<pressKey selector="{{AdminHeaderSection.globalSearchInput}}" parameterArray="[/]" stepKey="pressForwardslashKeyAgain"/>
32+
<seeInField userInput="/" selector="{{AdminHeaderSection.globalSearchInput}}" stepKey="seeForwardSlashInGlobalSearchInput"/>
33+
</test>
34+
</tests>

app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Magento\Customer\Model\Indexer\CustomerGroupDimensionProvider;
1818
use Magento\Store\Model\Indexer\WebsiteDimensionProvider;
1919
use Magento\Catalog\Model\Product\Attribute\Source\Status;
20+
use Magento\CatalogInventory\Model\Stock;
2021

2122
/**
2223
* Bundle products Price indexer resource model
@@ -624,6 +625,13 @@ private function calculateDynamicBundleSelectionPrice($dimensions)
624625
'tier_price' => $tierExpr,
625626
]
626627
);
628+
$select->join(
629+
['si' => $this->getTable('cataloginventory_stock_status')],
630+
'si.product_id = bs.product_id',
631+
[]
632+
);
633+
$select->where('si.stock_status = ?', Stock::STOCK_IN_STOCK);
634+
627635
$this->tableMaintainer->insertFromSelect($select, $this->getBundleSelectionTable(), []);
628636
}
629637

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
9+
<test name="StorefrontBundlePlaceOrderWithVirtualAndSimpleChildrenTest">
10+
<annotations>
11+
<features value="Bundle"/>
12+
<stories value="Bundle product placing order"/>
13+
<title value="Admin should be able to invoice order for the bundle product with virtual and simple products in options"/>
14+
<description value="Place order for bundle product and create invoice"/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="MC-38683"/>
17+
<useCaseId value="MC-37663"/>
18+
<group value="Bundle"/>
19+
</annotations>
20+
<before>
21+
<createData entity="CustomerEntityOne" stepKey="createCustomer"/>
22+
<!--Create bundle product with fixed price with simple and virtual products in options-->
23+
<createData entity="SimpleProduct2" stepKey="createSimpleProduct">
24+
<field key="price">100.00</field>
25+
</createData>
26+
<createData entity="VirtualProduct" stepKey="createVirtualProduct">
27+
<field key="price">50.00</field>
28+
</createData>
29+
<createData entity="ApiFixedBundleProduct" stepKey="createFixedBundleProduct"/>
30+
<createData entity="DropDownBundleOption" stepKey="createFirstBundleOption">
31+
<requiredEntity createDataKey="createFixedBundleProduct"/>
32+
</createData>
33+
<createData entity="DropDownBundleOption" stepKey="createSecondBundleOption">
34+
<requiredEntity createDataKey="createFixedBundleProduct"/>
35+
</createData>
36+
<createData entity="ApiBundleLink" stepKey="firstLinkOptionToFixedProduct">
37+
<requiredEntity createDataKey="createFixedBundleProduct"/>
38+
<requiredEntity createDataKey="createFirstBundleOption"/>
39+
<requiredEntity createDataKey="createSimpleProduct"/>
40+
</createData>
41+
<createData entity="ApiBundleLink" stepKey="secondLinkOptionToFixedProduct">
42+
<requiredEntity createDataKey="createFixedBundleProduct"/>
43+
<requiredEntity createDataKey="createSecondBundleOption"/>
44+
<requiredEntity createDataKey="createVirtualProduct"/>
45+
</createData>
46+
<actionGroup stepKey="loginToAdminPanel" ref="AdminLoginActionGroup"/>
47+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage">
48+
<argument name="productId" value="$createFixedBundleProduct.id$"/>
49+
</actionGroup>
50+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
51+
<!--Perform reindex and flush cache-->
52+
<actionGroup ref="AdminReindexAndFlushCache" stepKey="reindexAndFlushCache"/>
53+
</before>
54+
<after>
55+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProductForBundleItem"/>
56+
<deleteData createDataKey="createVirtualProduct" stepKey="deleteVirtualProductForBundleItem"/>
57+
<deleteData createDataKey="createFixedBundleProduct" stepKey="deleteBundleProduct"/>
58+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
59+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductsGridFilters"/>
60+
<waitForPageLoad stepKey="waitForClearProductsGridFilters"/>
61+
</after>
62+
<!--Login customer on storefront-->
63+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCustomer">
64+
<argument name="Customer" value="$$createCustomer$$" />
65+
</actionGroup>
66+
<!--Open Product Page-->
67+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openBundleProductPage">
68+
<argument name="product" value="$createFixedBundleProduct$"/>
69+
</actionGroup>
70+
<!--Add bundle to cart-->
71+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickAddToCart">
72+
<argument name="productUrl" value="$createFixedBundleProduct.name$"/>
73+
</actionGroup>
74+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart">
75+
<argument name="quantity" value="1"/>
76+
</actionGroup>
77+
<!--Navigate to checkout-->
78+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="openCheckoutPage"/>
79+
<!--Click next button to open payment section-->
80+
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
81+
<!--Click place order-->
82+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/>
83+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
84+
<!--Order review page has address that was created during checkout-->
85+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrdersGridById">
86+
<argument name="orderId" value="{$grabOrderNumber}"/>
87+
</actionGroup>
88+
<!--Create Invoice for this Order-->
89+
<actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="createInvoice"/>
90+
<actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/>
91+
</test>
92+
</tests>

app/code/Magento/Captcha/Test/Mftf/Test/CaptchaFormsDisplayingTest/CaptchaWithDisabledGuestCheckoutTest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@
4646
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaField}}" stepKey="seeCaptchaField"/>
4747
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaImg}}" stepKey="seeCaptchaImage"/>
4848
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaReload}}" stepKey="seeCaptchaReloadButton"/>
49-
<reloadPage stepKey="refreshPage"/>
50-
<waitForPageLoad stepKey="waitForPageLoad2"/>
49+
50+
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/>
51+
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForPageLoad2" />
52+
5153
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickCart2"/>
5254
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout2"/>
5355
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.email}}" stepKey="waitEmailFieldVisible2"/>

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@
1414
*/
1515
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
1616
{
17+
/**
18+
* Name prefix of events that are dispatched by model
19+
*
20+
* @var string
21+
*/
22+
protected $_eventPrefix = 'catalog_product_option_value_collection';
23+
24+
/**
25+
* Name of event parameter
26+
*
27+
* @var string
28+
*/
29+
protected $_eventObject = 'product_option_value_collection';
30+
1731
/**
1832
* Resource initialization
1933
*
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
<!--Update Product Name and Description attribute-->
12+
<actionGroup name="AdminMassUpdateProductQtyAndStockStatusActionGroup">
13+
<arguments>
14+
<argument name="attributes"/>
15+
<argument name="product"/>
16+
</arguments>
17+
<!--Filter product in product grid-->
18+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageFirstTime"/>
19+
<waitForPageLoad stepKey="waitForProductGridPageLoad"/>
20+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/>
21+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/>
22+
<fillField selector="{{AdminProductGridFilterSection.nameFilter}}" userInput="{{product.name}}" stepKey="fillProductNameFilter"/>
23+
<fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillProductSkuFilter"/>
24+
<selectOption selector="{{AdminProductGridFilterSection.typeFilter}}" userInput="{{product.type_id}}" stepKey="selectionProductType"/>
25+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
26+
<!--Select first product from grid and open mass action-->
27+
<click selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="clickCheckbox"/>
28+
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickDropdown"/>
29+
<click selector="{{AdminProductGridSection.bulkActionOption('Update attributes')}}" stepKey="clickOption"/>
30+
<waitForPageLoad stepKey="waitForUploadPage"/>
31+
<seeInCurrentUrl url="{{ProductAttributesEditPage.url}}" stepKey="seeAttributePageEditUrl"/>
32+
<!--Update inventory attributes and save-->
33+
<click selector="{{AdminUpdateAttributesAdvancedInventorySection.inventory}}" stepKey="openInvetoryTab"/>
34+
<click selector="{{AdminUpdateAttributesAdvancedInventorySection.changeQty}}" stepKey="uncheckChangeQty"/>
35+
<fillField selector="{{AdminUpdateAttributesAdvancedInventorySection.qty}}" userInput="{{attributes.qty}}" stepKey="fillFieldName"/>
36+
<click selector="{{AdminUpdateAttributesAdvancedInventorySection.changeStockAvailability}}" stepKey="uncheckChangeStockAvailability"/>
37+
<selectOption selector="{{AdminUpdateAttributesAdvancedInventorySection.stockAvailability}}" userInput="{{attributes.stockAvailability}}" stepKey="selectStatus"/>
38+
<click selector="{{AdminUpdateAttributesSection.saveButton}}" stepKey="save"/>
39+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitVisibleSuccessMessage"/>
40+
<see selector="{{AdminMessagesSection.success}}" userInput="Message is added to queue" stepKey="seeSuccessMessage"/>
41+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageSecondTime"/>
42+
<waitForPageLoad stepKey="waitForProductGridPage"/>
43+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersAfterMassAction"/>
44+
</actionGroup>
45+
</actionGroups>

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,12 @@
1212
<data key="name" unique="suffix">New Bundle Product Name</data>
1313
<data key="description" unique="suffix">This is the description</data>
1414
</entity>
15+
<entity name="UpdateAttributeQtyAndStockToInStock" type="productAttributeMassUpdate">
16+
<data key="qty">10</data>
17+
<data key="stockAvailability">In Stock</data>
18+
</entity>
19+
<entity name="UpdateAttributeQtyAndStockToOutOfStock" type="productAttributeMassUpdate">
20+
<data key="qty">0</data>
21+
<data key="stockAvailability">Out of Stock</data>
22+
</entity>
1523
</entities>

0 commit comments

Comments
 (0)