Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit d5baac7

Browse files
author
Joan He
committed
Merge branch 'MAGETWO-75411' into MAGETWO-72524
# Conflicts: # dev/tests/acceptance/.env.example
2 parents 19c9197 + 8b0eba1 commit d5baac7

File tree

14 files changed

+783
-570
lines changed

14 files changed

+783
-570
lines changed

dev/tests/acceptance/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ MAGENTO_ADMIN_PASSWORD=
5858
#TESTS_MODULE_PATH=
5959

6060
#*** These properties impact the modules loaded into MFTF, you can point to your own full path, or a custom set of modules located with the core set
61-
MODULE_WHITELIST=Magento_Framework,Magento_ConfigurableProductWishlist
61+
MODULE_WHITELIST=Magento_Framework,Magento_ConfigurableProductWishlist,Magento_ConfigurableProductCatalogSearch
6262
#CUSTOM_MODULE_PATHS=
6363

6464
#*** Bool property which allows the user to toggle debug output during test execution

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductInfoMainSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<element name="stock" type="input" selector=".stock.available"/>
1313
<element name="productName" type="text" selector=".base"/>
1414
<element name="productSku" type="text" selector=".product.attribute.sku>.value"/>
15-
<element name="productPrice" type="text" selector=".price"/>
15+
<element name="productPrice" type="text" selector="div.price-box.price-final_price"/>
1616
<element name="productStockStatus" type="text" selector=".stock[title=Availability]>span"/>
1717
<element name="productImage" type="text" selector="//*[@id='maincontent']//div[@class='gallery-placeholder']//img[@class='fotorama__img']"/>
1818
<element name="productDescription" type="text" selector="//div[@id='product.info.description']//div[@class='value']"/>
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<test name="EndToEndB2CGuestUserTest">
12+
<annotations>
13+
<features value="End to End scenarios"/>
14+
<stories value="End-to-end automation: B2C guest user - MAGETWO-75411"/>
15+
<group value="e2e"/>
16+
<title value="You should be able to pass End to End B2C Guest User scenario"/>
17+
<description value="User browses catalog, searches for product, adds product to cart, adds product to wishlist, compares products, uses coupon code and checks out."/>
18+
<severity value="CRITICAL"/>
19+
<testCaseId value="MAGETWO-87435"/>
20+
</annotations>
21+
<before>
22+
<resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/>
23+
24+
<createData entity="ApiCategory" stepKey="createCategory"/>
25+
26+
<createData entity="ApiSimpleProduct" stepKey="createSimpleProduct1">
27+
<requiredEntity createDataKey="createCategory"/>
28+
</createData>
29+
<createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct1Image">
30+
<requiredEntity createDataKey="createSimpleProduct1"/>
31+
</createData>
32+
<createData entity="ApiProductAttributeMediaGalleryEntryMagentoLogo" stepKey="createSimpleProduct1Image1">
33+
<requiredEntity createDataKey="createSimpleProduct1"/>
34+
</createData>
35+
<updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct1" createDataKey="createSimpleProduct1"/>
36+
37+
<createData entity="ApiSimpleProduct" stepKey="createSimpleProduct2">
38+
<requiredEntity createDataKey="createCategory"/>
39+
</createData>
40+
<createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct2Image">
41+
<requiredEntity createDataKey="createSimpleProduct2"/>
42+
</createData>
43+
<updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct2" createDataKey="createSimpleProduct2"/>
44+
</before>
45+
<after>
46+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
47+
48+
<!-- @TODO: Uncomment once MQE-679 is fixed -->
49+
<!--<deleteData createDataKey="createSimpleProduct1Image" stepKey="deleteSimpleProduct1Image"/>-->
50+
<!-- @TODO: Uncomment once MQE-679 is fixed -->
51+
<!--<deleteData createDataKey="createSimpleProduct1Image1" stepKey="deleteSimpleProduct1Image1"/>-->
52+
<deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/>
53+
54+
<!-- @TODO: Uncomment once MQE-679 is fixed -->
55+
<!--<deleteData createDataKey="createSimpleProduct2Image" stepKey="deleteSimpleProduct2Image"/>-->
56+
<deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/>
57+
</after>
58+
59+
<!-- Step 1: User browses catalog -->
60+
<comment userInput="Start of browsing catalog" stepKey="startOfBrowsingCatalog" />
61+
<amOnPage url="{{StorefrontHomePage}}" stepKey="amOnHomePage"/>
62+
<waitForPageLoad stepKey="homeWaitForPageLoad"/>
63+
<waitForElementVisible selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeWaitForWelcomeMessage"/>
64+
<see userInput="Default welcome msg!" selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeCheckWelcome"/>
65+
66+
<!-- Open Category -->
67+
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="browseClickCategory"/>
68+
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategory">
69+
<argument name="category" value="$$createCategory$$"/>
70+
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->
71+
<argument name="productCount" value="CONST.three"/>
72+
</actionGroup>
73+
<!-- Check simple product1 in category -->
74+
<actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct1">
75+
<argument name="product" value="$$createSimpleProduct1$$"/>
76+
</actionGroup>
77+
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
78+
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct1ImageSrc"/>
79+
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct1ImageSrc" stepKey="browseAssertSimpleProduct1ImageNotDefault"/>
80+
<!-- Check simple product2 in category -->
81+
<actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct2">
82+
<argument name="product" value="$$createSimpleProduct2$$"/>
83+
</actionGroup>
84+
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
85+
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct2ImageSrc"/>
86+
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct2ImageSrc" stepKey="browseAssertSimpleProduct2ImageNotDefault"/>
87+
88+
<!-- View Simple Product 1 -->
89+
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="browseClickCategorySimpleProduct1View" after="browseAssertSimpleProduct2ImageNotDefault"/>
90+
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct1Page">
91+
<argument name="product" value="$$createSimpleProduct1$$"/>
92+
</actionGroup>
93+
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
94+
<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct1PageImageSrc"/>
95+
<assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct1PageImageSrc" stepKey="browseAssertSimpleProduct1PageImageNotDefault"/>
96+
97+
<!-- View Simple Product 2 -->
98+
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory1"/>
99+
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct2.name$$)}}" stepKey="browseClickCategorySimpleProduct2View"/>
100+
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct2Page">
101+
<argument name="product" value="$$createSimpleProduct2$$"/>
102+
</actionGroup>
103+
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
104+
<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct2PageImageSrc"/>
105+
<assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct2PageImageSrc" stepKey="browseAssertSimpleProduct2PageImageNotDefault"/>
106+
<comment userInput="End of browsing catalog" stepKey="endOfBrowsingCatalog" after="browseAssertSimpleProduct2PageImageNotDefault"/>
107+
108+
<!-- Step 4: User compares products -->
109+
<comment userInput="Start of comparing products" stepKey="startOfComparingProducts" after="endOfBrowsingCatalog"/>
110+
<!-- Add Simple Product 1 to comparison -->
111+
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory" />
112+
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory">
113+
<argument name="category" value="$$createCategory$$"/>
114+
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->
115+
<argument name="productCount" value="CONST.three"/>
116+
</actionGroup>
117+
<actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct1">
118+
<argument name="product" value="$$createSimpleProduct1$$"/>
119+
</actionGroup>
120+
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
121+
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrc"/>
122+
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrc" stepKey="compareAssertSimpleProduct1ImageNotDefault"/>
123+
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="compareClickSimpleProduct1"/>
124+
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="compareAssertProduct1Page">
125+
<argument name="product" value="$$createSimpleProduct1$$"/>
126+
</actionGroup>
127+
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
128+
<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="compareGrabSimpleProduct1PageImageSrc"/>
129+
<assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$compareGrabSimpleProduct1PageImageSrc" stepKey="compareAssertSimpleProduct2PageImageNotDefault"/>
130+
<actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="compareAddSimpleProduct1ToCompare">
131+
<argument name="productVar" value="$$createSimpleProduct1$$"/>
132+
</actionGroup>
133+
134+
<!-- Add Simple Product 2 to comparison -->
135+
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory1"/>
136+
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory1">
137+
<argument name="category" value="$$createCategory$$"/>
138+
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->
139+
<argument name="productCount" value="CONST.three"/>
140+
</actionGroup>
141+
<actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct2">
142+
<argument name="product" value="$$createSimpleProduct2$$"/>
143+
</actionGroup>
144+
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
145+
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrc"/>
146+
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrc" stepKey="compareAssertSimpleProduct2ImageNotDefault"/>
147+
<actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="compareAddSimpleProduct2ToCompare">
148+
<argument name="productVar" value="$$createSimpleProduct2$$"/>
149+
</actionGroup>
150+
151+
<!-- Check products in comparison sidebar -->
152+
<!-- Check simple product1 in comparison sidebar -->
153+
<actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct1InSidebar" after="compareAddSimpleProduct2ToCompare">
154+
<argument name="productVar" value="$$createSimpleProduct1$$"/>
155+
</actionGroup>
156+
<!-- Check simple product2 in comparison sidebar -->
157+
<actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct2InSidebar">
158+
<argument name="productVar" value="$$createSimpleProduct2$$"/>
159+
</actionGroup>
160+
161+
<!-- Check products on comparison page -->
162+
<!-- Check simple product1 on comparison page -->
163+
<actionGroup ref="StorefrontOpenAndCheckComparisionActionGroup" stepKey="compareOpenComparePage" after="compareSimpleProduct2InSidebar"/>
164+
<actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct1InComparison">
165+
<argument name="productVar" value="$$createSimpleProduct1$$"/>
166+
</actionGroup>
167+
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
168+
<grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrcInComparison"/>
169+
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrcInComparison" stepKey="compareAssertSimpleProduct1ImageNotDefaultInComparison"/>
170+
<!-- Check simple product2 on comparison page -->
171+
<actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct2InComparison">
172+
<argument name="productVar" value="$$createSimpleProduct2$$"/>
173+
</actionGroup>
174+
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
175+
<grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrcInComparison"/>
176+
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrcInComparison" stepKey="compareAssertSimpleProduct2ImageNotDefaultInComparison"/>
177+
178+
<!-- Clear comparison sidebar -->
179+
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategoryBeforeClear" after="compareAssertSimpleProduct2ImageNotDefaultInComparison"/>
180+
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory2">
181+
<argument name="category" value="$$createCategory$$"/>
182+
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->
183+
<argument name="productCount" value="CONST.three"/>
184+
</actionGroup>
185+
<actionGroup ref="StorefrontClearCompareActionGroup" stepKey="compareClearCompare"/>
186+
<comment userInput="End of Comparing Products" stepKey="endOfComparingProducts" />
187+
</test>
188+
</tests>

0 commit comments

Comments
 (0)