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

Commit 548ce0b

Browse files
author
Joan He
committed
MAGETWO-75411: End-to-end automation: B2C guest user
- Addressed Demo feedback - Stablized the test
1 parent 82ceadc commit 548ce0b

File tree

5 files changed

+35
-15
lines changed

5 files changed

+35
-15
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontCompareActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<!-- Open and check comparison page -->
4141
<actionGroup name="StorefrontOpenAndCheckComparisionActionGroup">
4242
<click selector="{{StorefrontComparisonSidebarSection.Compare}}" stepKey="clickCompare"/>
43+
<waitForLoadingMaskToDisappear stepKey="waitForComparePageloaded" />
4344
<seeInCurrentUrl url="{{StorefrontProductComparePage.url}}" stepKey="checkUrl"/>
4445
<seeInTitle userInput="Products Comparison List" stepKey="assertPageNameInTitle"/>
4546
<see userInput="Compare Products" selector="{{StorefrontProductCompareMainSection.PageName}}" stepKey="assertPageName"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CGuestUserTest.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<test name="EndToEndB2CGuestUserTest">
1212
<annotations>
1313
<features value="End to End scenarios"/>
14-
<stories value="End-to-end automation: B2C guest user - MAGETWO-75411"/>
14+
<stories value="B2C guest user - MAGETWO-75411"/>
1515
<group value="e2e"/>
1616
<title value="You should be able to pass End to End B2C Guest User scenario"/>
1717
<description value="User browses catalog, searches for product, adds product to cart, adds product to wishlist, compares products, uses coupon code and checks out."/>
@@ -91,6 +91,7 @@
9191
<!-- View Simple Product 1 -->
9292
<comment userInput="View simple product 1" stepKey="commentViewSimpleProduct1" after="browseAssertSimpleProduct2ImageNotDefault"/>
9393
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="browseClickCategorySimpleProduct1View" after="commentViewSimpleProduct1"/>
94+
<waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct1Viewloaded" />
9495
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct1Page">
9596
<argument name="product" value="$$createSimpleProduct1$$"/>
9697
</actionGroup>
@@ -102,6 +103,7 @@
102103
<comment userInput="View simple product 2" stepKey="commentViewSimpleProduct2" />
103104
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory1"/>
104105
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct2.name$$)}}" stepKey="browseClickCategorySimpleProduct2View"/>
106+
<waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct2ViewLoaded" />
105107
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct2Page">
106108
<argument name="product" value="$$createSimpleProduct2$$"/>
107109
</actionGroup>
@@ -115,6 +117,7 @@
115117
<!-- Add Simple Product 1 to comparison -->
116118
<comment userInput="Add simple product 1 to comparison" stepKey="commentAddSimpleProduct1ToComparison" />
117119
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory" />
120+
<waitForLoadingMaskToDisappear stepKey="waitForCategoryloaded" />
118121
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory">
119122
<argument name="category" value="$$createCategory$$"/>
120123
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->
@@ -127,6 +130,7 @@
127130
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrc"/>
128131
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrc" stepKey="compareAssertSimpleProduct1ImageNotDefault"/>
129132
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="compareClickSimpleProduct1"/>
133+
<waitForLoadingMaskToDisappear stepKey="waitForCompareSimpleProduct1loaded" />
130134
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="compareAssertProduct1Page">
131135
<argument name="product" value="$$createSimpleProduct1$$"/>
132136
</actionGroup>
@@ -140,6 +144,7 @@
140144
<!-- Add Simple Product 2 to comparison -->
141145
<comment userInput="Add simple product 2 to comparison" stepKey="commentAddSimpleProduct2ToComparison" />
142146
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory1"/>
147+
<waitForLoadingMaskToDisappear stepKey="waitForCompareCategory1loaded" />
143148
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory1">
144149
<argument name="category" value="$$createCategory$$"/>
145150
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Test/EndToEndB2CGuestUserTest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
<fillField userInput="$$createSimpleProduct1.price$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceFrom}}" stepKey="searchAdvancedFillPriceFrom" after="searchAdvancedFillSKU"/>
2121
<fillField userInput="$$createSimpleProduct1.price$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceTo}}" stepKey="searchAdvancedFillPriceTo" after="searchAdvancedFillPriceFrom"/>
2222
<click selector="{{StorefrontCatalogSearchAdvancedFormSection.SubmitButton}}" stepKey="searchClickAdvancedSearchSubmitButton" after="searchAdvancedFillPriceTo"/>
23-
<actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="searchCheckAdvancedSearchResult" after="searchClickAdvancedSearchSubmitButton"/>
23+
<waitForLoadingMaskToDisappear stepKey="waitForSearchProductsloaded" after="searchClickAdvancedSearchSubmitButton"/>
24+
<actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="searchCheckAdvancedSearchResult" after="waitForSearchProductsloaded"/>
2425
<see userInput="1" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productCount}} span" stepKey="searchAdvancedAssertProductCount" after="searchCheckAdvancedSearchResult"/>
2526
<actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertSimpleProduct1" after="searchAdvancedAssertProductCount">
2627
<argument name="product" value="$$createSimpleProduct1$$"/>
@@ -29,7 +30,8 @@
2930
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="searchAdvancedGrabSimpleProduct1ImageSrc" after="searchAssertSimpleProduct1"/>
3031
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchAdvancedGrabSimpleProduct1ImageSrc" stepKey="searchAdvancedAssertSimpleProduct1ImageNotDefault" after="searchAdvancedGrabSimpleProduct1ImageSrc"/>
3132
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="searchClickSimpleProduct1View" after="searchAdvancedAssertSimpleProduct1ImageNotDefault"/>
32-
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="searchAssertSimpleProduct1Page" after="searchClickSimpleProduct1View">
33+
<waitForLoadingMaskToDisappear stepKey="waitForSearchSimpleProduct1Viewloaded" after="searchClickSimpleProduct1View"/>
34+
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="searchAssertSimpleProduct1Page" after="waitForSearchSimpleProduct1Viewloaded">
3335
<argument name="product" value="$$createSimpleProduct1$$"/>
3436
</actionGroup>
3537
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CGuestUserTest.xml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
<!-- Add Simple Product 1 to cart -->
1515
<comment userInput="Add Simple Product 1 to cart" stepKey="commentAddSimpleProduct1ToCart" after="startOfAddingProductsToCart" />
1616
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory" after="commentAddSimpleProduct1ToCart"/>
17-
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory" after="cartClickCategory">
17+
<waitForLoadingMaskToDisappear stepKey="waitForCartCategoryloaded" after="cartClickCategory"/>
18+
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory" after="waitForCartCategoryloaded">
1819
<argument name="category" value="$$createCategory$$"/>
1920
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->
2021
<argument name="productCount" value="CONST.three"/>
@@ -26,7 +27,8 @@
2627
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct1ImageSrc" after="cartAssertSimpleProduct1"/>
2728
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabSimpleProduct1ImageSrc" stepKey="cartAssertSimpleProduct1ImageNotDefault" after="cartGrabSimpleProduct1ImageSrc"/>
2829
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickSimpleProduct1" after="cartAssertSimpleProduct1ImageNotDefault"/>
29-
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertProduct1Page" after="cartClickSimpleProduct1">
30+
<waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loaded" after="cartClickSimpleProduct1"/>
31+
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertProduct1Page" after="waitForCartSimpleProduct1loaded">
3032
<argument name="product" value="$$createSimpleProduct1$$"/>
3133
</actionGroup>
3234
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
@@ -41,7 +43,8 @@
4143
<!-- Add Simple Product 2 to cart -->
4244
<comment userInput="Add Simple Product 2 to cart" stepKey="commentAddSimpleProduct2ToCart" after="cartAddProduct1ToCart" />
4345
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory1" after="commentAddSimpleProduct2ToCart"/>
44-
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForSimpleProduct2" after="cartClickCategory1">
46+
<waitForLoadingMaskToDisappear stepKey="waitForCartCategory1loaded" after="cartClickCategory1"/>
47+
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForSimpleProduct2" after="waitForCartCategory1loaded">
4548
<argument name="category" value="$$createCategory$$"/>
4649
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->
4750
<argument name="productCount" value="CONST.three"/>
@@ -68,7 +71,8 @@
6871
<grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1ImageSrc" after="cartOpenMinicartAndCheckSimpleProduct1"/>
6972
<assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabSimpleProduct1ImageSrc" stepKey="cartMinicartAssertSimpleProduct1ImageNotDefault" after="cartMinicartGrabSimpleProduct1ImageSrc"/>
7073
<click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartMinicartClickSimpleProduct1" after="cartMinicartAssertSimpleProduct1ImageNotDefault"/>
71-
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct1Page" after="cartMinicartClickSimpleProduct1">
74+
<waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct1loaded" after="cartMinicartClickSimpleProduct1"/>
75+
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct1Page" after="waitForMinicartSimpleProduct1loaded">
7276
<argument name="product" value="$$createSimpleProduct1$$"/>
7377
</actionGroup>
7478
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
@@ -83,7 +87,8 @@
8387
<grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2ImageSrc" after="commentCheckSimpleProduct2InMinicart"/>
8488
<assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabSimpleProduct2ImageSrc" stepKey="cartMinicartAssertSimpleProduct2ImageNotDefault" after="cartMinicartGrabSimpleProduct2ImageSrc"/>
8589
<click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartMinicartClickSimpleProduct2" after="cartMinicartAssertSimpleProduct2ImageNotDefault"/>
86-
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct2Page" after="cartMinicartClickSimpleProduct2">
90+
<waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct2loaded" after="cartMinicartClickSimpleProduct2"/>
91+
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct2Page" after="waitForMinicartSimpleProduct2loaded">
8792
<argument name="product" value="$$createSimpleProduct2$$"/>
8893
</actionGroup>
8994
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
@@ -115,7 +120,8 @@
115120
<grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct1ImageSrc" after="cartAssertCartSimpleProduct1"/>
116121
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabSimpleProduct1ImageSrc" stepKey="cartCartAssertSimpleProduct1ImageNotDefault" after="cartCartGrabSimpleProduct1ImageSrc"/>
117122
<click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickCartSimpleProduct1" after="cartCartAssertSimpleProduct1ImageNotDefault"/>
118-
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct1Page" after="cartClickCartSimpleProduct1">
123+
<waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loadedAgain" after="cartClickCartSimpleProduct1"/>
124+
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct1Page" after="waitForCartSimpleProduct1loadedAgain">
119125
<argument name="product" value="$$createSimpleProduct1$$"/>
120126
</actionGroup>
121127
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
@@ -134,7 +140,8 @@
134140
<grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct2ImageSrc" after="cartAssertCartSimpleProduct2"/>
135141
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabSimpleProduct2ImageSrc" stepKey="cartCartAssertSimpleProduct2ImageNotDefault" after="cartCartGrabSimpleProduct2ImageSrc"/>
136142
<click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartClickCartSimpleProduct2" after="cartCartAssertSimpleProduct2ImageNotDefault"/>
137-
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct2Page" after="cartClickCartSimpleProduct2">
143+
<waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct2loaded" after="cartClickCartSimpleProduct2"/>
144+
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct2Page" after="waitForCartSimpleProduct2loaded">
138145
<argument name="product" value="$$createSimpleProduct2$$"/>
139146
</actionGroup>
140147
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->

0 commit comments

Comments
 (0)