Skip to content

Commit 8f4875e

Browse files
committed
Merge remote-tracking branch 'origin/MC-23649' into 2.4-develop-pr87
2 parents 20f2d72 + 74ed9f9 commit 8f4875e

File tree

43 files changed

+1391
-249
lines changed

Some content is hidden

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

43 files changed

+1391
-249
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@
2424
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
2525
<argument name="tags" value="config"/>
2626
</actionGroup>
27+
<magentoCLI command="setup:static-content:deploy -f" stepKey="deployStaticContent"/>
2728
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2829
</before>
2930
<after>
3031
<magentoCLI command="config:set {{MinifyJavaScriptFilesDisableConfigData.path}} {{MinifyJavaScriptFilesDisableConfigData.value}}" stepKey="disableJsMinification"/>
3132
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
3233
</after>
33-
<see userInput="Dashboard" selector="{{AdminHeaderSection.pageTitle}}" stepKey="seeDashboardTitle"/>
3434
<waitForPageLoad stepKey="waitForPageLoadOnDashboard"/>
35+
<see userInput="Dashboard" selector="{{AdminHeaderSection.pageTitle}}" stepKey="seeDashboardTitle"/>
3536
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="loggedInSuccessfully"/>
3637
<actionGroup ref="AssertAdminPageIsNot404ActionGroup" stepKey="dontSee404Page"/>
3738
</test>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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="AdminDeleteBundleDynamicPriceProductTest">
11+
<annotations>
12+
<features value="Bundle"/>
13+
<stories value="Delete products"/>
14+
<title value="Delete Bundle Dynamic Product"/>
15+
<description value="Admin should be able to delete a bundle dynamic product"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-26056"/>
18+
<group value="mtf_migrated"/>
19+
<group value="bundle"/>
20+
</annotations>
21+
<before>
22+
<!-- Create category and simple product -->
23+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
24+
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"/>
25+
26+
<!-- Create bundle product -->
27+
<createData entity="ApiBundleProductPriceViewRange" stepKey="createDynamicBundleProduct">
28+
<requiredEntity createDataKey="createCategory"/>
29+
</createData>
30+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
31+
<requiredEntity createDataKey="createDynamicBundleProduct"/>
32+
</createData>
33+
<createData entity="ApiBundleLink" stepKey="createNewBundleLink">
34+
<requiredEntity createDataKey="createDynamicBundleProduct"/>
35+
<requiredEntity createDataKey="bundleOption"/>
36+
<requiredEntity createDataKey="createSimpleProduct"/>
37+
</createData>
38+
<!-- TODO: Remove this action when MC-37719 will be fixed -->
39+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexInvalidatedIndices">
40+
<argument name="indices" value="cataloginventory_stock"/>
41+
</actionGroup>
42+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
43+
</before>
44+
<after>
45+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
46+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
47+
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
48+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
49+
</after>
50+
<actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteBundleProductBySku">
51+
<argument name="sku" value="$createDynamicBundleProduct.sku$"/>
52+
</actionGroup>
53+
<!-- Verify product on Product Page -->
54+
<amOnPage url="{{StorefrontProductPage.url($createDynamicBundleProduct.custom_attributes[url_key]$)}}" stepKey="openBundleProductPage"/>
55+
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoopsMessage"/>
56+
<!-- Search for the product by sku -->
57+
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchBySku">
58+
<argument name="query" value="$createDynamicBundleProduct.sku$"/>
59+
</actionGroup>
60+
<!-- Should not see bundle product -->
61+
<dontSee userInput="$createDynamicBundleProduct.sku$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
62+
<amOnPage url="{{StorefrontCategoryPage.url($createCategory.custom_attributes[url_key]$)}}" stepKey="openCategoryPage"/>
63+
<!-- Should not see any products in category -->
64+
<dontSee userInput="$createDynamicBundleProduct.name$" selector="{{StorefrontCategoryMainSection.productsList}}" stepKey="dontSeeProductInCategory"/>
65+
<see selector="{{StorefrontCategoryMainSection.emptyProductMessage}}" userInput="We can't find products matching the selection." stepKey="seeEmptyProductMessage"/>
66+
</test>
67+
</tests>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
-->
88
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10-
<test name="AdminDeleteBundleDynamicProductTest">
10+
<test name="AdminDeleteBundleDynamicProductTest" deprecated="Use AdminDeleteBundleDynamicPriceProductTest instead">
1111
<annotations>
1212
<features value="Bundle"/>
1313
<stories value="Delete products"/>
14-
<title value="Delete Bundle Dynamic Product"/>
15-
<description value="Admin should be able to delete a bundle dynamic product"/>
14+
<title value="Deprecated. Delete Bundle Dynamic Product"/>
15+
<description value="Deprecated. Admin should be able to delete a bundle dynamic product"/>
1616
<severity value="CRITICAL"/>
1717
<testCaseId value="MC-11016"/>
1818
<group value="mtf_migrated"/>
1919
<skip>
20-
<issueId value="MC-16393"/>
20+
<issueId value="DEPRECATED">Use AdminDeleteBundleDynamicPriceProductTest instead</issueId>
2121
</skip>
2222
</annotations>
2323
<before>

app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryContentSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<element name="selectFromGalleryButton" type="button" selector="//*[@class='file-uploader-area']/label[text()='Select from Gallery']"/>
1515
<element name="uploadImageFile" type="input" selector=".file-uploader-area>input"/>
1616
<element name="imageFileName" type="text" selector=".file-uploader-filename"/>
17+
<element name="imageFileMeta" type="text" selector=".file-uploader-meta"/>
1718
<element name="removeImageButton" type="button" selector=".file-uploader-summary .action-remove"/>
1819
<element name="AddCMSBlock" type="select" selector="//*[@name='landing_page']"/>
1920
<element name="description" type="input" selector="//*[@name='description']"/>
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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="AdminUpdateCategoryWithProductsDefaultSortingTest">
11+
<annotations>
12+
<features value="Catalog"/>
13+
<stories value="Update categories"/>
14+
<title value="Update category, sort products by default sorting"/>
15+
<description value="Login as admin, update category and sort products"/>
16+
<testCaseId value="MC-25667"/>
17+
<severity value="CRITICAL"/>
18+
<group value="catalog"/>
19+
<group value="mtf_migrated"/>
20+
</annotations>
21+
<before>
22+
<createData entity="defaultSimpleProduct" stepKey="simpleProduct" />
23+
<createData entity="_defaultCategory" stepKey="createCategory"/>
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/>
25+
</before>
26+
<after>
27+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
28+
<deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/>
29+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
30+
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
31+
</after>
32+
33+
<!--Open Category Page-->
34+
<actionGroup ref="GoToAdminCategoryPageByIdActionGroup" stepKey="goToAdminCategoryPage">
35+
<argument name="id" value="$createCategory.id$"/>
36+
</actionGroup>
37+
38+
<!--Update Product Display Setting-->
39+
<waitForElementVisible selector="{{AdminCategoryDisplaySettingsSection.settingsHeader}}" stepKey="waitForDisplaySettingsSection"/>
40+
<conditionalClick selector="{{AdminCategoryDisplaySettingsSection.settingsHeader}}" dependentSelector="{{AdminCategoryDisplaySettingsSection.displayMode}}" visible="false" stepKey="openDisplaySettingsSection"/>
41+
<waitForElementVisible selector="{{CategoryDisplaySettingsSection.productListCheckBox}}" stepKey="waitForAvailableProductListCheckbox"/>
42+
<click selector="{{CategoryDisplaySettingsSection.productListCheckBox}}" stepKey="enableTheAvailableProductList"/>
43+
<selectOption selector="{{CategoryDisplaySettingsSection.productList}}" parameterArray="['Product Name', 'Price']" stepKey="selectPrice"/>
44+
<waitForElementVisible selector="{{CategoryDisplaySettingsSection.defaultProductLisCheckBox}}" stepKey="waitForDefaultProductList"/>
45+
<click selector="{{CategoryDisplaySettingsSection.defaultProductLisCheckBox}}" stepKey="enableTheDefaultProductList"/>
46+
<selectOption selector="{{CategoryDisplaySettingsSection.defaultProductList}}" userInput="name" stepKey="selectProductName"/>
47+
48+
<!--Add Products in Category-->
49+
<actionGroup ref="AdminCategoryAssignProductActionGroup" stepKey="assignSimpleProductToCategory">
50+
<argument name="productSku" value="$simpleProduct.sku$"/>
51+
</actionGroup>
52+
<actionGroup ref="AdminSaveCategoryFormActionGroup" stepKey="saveCategory"/>
53+
54+
<!--Verify Category Title-->
55+
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seeCategoryNamePageTitle" />
56+
57+
<!--Verify Category in store front page-->
58+
<amOnPage url="{{StorefrontCategoryPage.url($createCategory.custom_attributes[url_key]$)}}" stepKey="openStorefrontCategoryPage"/>
59+
60+
<!--Verify Product in Category-->
61+
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="assertSimpleProductOnCategoryPage">
62+
<argument name="productName" value="$simpleProduct.name$"/>
63+
</actionGroup>
64+
65+
<!--Verify product name and sku on Store Front-->
66+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageByCustomAttributeUrlKeyActionGroup" stepKey="assertProductOnStorefrontProductPage">
67+
<argument name="product" value="$simpleProduct$"/>
68+
</actionGroup>
69+
</test>
70+
</tests>
71+

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
-->
88
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10-
<test name="AdminUpdateCategoryWithProductsTest">
10+
<test name="AdminUpdateCategoryWithProductsTest" deprecated="Use AdminUpdateCategoryWithProductsDefaultSortingTest instead">
1111
<annotations>
1212
<stories value="Update categories"/>
13-
<title value="Update category, sort products by default sorting"/>
13+
<title value="DEPRECATED. Update category, sort products by default sorting"/>
1414
<description value="Login as admin, update category and sort products"/>
1515
<testCaseId value="MC-6059"/>
1616
<severity value="BLOCKER"/>
1717
<group value="Catalog"/>
1818
<group value="mtf_migrated"/>
19+
<skip>
20+
<issueId value="DEPRECATED">Use AdminUpdateCategoryWithProductsDefaultSortingTest instead</issueId>
21+
</skip>
1922
</annotations>
2023
<before>
2124
<actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/>

app/code/Magento/Checkout/Model/TotalsInformationManagement.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Magento\Checkout\Model;
77

88
/**
9-
* Class TotalsInformationManagement
9+
* Class for management of totals information.
1010
*/
1111
class TotalsInformationManagement implements \Magento\Checkout\Api\TotalsInformationManagementInterface
1212
{
@@ -38,7 +38,7 @@ public function __construct(
3838
}
3939

4040
/**
41-
* {@inheritDoc}
41+
* @inheritDoc
4242
*/
4343
public function calculate(
4444
$cartId,
@@ -52,16 +52,20 @@ public function calculate(
5252
$quote->setBillingAddress($addressInformation->getAddress());
5353
} else {
5454
$quote->setShippingAddress($addressInformation->getAddress());
55-
$quote->getShippingAddress()->setCollectShippingRates(true)->setShippingMethod(
56-
$addressInformation->getShippingCarrierCode() . '_' . $addressInformation->getShippingMethodCode()
57-
);
55+
if ($addressInformation->getShippingCarrierCode() && $addressInformation->getShippingMethodCode()) {
56+
$quote->getShippingAddress()->setCollectShippingRates(true)->setShippingMethod(
57+
$addressInformation->getShippingCarrierCode().'_'.$addressInformation->getShippingMethodCode()
58+
);
59+
}
5860
}
5961
$quote->collectTotals();
6062

6163
return $this->cartTotalRepository->get($cartId);
6264
}
6365

6466
/**
67+
* Check if quote have items.
68+
*
6569
* @param \Magento\Quote\Model\Quote $quote
6670
* @throws \Magento\Framework\Exception\LocalizedException
6771
* @return void

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutFillEstimateShippingAndTaxActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
<argument name="address" defaultValue="US_Address_TX" type="entity"/>
1414
</arguments>
1515
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.estimateShippingAndTaxSummary}}" visible="false" stepKey="openShippingDetails"/>
16+
<waitForElementVisible selector="{{CheckoutCartSummarySection.country}}" stepKey="waitForSummarySectionLoad"/>
1617
<selectOption selector="{{CheckoutCartSummarySection.country}}" userInput="{{address.country_id}}" stepKey="selectCountry"/>
1718
<selectOption selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="{{address.state}}" stepKey="selectState"/>
1819
<waitForElementVisible selector="{{CheckoutCartSummarySection.postcode}}" stepKey="waitForPostCodeVisible"/>
1920
<fillField selector="{{CheckoutCartSummarySection.postcode}}" userInput="{{address.postcode}}" stepKey="selectPostCode"/>
2021
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDiappear"/>
2122
</actionGroup>
22-
</actionGroups>
23+
</actionGroups>

0 commit comments

Comments
 (0)