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

Commit 7f23f78

Browse files
author
Joan He
committed
MAGETWO-72524: End-to-end automation: B2C logged-in user
- Addressed demo feedback - Stablized the test
1 parent 548ce0b commit 7f23f78

File tree

5 files changed

+39
-20
lines changed

5 files changed

+39
-20
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@
8080
<!-- View Simple Product 1 -->
8181
<comment userInput="View simple product 1" stepKey="commentViewSimpleProduct1" after="browseAssertSimpleProduct2ImageNotDefault"/>
8282
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="browseClickCategorySimpleProduct1View" after="commentViewSimpleProduct1"/>
83-
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct1Page" after="browseClickCategorySimpleProduct1View">
83+
<waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct1Viewloaded" after="browseClickCategorySimpleProduct1View"/>
84+
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct1Page" after="waitForSimpleProduct1Viewloaded">
8485
<argument name="product" value="$$createSimpleProduct1$$"/>
8586
</actionGroup>
8687
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
@@ -91,7 +92,8 @@
9192
<comment userInput="View simple product 2" stepKey="commentViewSimpleProduct2" after="browseAssertSimpleProduct1PageImageNotDefault"/>
9293
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory1" after="commentViewSimpleProduct2"/>
9394
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct2.name$$)}}" stepKey="browseClickCategorySimpleProduct2View" after="clickCategory1"/>
94-
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct2Page" after="browseClickCategorySimpleProduct2View">
95+
<waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct2ViewLoaded" after="browseClickCategorySimpleProduct2View"/>
96+
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct2Page" after="waitForSimpleProduct2ViewLoaded">
9597
<argument name="product" value="$$createSimpleProduct2$$"/>
9698
</actionGroup>
9799
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
@@ -104,7 +106,8 @@
104106
<!-- Add Simple Product 1 to comparison -->
105107
<comment userInput="Add simple product 1 to comparison" stepKey="commentAddSimpleProduct1ToComparison" after="startOfComparingProducts"/>
106108
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory" after="commentAddSimpleProduct1ToComparison"/>
107-
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory" after="compareClickCategory">
109+
<waitForLoadingMaskToDisappear stepKey="waitForCategoryloaded" after="compareClickCategory"/>
110+
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory" after="waitForCategoryloaded">
108111
<argument name="category" value="$$createCategory$$"/>
109112
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->
110113
<argument name="productCount" value="CONST.three"/>
@@ -116,7 +119,8 @@
116119
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrc" after="compareAssertSimpleProduct1"/>
117120
<assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrc" stepKey="compareAssertSimpleProduct1ImageNotDefault" after="compareGrabSimpleProduct1ImageSrc"/>
118121
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="compareClickSimpleProduct1" after="compareAssertSimpleProduct1ImageNotDefault"/>
119-
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="compareAssertProduct1Page" after="compareClickSimpleProduct1">
122+
<waitForLoadingMaskToDisappear stepKey="waitForCompareSimpleProduct1loaded" after="compareClickSimpleProduct1"/>
123+
<actionGroup ref="StorefrontCheckSimpleProduct" stepKey="compareAssertProduct1Page" after="waitForCompareSimpleProduct1loaded">
120124
<argument name="product" value="$$createSimpleProduct1$$"/>
121125
</actionGroup>
122126
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
@@ -129,7 +133,8 @@
129133
<!-- Add Simple Product 2 to comparison -->
130134
<comment userInput="Add simple product 2 to comparison" stepKey="commentAddSimpleProduct2ToComparison" after="compareAddSimpleProduct1ToCompare"/>
131135
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory1" after="commentAddSimpleProduct2ToComparison"/>
132-
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory1" after="compareClickCategory1">
136+
<waitForLoadingMaskToDisappear stepKey="waitForCompareCategory1loaded" after="compareClickCategory1"/>
137+
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory1" after="waitForCompareCategory1loaded">
133138
<argument name="category" value="$$createCategory$$"/>
134139
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->
135140
<argument name="productCount" value="CONST.three"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Test/EndToEndB2CLoggedInUserTest.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/EndToEndB2CLoggedInUserTest.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)