Skip to content

Commit 1b01c08

Browse files
Merge branch '2.3-develop' into MC-23036
2 parents b0fd020 + e7268db commit 1b01c08

6 files changed

+178
-2
lines changed

app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute_set-meta.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<field key="attributeCode">string</field>
1616
<field key="sortOrder">integer</field>
1717
</operation>
18-
<operation name="DeleteProductAttributeFromAttributeSet" dataType="ProductAttributeSet" type="delete" auth="adminOauth" url="/V1/products/attribute-sets/{attribute_set_id}/attributes/{attribute_code}" method="DELETE">
18+
<operation name="DeleteProductAttributeFromAttributeSet" dataType="ProductAttributeSet" type="delete" auth="adminOauth" url="/V1/products/attribute-sets/{attributeSetId}/attributes/{attributeCode}" method="DELETE">
1919
<contentType>application/json</contentType>
2020
</operation>
2121
<operation name="GetProductAttributesFromDefaultSet" dataType="ProductAttributesFromDefaultSet" type="get" auth="adminOauth" url="/V1/products/attribute-sets/4/attributes" method="GET">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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="AdminCatalogPriceRuleWithUndefinedProductDropdownAttributeConditionTest">
12+
<annotations>
13+
<features value="CatalogRule"/>
14+
<stories value="Create catalog price rule"/>
15+
<title value="Enable 'is undefined' condition to Scope Catalog Price rules by custom 'Dropdown' product attribute"/>
16+
<description value="Checks discount will applies with Catalog Price Rule with 'is undefined' of 'Dropdown' Product Attribute condition"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-13654"/>
19+
<useCaseId value="MC-10971"/>
20+
<group value="CatalogRule"/>
21+
</annotations>
22+
<before>
23+
<!-- Create Category, two Products in it and "Yesno" Product attribute -->
24+
<createData entity="ApiCategory" stepKey="createCategory"/>
25+
<createData entity="ApiSimpleProduct" stepKey="createProduct">
26+
<requiredEntity createDataKey="createCategory"/>
27+
</createData>
28+
<createData entity="SimpleProduct" stepKey="createSecondProduct">
29+
<requiredEntity createDataKey="createCategory"/>
30+
</createData>
31+
<createData entity="productDropDownAttribute" stepKey="createProductAttribute">
32+
<field key="scope">website</field>
33+
</createData>
34+
<!-- Add Product Attribute to Default Set -->
35+
<createData entity="AddToDefaultSet" stepKey="addProductAttributeToDefaultSet">
36+
<requiredEntity createDataKey="createProductAttribute"/>
37+
</createData>
38+
39+
<!--Create Catalog Price Rule-->
40+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
41+
<actionGroup ref="AdminOpenNewCatalogPriceRuleFormPageActionGroup" stepKey="startCreatingCatalogPriceRule"/>
42+
<actionGroup ref="AdminCatalogPriceRuleFillMainInfoActionGroup" stepKey="fillMainInfoForCatalogPriceRule">
43+
<argument name="name" value="{{_defaultCatalogRule.name}}"/>
44+
</actionGroup>
45+
<actionGroup ref="CreateCatalogPriceRuleConditionWithAttribute" stepKey="createCatalogPriceRuleCondition">
46+
<argument name="attributeName" value="$createProductAttribute.attribute[frontend_labels][0][label]$"/>
47+
<argument name="targetValue" value="is"/>
48+
<argument name="targetSelectValue" value="is undefined"/>
49+
</actionGroup>
50+
<actionGroup ref="AdminCatalogPriceRuleFillActionsActionGroup" stepKey="fillActionsForCatalogPriceRule"/>
51+
<actionGroup ref="AdminCatalogPriceRuleSaveAndApplyActionGroup" stepKey="saveAndApplyCatalogPriceRule"/>
52+
<!-- Reindex after Catalog Price Rule creation -->
53+
<actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="runIndexerUsingCronAfterCatalogPriceRuleCreated"/>
54+
<wait time="1" stepKey="waitForReindex"/>
55+
</before>
56+
<after>
57+
<!-- Delete created via API data -->
58+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
59+
<deleteData createDataKey="createSecondProduct" stepKey="deleteSecondProduct"/>
60+
<deleteData createDataKey="createCategory" stepKey="deleteFirstCategory"/>
61+
<deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>
62+
<!-- Delete Catalog Price Rule -->
63+
<actionGroup ref="RemoveCatalogPriceRule" stepKey="deleteCatalogPriceRule">
64+
<argument name="ruleName" value="{{_defaultCatalogRule.name}}"/>
65+
</actionGroup>
66+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
67+
<actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="runIndexerUsingCronAfterAttributesWasDeleted"/>
68+
</after>
69+
70+
<!-- Check Catalog Price Rule has been affected on Product prices -->
71+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProduct">
72+
<argument name="productUrlKey" value="$createProduct.custom_attributes[url_key]$"/>
73+
</actionGroup>
74+
<actionGroup ref="AssertStorefrontProductPricesActionGroup" stepKey="assertProductPrices">
75+
<argument name="productPrice" value="$123.00"/>
76+
<argument name="productFinalPrice" value="$110.70"/>
77+
</actionGroup>
78+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openSecondProduct">
79+
<argument name="productUrlKey" value="$createSecondProduct.custom_attributes[url_key]$"/>
80+
</actionGroup>
81+
<actionGroup ref="AssertStorefrontProductPricesActionGroup" stepKey="assertSecondProductPrices">
82+
<argument name="productPrice" value="$123.00"/>
83+
<argument name="productFinalPrice" value="$110.70"/>
84+
</actionGroup>
85+
</test>
86+
</tests>
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCatalogPriceRuleWithUndefinedProductYesnoAttributeConditionTest" extends="AdminCatalogPriceRuleWithUndefinedProductDropdownAttributeConditionTest">
12+
<annotations>
13+
<title value="Enable 'is undefined' condition to Scope Catalog Price rules by custom 'YesNo' product attribute"/>
14+
<description value="Checks discount will applies with Catalog Price Rule with 'is undefined' of 'YesNo' Product Attribute condition"/>
15+
</annotations>
16+
<before>
17+
<createData entity="productYesNoAttribute" stepKey="createProductAttribute"/>
18+
</before>
19+
</test>
20+
</tests>

app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<testCaseId value="MC-13654"/>
1919
<useCaseId value="MC-10971"/>
2020
<group value="CatalogRule"/>
21+
<skip>
22+
<issueId value="DEPRECATED">Please use AdminCatalogPriceRuleWithUndefinedProductDropdownAttributeConditionTest and AdminCatalogPriceRuleWithUndefinedProductYesnoAttributeConditionTest instead.</issueId>
23+
</skip>
2124
</annotations>
2225
<before>
2326
<actionGroup ref="LoginAsAdmin" stepKey="login"/>

app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@
1212
<annotations>
1313
<features value="Checkout"/>
1414
<stories value="Check customer information created by guest"/>
15-
<title value="Check Customer Information Created By Guest"/>
15+
<title value="Deprecated. Check Customer Information Created By Guest"/>
1616
<description value="Check customer information after placing the order as the guest who created an account"/>
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MAGETWO-95932"/>
1919
<useCaseId value="MAGETWO-95820"/>
2020
<group value="checkout"/>
21+
<skip>
22+
<issueId value="DEPRECATED">Use StorefrontCheckCustomerInfoOnOrderPageCreatedByGuestTest instead.</issueId>
23+
</skip>
2124
</annotations>
2225

2326
<before>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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="StorefrontCheckCustomerInfoOnOrderPageCreatedByGuestTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="Check customer information created by guest"/>
15+
<title value="Check Customer Information Created By Guest"/>
16+
<description value="Check customer information after placing the order as the guest who created an account"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-16486"/>
19+
<useCaseId value="MAGETWO-95820"/>
20+
<group value="checkout"/>
21+
</annotations>
22+
23+
<before>
24+
<createData entity="_defaultCategory" stepKey="createCategory"/>
25+
<createData entity="_defaultProduct" stepKey="createProduct">
26+
<requiredEntity createDataKey="createCategory"/>
27+
</createData>
28+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
29+
</before>
30+
31+
<after>
32+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
33+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
34+
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrdersGridFilter"/>
35+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
36+
</after>
37+
38+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage">
39+
<argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/>
40+
</actionGroup>
41+
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage">
42+
<argument name="productName" value="$createProduct.name$"/>
43+
</actionGroup>
44+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
45+
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="fillShippingSectionAsGuest">
46+
<argument name="customerVar" value="CustomerEntityOne"/>
47+
<argument name="customerAddressVar" value="CustomerAddressSimple"/>
48+
</actionGroup>
49+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
50+
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="placeOrder">
51+
<argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage"/>
52+
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/>
53+
</actionGroup>
54+
<grabTextFrom selector="{{CheckoutSuccessRegisterSection.orderNumber}}" stepKey="grabOrderNumber"/>
55+
<actionGroup ref="StorefrontRegisterCustomerFromOrderSuccessPage" stepKey="createCustomerAfterPlaceOrder">
56+
<argument name="customer" value="CustomerEntityOne"/>
57+
</actionGroup>
58+
59+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrdersGridById">
60+
<argument name="orderId" value="{$grabOrderNumber}"/>
61+
</actionGroup>
62+
<see userInput="{{CustomerEntityOne.firstname}}" selector="{{AdminShipmentOrderInformationSection.customerName}}" stepKey="seeCustomerName"/>
63+
</test>
64+
</tests>

0 commit comments

Comments
 (0)