Skip to content

Commit 5801724

Browse files
committed
MAGETWO-96842: [2.3.x] [Magento Cloud] [QUANS] Tiered block displayed on configurable products without any tiered pricing
- Add automated test script
1 parent aa180bd commit 5801724

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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="AdminTierPriceNotAvailableForProductOptionsWithoutTierPriceTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<title value="Check that 'trie price' block not available for simple product from options without 'trie price'"/>
15+
<description value="Check that 'trie price' block not available for simple product from options without 'trie price'"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MAGETWO-97050"/>
18+
<useCaseId value="MAGETWO-96842"/>
19+
<group value="catalog"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
24+
<!--Create category-->
25+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
26+
27+
<!-- Create the configurable product based on the data in the /data folder -->
28+
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
29+
<requiredEntity createDataKey="createCategory"/>
30+
</createData>
31+
32+
<!-- Make the configurable product have two options, that are children of the default attribute set -->
33+
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
34+
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1">
35+
<requiredEntity createDataKey="createConfigProductAttribute"/>
36+
</createData>
37+
<createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2">
38+
<requiredEntity createDataKey="createConfigProductAttribute"/>
39+
</createData>
40+
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet">
41+
<requiredEntity createDataKey="createConfigProductAttribute"/>
42+
</createData>
43+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
44+
<requiredEntity createDataKey="createConfigProductAttribute"/>
45+
</getData>
46+
<getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2">
47+
<requiredEntity createDataKey="createConfigProductAttribute"/>
48+
</getData>
49+
50+
<!-- Create the 2 children that will be a part of the configurable product -->
51+
<createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1">
52+
<requiredEntity createDataKey="createConfigProductAttribute"/>
53+
<requiredEntity createDataKey="getConfigAttributeOption1"/>
54+
</createData>
55+
<createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2">
56+
<requiredEntity createDataKey="createConfigProductAttribute"/>
57+
<requiredEntity createDataKey="getConfigAttributeOption2"/>
58+
</createData>
59+
60+
<!-- Assign the two products to the configurable product -->
61+
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption">
62+
<requiredEntity createDataKey="createConfigProduct"/>
63+
<requiredEntity createDataKey="createConfigProductAttribute"/>
64+
<requiredEntity createDataKey="getConfigAttributeOption1"/>
65+
<requiredEntity createDataKey="getConfigAttributeOption2"/>
66+
</createData>
67+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1">
68+
<requiredEntity createDataKey="createConfigProduct"/>
69+
<requiredEntity createDataKey="createConfigChildProduct1"/>
70+
</createData>
71+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2">
72+
<requiredEntity createDataKey="createConfigProduct"/>
73+
<requiredEntity createDataKey="createConfigChildProduct2"/>
74+
</createData>
75+
</before>
76+
<after>
77+
<!--Delete created data-->
78+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
79+
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
80+
<deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/>
81+
<deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
82+
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
83+
84+
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
85+
</after>
86+
87+
<!--Go to storefront product page an check price box css-->
88+
<amOnPage url="{{StorefrontProductPage.url($$createConfigProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToSimpleProductPage"/>
89+
<waitForPageLoad stepKey="waitForStoreFrontLoad"/>
90+
<selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="$$getConfigAttributeOption1.value$$" stepKey="selectOption"/>
91+
<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="class" stepKey="grabGrabPriceClass"/>
92+
<assertNotContains actual="$grabGrabPriceClass" expected=".price-box .price-tier_price" expectedType="string" stepKey="assertNotEquals"/>
93+
</test>
94+
</tests>

0 commit comments

Comments
 (0)