Skip to content

Commit 0ac7062

Browse files
committed
Merge remote-tracking branch 'origin/MC-20072' into 2.3-develop-pr94
2 parents 5206031 + 25ecef9 commit 0ac7062

12 files changed

+318
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<!-- Check simple product on the category page -->
11+
<actionGroup name="AssertStorefrontCategorySimpleProductShownActionGroup">
12+
<annotations>
13+
<description>Validate that the provided Simple Product is present and correct on a Category page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName" type="string" defaultValue="{{ApiSimpleOne.name}}"/>
17+
<argument name="productPrice" type="string" defaultValue="{{ApiSimpleOne.price}}"/>
18+
</arguments>
19+
20+
<waitForElementVisible selector="{{StorefrontCategoryProductSection.ProductTitleByName(productName)}}" stepKey="waitForProduct"/>
21+
<seeElement selector="{{StorefrontCategoryProductSection.ProductTitleByName(productName)}}" stepKey="assertProductName"/>
22+
<see userInput="${{productPrice}}" selector="{{StorefrontCategoryProductSection.ProductPriceByName(productName)}}" stepKey="assertProductPrice"/>
23+
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(productName)}}" stepKey="moveMouseOverProduct"/>
24+
<seeElement selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(productName)}}" stepKey="assertAddToCartButton"/>
25+
</actionGroup>
26+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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="AssertStorefrontProductDetailPageNameAndUrlActionGroup">
12+
<annotations>
13+
<description>Validates that the Product name and Url are correct.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName" defaultValue="{{ApiSimpleProduct.name}}" type="string"/>
17+
<argument name="productUrl" defaultValue="{{ApiSimpleProduct.urlKey}}" type="string"/>
18+
</arguments>
19+
20+
<seeInCurrentUrl url="{{StorefrontProductPage.url(productUrl)}}" stepKey="checkUrl"/>
21+
<seeInTitle userInput="{{productName}}" stepKey="assertProductNameTitle"/>
22+
<see userInput="{{productName}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/>
23+
</actionGroup>
24+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontCategoryActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<!-- Check simple product on the category page -->
6565
<actionGroup name="StorefrontCheckCategorySimpleProduct">
6666
<annotations>
67-
<description>Validate that the provided Simple Product is present and correct on a Category page.</description>
67+
<description>DEPRECATED Use AssertStorefrontCategorySimpleProductShownActionGroup. Validate that the provided Simple Product is present and correct on a Category page.</description>
6868
</annotations>
6969
<arguments>
7070
<argument name="product"/>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontCategoryPageOpenProductActionGroup">
11+
<annotations>
12+
<description>Click on the provided product on category page.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="productName" type="string" defaultValue="{{ApiSimpleProduct.name}}"/>
16+
</arguments>
17+
18+
<click selector="{{StorefrontCategoryMainSection.specifiedProductItemInfo(productName)}}" stepKey="openProductPage"/>
19+
<waitForPageLoad stepKey="waitForProductPageLoad"/>
20+
</actionGroup>
21+
</actionGroups>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<annotations>
3636
<description>Clicks on the 'View and Edit Cart' link in the Storefront Mini Shopping Cart. Validates that the Storefront Shopping Cart URL is present and correct. Clicks on 'Proceed to Checkout'.</description>
3737
</annotations>
38-
38+
3939
<waitForElementNotVisible selector="{{StorefrontMinicartSection.emptyCart}}" stepKey="waitUpdateQuantity"/>
4040
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
4141
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
@@ -413,7 +413,7 @@
413413
<annotations>
414414
<description>Clicks on the Customer Account link. Clicks on 'Sign Out'. Validates that the Signed Out message is present and correct.</description>
415415
</annotations>
416-
416+
417417
<click selector="{{StoreFrontSignOutSection.customerAccount}}" stepKey="clickCustomerButton"/>
418418
<click selector="{{StoreFrontSignOutSection.signOut}}" stepKey="clickToSignOut"/>
419419
<waitForPageLoad stepKey="waitForPageLoad"/>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="StorefrontOpenOrderFromSuccessPageActionGroup">
12+
<annotations>
13+
<description>Click order number link from checkout success page and check order number on order view page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="orderNumber" defaultValue="000000001" type="string"/>
17+
</arguments>
18+
19+
<click selector="{{CheckoutSuccessMainSection.orderLinkByOrderNumber(orderNumber)}}" stepKey="clickOrderNumberLink"/>
20+
<waitForPageLoad stepKey="waitForOrderPageIsLoaded"/>
21+
<see userInput="Order # {{orderNumber}}" selector="{{StorefrontCustomerOrderViewSection.orderTitle}}" stepKey="assertOrderNumberIsCorrect"/>
22+
</actionGroup>
23+
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020
<element name="createAnAccount" type="button" selector="[data-bind*=&quot;i18n: 'Create an Account'&quot;]" timeout="30"/>
2121
<element name="printLink" type="button" selector=".print" timeout="30"/>
2222
<element name="orderNumberWithoutLink" type="text" selector="//div[contains(@class, 'checkout-success')]//p/span"/>
23+
<element name="orderLinkByOrderNumber" type="text" selector="//div[contains(@class,'success')]//a[contains(.,'{{orderNumber}}')]" parameterized="true" timeout="30"/>
2324
</section>
2425
</sections>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductCategoryViewChildOnlyTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
<annotations>
1313
<features value="ConfigurableProduct"/>
1414
<stories value="View configurable product child in storefront"/>
15-
<title value="It should be possible to only view the child product of a configurable product"/>
15+
<title value="DEPRECATED It should be possible to only view the child product of a configurable product"/>
1616
<description value="Create configurable product, add to category such that only child variation is visible in category"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MC-5832"/>
1919
<group value="ConfigurableProduct"/>
2020
<skip>
21-
<issueId value="MC-17140"/>
21+
<issueId value="DEPRECATED">Use StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest instead</issueId>
2222
</skip>
2323
</annotations>
2424
<before>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
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="StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest">
12+
<annotations>
13+
<features value="ConfigurableProduct"/>
14+
<stories value="View products"/>
15+
<title value="It should be possible to only view the child product of a configurable product"/>
16+
<description value="Create configurable product, add to category such that only child variation is visible in category"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-5832"/>
19+
<group value="configurable_product"/>
20+
</annotations>
21+
<before>
22+
<!-- Create the category -->
23+
<createData entity="ApiCategory" stepKey="createCategory"/>
24+
<createData entity="_defaultCategory" stepKey="secondCategory"/>
25+
26+
<!-- Create an attribute with two options to be used in the first child product -->
27+
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
28+
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1">
29+
<requiredEntity createDataKey="createConfigProductAttribute"/>
30+
</createData>
31+
<createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2">
32+
<requiredEntity createDataKey="createConfigProductAttribute"/>
33+
</createData>
34+
35+
<!-- Add the attribute we just created to default attribute set -->
36+
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet">
37+
<requiredEntity createDataKey="createConfigProductAttribute"/>
38+
</createData>
39+
40+
<!-- Get the first option of the attribute we created -->
41+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
42+
<requiredEntity createDataKey="createConfigProductAttribute"/>
43+
</getData>
44+
45+
<!-- Get the second option of the attribute we created -->
46+
<getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2">
47+
<requiredEntity createDataKey="createConfigProductAttribute"/>
48+
</getData>
49+
50+
<!-- Create the configurable product and add it to the category -->
51+
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
52+
<requiredEntity createDataKey="createCategory"/>
53+
</createData>
54+
55+
<!-- Create a simple product and give it the attribute with the first option -->
56+
<createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1">
57+
<requiredEntity createDataKey="createConfigProductAttribute"/>
58+
<requiredEntity createDataKey="getConfigAttributeOption1"/>
59+
</createData>
60+
61+
<!-- Create a simple product and give it the attribute with the second option -->
62+
<createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2">
63+
<requiredEntity createDataKey="createConfigProductAttribute"/>
64+
<requiredEntity createDataKey="getConfigAttributeOption2"/>
65+
</createData>
66+
67+
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption">
68+
<requiredEntity createDataKey="createConfigProduct"/>
69+
<requiredEntity createDataKey="createConfigProductAttribute"/>
70+
<requiredEntity createDataKey="getConfigAttributeOption1"/>
71+
<requiredEntity createDataKey="getConfigAttributeOption2"/>
72+
</createData>
73+
74+
<!-- Add the first simple product to the configurable product -->
75+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1">
76+
<requiredEntity createDataKey="createConfigProduct"/>
77+
<requiredEntity createDataKey="createConfigChildProduct1"/>
78+
</createData>
79+
80+
<!-- Add the second simple product to the configurable product -->
81+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2">
82+
<requiredEntity createDataKey="createConfigProduct"/>
83+
<requiredEntity createDataKey="createConfigChildProduct2"/>
84+
</createData>
85+
86+
<actionGroup ref="LoginAsAdmin" stepKey="loginToAdmin"/>
87+
</before>
88+
89+
<after>
90+
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
91+
<deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/>
92+
<deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
93+
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
94+
<deleteData createDataKey="createCategory" stepKey="deleteApiCategory"/>
95+
<deleteData createDataKey="secondCategory" stepKey="deleteSecondCategory"/>
96+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
97+
</after>
98+
99+
<!-- Go to the product page for the first product -->
100+
<actionGroup ref="goToProductPageViaID" stepKey="openConfigChildProduct1Page">
101+
<argument name="productId" value="$$createConfigChildProduct1.id$$"/>
102+
</actionGroup>
103+
104+
<!-- Edit the visibility the first simple product -->
105+
<selectOption selector="{{AdminProductFormSection.visibility}}" userInput="Catalog, Search" stepKey="selectVisibilityCatalogSearch"/>
106+
<!--Add to category-->
107+
<actionGroup ref="AdminAssignCategoryToProductAndSaveActionGroup" stepKey="addProductToCategoryAndSaveProduct">
108+
<argument name="categoryName" value="$$secondCategory.name$$"/>
109+
</actionGroup>
110+
111+
<magentoCLI command="indexer:reindex" arguments="catalogsearch_fulltext" stepKey="reindexSearchIndex"/>
112+
113+
<!-- Go to storefront to view child product -->
114+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="goToSecondCategoryStorefront">
115+
<argument name="category" value="$$secondCategory$$"/>
116+
</actionGroup>
117+
<actionGroup ref="AssertStorefrontCategorySimpleProductShownActionGroup" stepKey="seeChildProductInCategory">
118+
<argument name="productName" value="$$createConfigChildProduct1.name$$"/>
119+
<argument name="productPrice" value="$$createConfigChildProduct1.price$$"/>
120+
</actionGroup>
121+
<actionGroup ref="StorefrontCheckProductIsMissingInCategoryProductsPageActionGroup" stepKey="dontSeeOtherChildProduct">
122+
<argument name="productName" value="$$createConfigChildProduct2.name$$"/>
123+
</actionGroup>
124+
<actionGroup ref="StorefrontCheckProductIsMissingInCategoryProductsPageActionGroup" stepKey="dontSeeParentProduct">
125+
<argument name="productName" value="$$createConfigProduct.name$$"/>
126+
</actionGroup>
127+
<actionGroup ref="StorefrontCategoryPageOpenProductActionGroup" stepKey="openConfigChildProductFromCategoryPage">
128+
<argument name="productName" value="$$createConfigChildProduct1.name$$"/>
129+
</actionGroup>
130+
<actionGroup ref="AssertStorefrontProductDetailPageNameAndUrlActionGroup" stepKey="checkStorefrontConfigChildProductPage">
131+
<argument name="productName" value="$$createConfigChildProduct1.name$$"/>
132+
<argument name="productUrl" value="$$createConfigChildProduct1.custom_attributes[url_key]$$"/>
133+
</actionGroup>
134+
</test>
135+
</tests>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminChangeAllCustomersGroupViaGridTest" extends="AdminChangeSingleCustomerGroupViaGridTest">
12+
<annotations>
13+
<title value="Change all customers' group via grid"/>
14+
<description value="Select All customers to change their group"/>
15+
<testCaseId value="MC-10924"/>
16+
</annotations>
17+
18+
<remove keyForRemoval="filterCustomer"/>
19+
<actionGroup ref="clearFiltersAdminDataGrid" before="selectCustomer" stepKey="clearFilters"/>
20+
<actionGroup ref="AdminSelectAllCustomers" stepKey="selectCustomer"/>
21+
</test>
22+
</tests>

0 commit comments

Comments
 (0)