Skip to content

Commit c46d9bf

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.4-develop
Accepted Community Pull Requests: - #32646: MC-41439: 7.3 compatibility fix. (by @engcom-Foxtrot) - #32467: Replace repetitive actions with Action Groups in AdminCreateSimpleProductNegativePriceTest (by @kate-kyzyma) - #32477: Replace repetitive actions with Action Groups in AdminCreateVirtualProductFillingRequiredFieldsOnlyTest (by @kate-kyzyma) - #32524: Replace repetitive actions with Action Groups in AdminUpdateSimpleProductWithRegularPriceInStockDisabledProductTest (by @kate-kyzyma) - #32517: Removed CliCacheFlushActionGroup usage for Downloadable and other modules (by @sergiy-v) - #32463: Replace repetitive actions with Action Groups in AdminConfigurableProductCreateTest (by @kate-kyzyma) - #32498: Replace repetitive actions with Action Groups in AdminUpdateSimpleProductWithRegularPriceInStockNotVisibleIndividuallyTest (by @kate-kyzyma) - #32532: Make product SKU not null (by @ihor-sviziev) - #32400: Add WEBP + AVIF Support by default (by @in-session) - #32288: Replace repetitive actions with Action Groups in AdminCreateProductDuplicateUrlkeyTest (by @kate-kyzyma) - #30823: Item resolvers should be optional (by @thomas-kl1) - #32639: Fixes composer.lock file which does not contain web-token/jwt-framewo… (by @hostep) - #32610: Modified the PR template to include README.md update reqirement if necessary (by @bgorski) - #32612: Added missing web-token/jwt-framework dependency to magento/module-jwt-framework-adapter (by @bgorski) - #32448: Update README.md of Google_Analytics module (by @charles-tychons) - #31938: [ReadMe] updated readMe file for Magento_Msrp-Magento_MysqlMq modules (by @ProkopovVitaliy) - #32434: Seperate js out template to avoid render issue (by @mrtuvn) - #32298: Ensure string is returned when applying filter to email template (by @Skullsneeze) - #32254: Removed caching subscription status from plugin (by @engcom-Charlie) - #31080: Add event listeners passive for fotorama lib improves lighthouse metrics (by @mrtuvn) - #30695: Avoid binding magnifier events in duplicate on resize (by @fredden) Fixed GitHub Issues: - #32647: [Issue] MC-41439: 7.3 compatibility fix. (reported by @m2-assistant[bot]) has been fixed in #32646 by @engcom-Foxtrot in 2.4-develop branch Related commits: 1. 5f93692 2. bf6cd90 - #32505: [Issue] Replace repetitive actions with Action Groups in AdminCreateSimpleProductNegativePriceTest (reported by @m2-assistant[bot]) has been fixed in #32467 by @kate-kyzyma in 2.4-develop branch Related commits: 1. ea063e0 2. aacf9a2 - #32504: [Issue] Replace repetitive actions with Action Groups in AdminCreateVirtualProductFillingRequiredFieldsOnlyTest (reported by @m2-assistant[bot]) has been fixed in #32477 by @kate-kyzyma in 2.4-develop branch Related commits: 1. b37d542 - #32583: [Issue] Replace repetitive actions with Action Groups in AdminUpdateSimpleProductWithRegularPriceInStockDisabledProductTest (reported by @m2-assistant[bot]) has been fixed in #32524 by @kate-kyzyma in 2.4-develop branch Related commits: 1. feaed6b - #32518: [Issue] Removed CliCacheFlushActionGroup usage for Downloadable and other modules (reported by @m2-assistant[bot]) has been fixed in #32517 by @sergiy-v in 2.4-develop branch Related commits: 1. a4d981f - #32507: [Issue] Replace repetitive actions with Action Groups in AdminConfigurableProductCreateTest (reported by @m2-assistant[bot]) has been fixed in #32463 by @kate-kyzyma in 2.4-develop branch Related commits: 1. eb772c1 2. e762b52 3. 8d08e94 - #32569: [Issue] Replace repetitive actions with Action Groups in AdminConfigurableProductCreateTest (reported by @m2-assistant[bot]) has been fixed in #32463 by @kate-kyzyma in 2.4-develop branch Related commits: 1. eb772c1 2. e762b52 3. 8d08e94 - #32502: [Issue] Replace repetitive actions with Action Groups in AdminUpdateSimpleProductWithRegularPriceInStockNotVisibleIndividuallyTest (reported by @m2-assistant[bot]) has been fixed in #32498 by @kate-kyzyma in 2.4-develop branch Related commits: 1. 920867a 2. 1e4fcb1 - #27411: Table structure issue catalog_product_entity (sku field is allowed nulls) (reported by @stephan-cream) has been fixed in #32532 by @ihor-sviziev in 2.4-develop branch Related commits: 1. a369d5a - #32525: Table structure issue catalog_product_entity (sku field is allowed nulls) (reported by @dverkade) has been fixed in #32532 by @ihor-sviziev in 2.4-develop branch Related commits: 1. a369d5a - #32495: [Issue] Add WEBP + AVIF Support by default (reported by @m2-assistant[bot]) has been fixed in #32400 by @in-session in 2.4-develop branch Related commits: 1. 59a5e8d 2. f578f02 3. 59161f2 4. 81882e7 5. 73f6c3f 6. 7e4e074 7. 760ab36 8. 1e5cf5b 9. c4bc0c1 10. c3f7262 11. 28f539b 12. 27c93ab 13. 8f4e06f 14. 9993844 15. d2bd6cf 16. d265e96 17. 203dbf4 18. 73c94d4 19. c416e6b 20. b877a4a 21. 3530c6c 22. ea1f90a 23. 9c8c61b 24. 8960823 25. 9d778c8 26. 8313833 27. de5c558 28. 5188dcf 29. 22643ae - #32379: [Issue] Replace repetitive actions with Action Groups in AdminCreateProductDuplicateUrlkeyTest (reported by @m2-assistant[bot]) has been fixed in #32288 by @kate-kyzyma in 2.4-develop branch Related commits: 1. 01c8860 - #30860: [Issue] Item resolvers should be optional (reported by @m2-assistant[bot]) has been fixed in #30823 by @thomas-kl1 in 2.4-develop branch Related commits: 1. 8ed5082 2. 8a569ee - #32644: [Issue] Fixes composer.lock file which does not contain web-token/jwt-framewo� (reported by @m2-assistant[bot]) has been fixed in #32639 by @hostep in 2.4-develop branch Related commits: 1. 2cce0aa 2. 8c05b9c 3. d4decea - #32658: [Issue] Modified the PR template to include README.md update reqirement if necessary (reported by @m2-assistant[bot]) has been fixed in #32610 by @bgorski in 2.4-develop branch Related commits: 1. 4a7159e 2. ef7009e - #32578: Missing dependency in Magento/JwtFrameworkAdapter (reported by @fooman) has been fixed in #32612 by @bgorski in 2.4-develop branch Related commits: 1. 7306e85 - #32616: [Issue] Update README.md of Google_Analytics module (reported by @m2-assistant[bot]) has been fixed in #32448 by @charles-tychons in 2.4-develop branch Related commits: 1. f55d9e6 - #4451: Fix for admin shipment, creditmemo, invoice pdf emulation (reported by @ksz2013) has been fixed in #31938 by @ProkopovVitaliy in 2.4-develop branch Related commits: 1. 98e089e 2. 4b0bf14 3. 017de9a 4. 3682d87 5. 67e3881 6. e7b3b4d 7. 8916dee - #32577: [Issue] [ReadMe] updated readMe file for Magento_Msrp-Magento_MysqlMq modules (reported by @m2-assistant[bot]) has been fixed in #31938 by @ProkopovVitaliy in 2.4-develop branch Related commits: 1. 98e089e 2. 4b0bf14 3. 017de9a 4. 3682d87 5. 67e3881 6. e7b3b4d 7. 8916dee - #32454: [Issue] Seperate js out template to avoid render issue (reported by @m2-assistant[bot]) has been fixed in #32434 by @mrtuvn in 2.4-develop branch Related commits: 1. 7e47efd - #32671: [Issue] Ensure string is returned when applying filter to email template (reported by @m2-assistant[bot]) has been fixed in #32298 by @Skullsneeze in 2.4-develop branch Related commits: 1. d6cba47 2. 06412dc 3. 28e0124 4. 4b46634 5. db048d2 - #19345: Incorrect caching subscription status in newsletter plugin (reported by @wojtekn) has been fixed in #32254 by @engcom-Charlie in 2.4-develop branch Related commits: 1. c2b038e 2. 8a90819 3. 6df702e 4. c6e170e 5. b1f9f8e 6. a82f3e9 - #31140: [Issue] Add event listeners passive for fotorama lib improves lighthouse metrics (reported by @m2-assistant[bot]) has been fixed in #31080 by @mrtuvn in 2.4-develop branch Related commits: 1. 67c2c71 - #30788: [Issue] Avoid binding magnifier events in duplicate on resize (reported by @m2-assistant[bot]) has been fixed in #30695 by @fredden in 2.4-develop branch Related commits: 1. 6bec772 2. 693e366 3. 2bb781f
2 parents 03bd130 + 1164288 commit c46d9bf

File tree

55 files changed

+1251
-515
lines changed

Some content is hidden

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

55 files changed

+1251
-515
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@
4343
- [ ] Pull request has a meaningful description of its purpose
4444
- [ ] All commits are accompanied by meaningful commit messages
4545
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
46+
- [ ] README.md files for modified modules are updated and included in the pull request if any [README.md predefined sections](https://github.com/magento/devdocs/wiki/Magento-module-README.md) require an update
4647
- [ ] All automated tests passed successfully (all builds are green)

app/code/Magento/Backend/Block/Store/Switcher.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Backend\Block\Store;
89

@@ -114,7 +115,8 @@ protected function _construct()
114115
{
115116
parent::_construct();
116117

117-
$this->setUseConfirm(true);
118+
$this->setUseConfirm($this->hasData('use_confirm') ? (bool)$this->getData('use_confirm') : true);
119+
118120
$this->setUseAjax(true);
119121

120122
$this->setShowManageStoresLink(0);

app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml

Lines changed: 117 additions & 207 deletions
Large diffs are not rendered by default.
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
define([
7+
'jquery'
8+
], function ($) {
9+
'use strict';
10+
11+
/**
12+
* @param {Object} storeSwitchConfig
13+
*/
14+
return function (storeSwitchConfig) {
15+
var scopeSwitcherHandler;
16+
17+
(function () {
18+
var storesList = $('[data-role=stores-list]');
19+
20+
storesList.on('click', '[data-value]', function (event) {
21+
var val = $(event.target).data('value'),
22+
role = $(event.target).data('role'),
23+
switcher = $('[data-role=' + role + ']');
24+
25+
event.preventDefault();
26+
27+
if (!switcher.val() || val !== switcher.val()) {
28+
29+
/* Set the value & trigger event */
30+
switcher.val(val).trigger('change');
31+
}
32+
});
33+
})($);
34+
35+
/**
36+
* Switch store scope
37+
*
38+
* @param {Object} obj
39+
* @return void
40+
*/
41+
function switchScope(obj) {
42+
var switcher = $(obj),
43+
scopeId = switcher.val(),
44+
scopeParams = '',
45+
switcherParams = {};
46+
47+
if (scopeId) {
48+
scopeParams = switcher.data('param') + '/' + scopeId + '/';
49+
}
50+
51+
if (obj.switchParams) {
52+
scopeParams += obj.switchParams;
53+
}
54+
55+
/**
56+
* Reload function for switcher
57+
*/
58+
function reload() {
59+
var url;
60+
61+
if (!storeSwitchConfig.isUsingIframe) {
62+
63+
if (storeSwitchConfig.switchUrl && storeSwitchConfig.switchUrl.length > 0) {
64+
url = storeSwitchConfig.switchUrl + scopeParams;
65+
66+
/* eslint-disable no-undef */
67+
setLocation(url);
68+
}
69+
70+
} else {
71+
$('#preview_selected_store').val(scopeId);
72+
$('#preview_form').submit();
73+
74+
$('.store-switcher .dropdown-menu li a').each(function () {
75+
var $this = $(this);
76+
77+
if ($this.data('role') === 'store-view-id' && $this.data('value') === scopeId) {
78+
$('#store-change-button').html($this.text());
79+
}
80+
});
81+
82+
$('#store-change-button').click();
83+
}
84+
}
85+
86+
if (typeof scopeSwitcherHandler !== 'undefined') {
87+
switcherParams = {
88+
scopeId: scopeId,
89+
scopeParams: scopeParams,
90+
useConfirm: storeSwitchConfig.useConfirm
91+
};
92+
93+
scopeSwitcherHandler(switcherParams);
94+
} else if (storeSwitchConfig.useConfirm) {
95+
require([
96+
'Magento_Ui/js/modal/confirm',
97+
'mage/translate'
98+
], function (confirm, $t) {
99+
confirm({
100+
content: $t('Please confirm scope switching. All data that hasn\'t been saved will be lost.'),
101+
actions: {
102+
103+
/**
104+
* Confirm action
105+
*/
106+
confirm: function () {
107+
reload();
108+
},
109+
110+
/**
111+
* Cancel action
112+
*/
113+
cancel: function () {
114+
obj.value = storeSwitchConfig.storeId ? storeSwitchConfig.storeId : '';
115+
}
116+
}
117+
});
118+
});
119+
} else {
120+
reload();
121+
}
122+
}
123+
124+
window.scopeSwitcherHandler = scopeSwitcherHandler;
125+
window.switchScope = switchScope;
126+
};
127+
});

app/code/Magento/Catalog/Model/Product/Configuration/Item/ItemResolverComposite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class ItemResolverComposite implements ItemResolverInterface
1717
{
1818
/** @var string[] */
19-
private $itemResolvers = [];
19+
private $itemResolvers;
2020

2121
/** @var ItemResolverInterface[] */
2222
private $itemResolversInstances = [];
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="AdminFillProductNameOnProductFormActionGroup">
12+
<annotations>
13+
<description>Fills in Name field on the Admin Products creation/edit page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName" type="string"/>
17+
</arguments>
18+
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{productName}}" stepKey="fillProductName"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="AdminFillProductQtyOnProductFormActionGroup">
12+
<annotations>
13+
<description>Fills in Quantity field on the Admin Products creation/edit page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productQty" type="string"/>
17+
</arguments>
18+
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{productQty}}" stepKey="fillProductQty"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="AdminFillProductSkuOnProductFormActionGroup">
12+
<annotations>
13+
<description>Fills in Sku field on the Admin Products creation/edit page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productSku" type="string"/>
17+
</arguments>
18+
<fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{productSku}}" stepKey="fillProductSku"/>
19+
</actionGroup>
20+
</actionGroups>

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,24 @@
3232
<actionGroup ref="AdminClickAddProductToggleAndSelectProductTypeActionGroup" stepKey="clickAddSimpleProduct">
3333
<argument name="productType" value="simple"/>
3434
</actionGroup>
35-
<fillField userInput="$$simpleProduct.name$$new" selector="{{AdminProductFormSection.productName}}" stepKey="fillName"/>
36-
<fillField userInput="$$simpleProduct.sku$$new" selector="{{AdminProductFormSection.productSku}}" stepKey="fillSKU"/>
37-
<fillField userInput="$$simpleProduct.price$$" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillPrice"/>
38-
<fillField userInput="$$simpleProduct.quantity$$" selector="{{AdminProductFormSection.productQuantity}}" stepKey="fillQuantity"/>
35+
<actionGroup ref="AdminFillProductNameOnProductFormActionGroup" stepKey="fillName">
36+
<argument name="productName" value="$$simpleProduct.name$$new"/>
37+
</actionGroup>
38+
<actionGroup ref="AdminFillProductSkuOnProductFormActionGroup" stepKey="fillSKU">
39+
<argument name="productSku" value="$$simpleProduct.sku$$new"/>
40+
</actionGroup>
41+
<actionGroup ref="AdminFillProductPriceFieldAndPressEnterOnProductEditPageActionGroup" stepKey="fillPrice">
42+
<argument name="price" value="$$simpleProduct.price$$"/>
43+
</actionGroup>
44+
<actionGroup ref="AdminFillProductQtyOnProductFormActionGroup" stepKey="fillQuantity">
45+
<argument name="productQty" value="$$simpleProduct.quantity$$"/>
46+
</actionGroup>
3947
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/>
4048
<fillField userInput="$$simpleProduct.custom_attributes[url_key]$$" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="fillUrlKey"/>
4149
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="saveProduct"/>
42-
<see userInput="The value specified in the URL Key field would generate a URL that already exists" selector="{{AdminProductMessagesSection.errorMessage}}" stepKey="assertErrorMessage"/>
50+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertErrorMessage">
51+
<argument name="messageType" value="error"/>
52+
<argument name="message" value="The value specified in the URL Key field would generate a URL that already exists"/>
53+
</actionGroup>
4354
</test>
4455
</tests>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminCreateSimpleProductNegativePriceTest.xml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,20 @@
1818
<group value="product"/>
1919
</annotations>
2020
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
21-
<amOnPage url="{{AdminProductCreatePage.url(SimpleProduct.visibility, SimpleProduct.type_id)}}" stepKey="goToCreateProduct"/>
22-
<waitForPageLoad stepKey="wait1"/>
23-
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="fillName"/>
24-
<fillField selector="{{AdminProductFormSection.productPrice}}" userInput="-42" stepKey="fillPrice"/>
21+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToCreateProduct"/>
22+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait1"/>
23+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillName"/>
24+
<actionGroup ref="FillMainProductFormByStringActionGroup" stepKey="fillPrice">
25+
<argument name="productName" value="{{SimpleProduct.name}}"/>
26+
<argument name="productSku" value="{{SimpleProduct.sku}}"/>
27+
<argument name="productPrice" value="-42"/>
28+
<argument name="productQuantity" value="{{SimpleProduct.quantity}}"/>
29+
<argument name="productStatus" value="{{SimpleProduct.status}}"/>
30+
<argument name="productWeight" value="{{SimpleProduct.weight}}"/>
31+
</actionGroup>
2532
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSave"/>
26-
<see selector="{{AdminProductFormSection.priceFieldError}}" userInput="Please enter a number 0 or greater in this field." stepKey="seePriceValidationError"/>
33+
<actionGroup ref="AssertAdminValidationErrorAppearedForPriceFieldOnProductEditPageActionGroup" stepKey="seePriceValidationError">
34+
<argument name="errorMessage" value="Please enter a number 0 or greater in this field."/>
35+
</actionGroup>
2736
</test>
2837
</tests>

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

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,54 @@
2525
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
2626
</after>
2727

28-
<actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="openProductCatalogPage"/>
29-
<comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility" stepKey="clickAddProductToggle"/>
30-
<comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility" stepKey="waitForProductToggleToSelectProduct"/>
31-
<actionGroup ref="AdminClickAddProductToggleAndSelectProductTypeActionGroup" stepKey="clickVirtualProduct">
28+
<comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility"
29+
stepKey="openProductCatalogPage"/>
30+
<comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility"
31+
stepKey="clickAddProductToggle"/>
32+
<comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility"
33+
stepKey="waitForProductToggleToSelectProduct"/>
34+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="clickVirtualProduct">
3235
<argument name="productType" value="virtual"/>
3336
</actionGroup>
3437

3538
<!-- Create virtual product with required fields only -->
36-
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{virtualProductWithRequiredFields.name}}" stepKey="fillProductName"/>
37-
<fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{virtualProductWithRequiredFields.sku}}" stepKey="fillProductSku"/>
38-
<fillField selector="{{AdminProductFormSection.productPrice}}" userInput="{{virtualProductWithRequiredFields.price}}" stepKey="fillProductPrice"/>
39+
<actionGroup ref="FillProductNameAndSkuInProductFormActionGroup" stepKey="fillProductName">
40+
<argument name="product" value="virtualProductWithRequiredFields"/>
41+
</actionGroup>
42+
<comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility"
43+
stepKey="fillProductSku"/>
44+
<actionGroup ref="AdminFillProductPriceFieldAndPressEnterOnProductEditPageActionGroup" stepKey="fillProductPrice">
45+
<argument name="price" value="{{virtualProductWithRequiredFields.price}}"/>
46+
</actionGroup>
3947
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>
4048

4149
<!-- Verify we see success message -->
42-
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertVirtualProductSuccessMessage"/>
50+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeAssertVirtualProductSuccessMessage">
51+
<argument name="message" value="You saved the product."/>
52+
</actionGroup>
4353

4454
<!-- Verify we see created virtual product(from the above step) on the product grid page -->
4555
<actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="openProductCatalogPage1"/>
46-
<conditionalClick selector="{{AdminProductGridFilterSection.clearAll}}" dependentSelector="{{AdminProductGridFilterSection.clearAll}}" visible="true" stepKey="clickSelector"/>
47-
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="clickFilter"/>
48-
<fillField selector="{{AdminProductGridFilterSection.nameFilter}}" userInput="{{virtualProductWithRequiredFields.name}}" stepKey="fillProductName1"/>
49-
<fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{virtualProductWithRequiredFields.sku}}" stepKey="fillVirtualProductSku"/>
50-
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickSearch2"/>
51-
<waitForPageLoad stepKey="waitForProductSearch"/>
52-
<seeInField selector="{{AdminProductGridFilterSection.nameFilter}}" userInput="{{virtualProductWithRequiredFields.name}}" stepKey="seeVirtualProductName"/>
53-
<seeInField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{virtualProductWithRequiredFields.sku}}" stepKey="seeVirtualProductSku"/>
56+
<comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility"
57+
stepKey="clickSelector"/>
58+
<comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility"
59+
stepKey="clickFilter"/>
60+
<comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility"
61+
stepKey="fillProductName1"/>
62+
<comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility"
63+
stepKey="fillVirtualProductSku"/>
64+
<actionGroup ref="FilterProductGridBySkuAndNameActionGroup" stepKey="clickSearch2">
65+
<argument name="product" value="virtualProductWithRequiredFields"/>
66+
</actionGroup>
67+
<comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility"
68+
stepKey="waitForProductSearch"/>
69+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeVirtualProductName">
70+
<argument name="column" value="Name"/>
71+
<argument name="value" value="{{virtualProductWithRequiredFields.name}}"/>
72+
</actionGroup>
73+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeVirtualProductSku">
74+
<argument name="column" value="SKU"/>
75+
<argument name="value" value="{{virtualProductWithRequiredFields.sku}}"/>
76+
</actionGroup>
5477
</test>
5578
</tests>

0 commit comments

Comments
 (0)