|
| 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="EndToEndB2CLoggedInUserTest"> |
| 12 | + <before> |
| 13 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 14 | + |
| 15 | + <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct1"> |
| 16 | + <requiredEntity createDataKey="createCategory"/> |
| 17 | + </createData> |
| 18 | + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct1Image"> |
| 19 | + <requiredEntity createDataKey="createSimpleProduct1"/> |
| 20 | + </createData> |
| 21 | + <createData entity="ApiProductAttributeMediaGalleryEntryMagentoLogo" stepKey="createSimpleProduct1Image1"> |
| 22 | + <requiredEntity createDataKey="createSimpleProduct1"/> |
| 23 | + </createData> |
| 24 | + <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct1" createDataKey="createSimpleProduct1"/> |
| 25 | + |
| 26 | + <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct2"> |
| 27 | + <requiredEntity createDataKey="createCategory"/> |
| 28 | + </createData> |
| 29 | + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct2Image"> |
| 30 | + <requiredEntity createDataKey="createSimpleProduct2"/> |
| 31 | + </createData> |
| 32 | + <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct2" createDataKey="createSimpleProduct2"/> |
| 33 | + </before> |
| 34 | + <after> |
| 35 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 36 | + |
| 37 | + <!-- @TODO: Uncomment once MQE-679 is fixed --> |
| 38 | + <!--<deleteData createDataKey="createSimpleProduct1Image" stepKey="deleteSimpleProduct1Image"/>--> |
| 39 | + <!-- @TODO: Uncomment once MQE-679 is fixed --> |
| 40 | + <!--<deleteData createDataKey="createSimpleProduct1Image1" stepKey="deleteSimpleProduct1Image1"/>--> |
| 41 | + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/> |
| 42 | + |
| 43 | + <!-- @TODO: Uncomment once MQE-679 is fixed --> |
| 44 | + <!--<deleteData createDataKey="createSimpleProduct2Image" stepKey="deleteSimpleProduct2Image"/>--> |
| 45 | + <deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/> |
| 46 | + </after> |
| 47 | + |
| 48 | + <!-- Step 1: User browses catalog --> |
| 49 | + <comment userInput="Start of browsing catalog" stepKey="startOfBrowsingCatalog" after="endOfSigningUpUserAccount"/> |
| 50 | + <amOnPage url="{{StorefrontHomePage}}" stepKey="amOnHomePage" after="startOfBrowsingCatalog"/> |
| 51 | + <waitForPageLoad stepKey="homeWaitForPageLoad" after="amOnHomePage"/> |
| 52 | + <waitForElementVisible selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeWaitForWelcomeMessage" after="homeWaitForPageLoad"/> |
| 53 | + <see userInput="Welcome, John Doe!" selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeCheckWelcome" after="homeWaitForWelcomeMessage"/> |
| 54 | + |
| 55 | + <!-- Open Category --> |
| 56 | + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="browseClickCategory" after="homeCheckWelcome"/> |
| 57 | + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategory" after="browseClickCategory"> |
| 58 | + <argument name="category" value="$$createCategory$$"/> |
| 59 | + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> |
| 60 | + <argument name="productCount" value="CONST.three"/> |
| 61 | + </actionGroup> |
| 62 | + <!-- Check simple product1 in category --> |
| 63 | + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct1" after="browseAssertCategory"> |
| 64 | + <argument name="product" value="$$createSimpleProduct1$$"/> |
| 65 | + </actionGroup> |
| 66 | + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> |
| 67 | + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct1ImageSrc" after="browseAssertCategoryProduct1"/> |
| 68 | + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct1ImageSrc" stepKey="browseAssertSimpleProduct1ImageNotDefault" after="browseGrabSimpleProduct1ImageSrc"/> |
| 69 | + <!-- Check simple product2 in category --> |
| 70 | + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct2" after="browseAssertSimpleProduct1ImageNotDefault"> |
| 71 | + <argument name="product" value="$$createSimpleProduct2$$"/> |
| 72 | + </actionGroup> |
| 73 | + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> |
| 74 | + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct2ImageSrc" after="browseAssertCategoryProduct2"/> |
| 75 | + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct2ImageSrc" stepKey="browseAssertSimpleProduct2ImageNotDefault" after="browseGrabSimpleProduct2ImageSrc"/> |
| 76 | + |
| 77 | + <!-- View Simple Product 1 --> |
| 78 | + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="browseClickCategorySimpleProduct1View" after="browseAssertSimpleProduct2ImageNotDefault"/> |
| 79 | + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct1Page" after="browseClickCategorySimpleProduct1View"> |
| 80 | + <argument name="product" value="$$createSimpleProduct1$$"/> |
| 81 | + </actionGroup> |
| 82 | + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> |
| 83 | + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct1PageImageSrc" after="browseAssertProduct1Page"/> |
| 84 | + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct1PageImageSrc" stepKey="browseAssertSimpleProduct1PageImageNotDefault" after="browseGrabSimpleProduct1PageImageSrc"/> |
| 85 | + |
| 86 | + <!-- View Simple Product 2 --> |
| 87 | + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory1" after="browseAssertSimpleProduct1PageImageNotDefault"/> |
| 88 | + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct2.name$$)}}" stepKey="browseClickCategorySimpleProduct2View" after="clickCategory1"/> |
| 89 | + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct2Page" after="browseClickCategorySimpleProduct2View"> |
| 90 | + <argument name="product" value="$$createSimpleProduct2$$"/> |
| 91 | + </actionGroup> |
| 92 | + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> |
| 93 | + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct2PageImageSrc" after="browseAssertProduct2Page"/> |
| 94 | + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct2PageImageSrc" stepKey="browseAssertSimpleProduct2PageImageNotDefault" after="browseGrabSimpleProduct2PageImageSrc"/> |
| 95 | + <comment userInput="End of browsing catalog" stepKey="endOfBrowsingCatalog" after="browseAssertSimpleProduct2PageImageNotDefault"/> |
| 96 | + |
| 97 | + <!-- Step 4: User compares products --> |
| 98 | + <comment userInput="Start of comparing products" stepKey="startOfComparingProducts" after="endOfBrowsingCatalog"/> |
| 99 | + <!-- Add Simple Product 1 to comparison --> |
| 100 | + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory" after="startOfComparingProducts"/> |
| 101 | + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory" after="compareClickCategory"> |
| 102 | + <argument name="category" value="$$createCategory$$"/> |
| 103 | + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> |
| 104 | + <argument name="productCount" value="CONST.three"/> |
| 105 | + </actionGroup> |
| 106 | + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct1" after="compareAssertCategory"> |
| 107 | + <argument name="product" value="$$createSimpleProduct1$$"/> |
| 108 | + </actionGroup> |
| 109 | + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> |
| 110 | + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrc" after="compareAssertSimpleProduct1"/> |
| 111 | + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrc" stepKey="compareAssertSimpleProduct1ImageNotDefault" after="compareGrabSimpleProduct1ImageSrc"/> |
| 112 | + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="compareClickSimpleProduct1" after="compareAssertSimpleProduct1ImageNotDefault"/> |
| 113 | + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="compareAssertProduct1Page" after="compareClickSimpleProduct1"> |
| 114 | + <argument name="product" value="$$createSimpleProduct1$$"/> |
| 115 | + </actionGroup> |
| 116 | + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> |
| 117 | + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="compareGrabSimpleProduct1PageImageSrc" after="compareAssertProduct1Page"/> |
| 118 | + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$compareGrabSimpleProduct1PageImageSrc" stepKey="compareAssertSimpleProduct2PageImageNotDefault" after="compareGrabSimpleProduct1PageImageSrc"/> |
| 119 | + <actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="compareAddSimpleProduct1ToCompare" after="compareAssertSimpleProduct2PageImageNotDefault"> |
| 120 | + <argument name="productVar" value="$$createSimpleProduct1$$"/> |
| 121 | + </actionGroup> |
| 122 | + |
| 123 | + <!-- Add Simple Product 2 to comparison --> |
| 124 | + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory1" after="compareAddSimpleProduct1ToCompare"/> |
| 125 | + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory1" after="compareClickCategory1"> |
| 126 | + <argument name="category" value="$$createCategory$$"/> |
| 127 | + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> |
| 128 | + <argument name="productCount" value="CONST.three"/> |
| 129 | + </actionGroup> |
| 130 | + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct2" after="compareAssertCategory1"> |
| 131 | + <argument name="product" value="$$createSimpleProduct2$$"/> |
| 132 | + </actionGroup> |
| 133 | + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> |
| 134 | + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrc" after="compareAssertSimpleProduct2"/> |
| 135 | + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrc" stepKey="compareAssertSimpleProduct2ImageNotDefault" after="compareGrabSimpleProduct2ImageSrc"/> |
| 136 | + <actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="compareAddSimpleProduct2ToCompare" after="compareAssertSimpleProduct2ImageNotDefault"> |
| 137 | + <argument name="productVar" value="$$createSimpleProduct2$$"/> |
| 138 | + </actionGroup> |
| 139 | + |
| 140 | + <!-- Check products in comparison sidebar --> |
| 141 | + <!-- Check simple product1 in comparison sidebar --> |
| 142 | + <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct1InSidebar" after="compareAddSimpleProduct2ToCompare"> |
| 143 | + <argument name="productVar" value="$$createSimpleProduct1$$"/> |
| 144 | + </actionGroup> |
| 145 | + <!-- Check simple product2 in comparison sidebar --> |
| 146 | + <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct2InSidebar" after="compareSimpleProduct1InSidebar"> |
| 147 | + <argument name="productVar" value="$$createSimpleProduct2$$"/> |
| 148 | + </actionGroup> |
| 149 | + |
| 150 | + <!-- Check products on comparison page --> |
| 151 | + <!-- Check simple product1 on comparison page --> |
| 152 | + <actionGroup ref="StorefrontOpenAndCheckComparisionActionGroup" stepKey="compareOpenComparePage" after="compareSimpleProduct2InSidebar"/> |
| 153 | + <actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct1InComparison" after="compareOpenComparePage"> |
| 154 | + <argument name="productVar" value="$$createSimpleProduct1$$"/> |
| 155 | + </actionGroup> |
| 156 | + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> |
| 157 | + <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrcInComparison" after="compareAssertSimpleProduct1InComparison"/> |
| 158 | + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrcInComparison" stepKey="compareAssertSimpleProduct1ImageNotDefaultInComparison" after="compareGrabSimpleProduct1ImageSrcInComparison"/> |
| 159 | + <!-- Check simple product2 on comparison page --> |
| 160 | + <actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct2InComparison" after="compareAssertSimpleProduct1ImageNotDefaultInComparison"> |
| 161 | + <argument name="productVar" value="$$createSimpleProduct2$$"/> |
| 162 | + </actionGroup> |
| 163 | + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> |
| 164 | + <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrcInComparison" after="compareAssertSimpleProduct2InComparison"/> |
| 165 | + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrcInComparison" stepKey="compareAssertSimpleProduct2ImageNotDefaultInComparison" after="compareGrabSimpleProduct2ImageSrcInComparison"/> |
| 166 | + |
| 167 | + <!-- Clear comparison sidebar --> |
| 168 | + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategoryBeforeClear" after="compareAssertSimpleProduct2ImageNotDefaultInComparison"/> |
| 169 | + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory2" after="compareClickCategoryBeforeClear"> |
| 170 | + <argument name="category" value="$$createCategory$$"/> |
| 171 | + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> |
| 172 | + <argument name="productCount" value="CONST.three"/> |
| 173 | + </actionGroup> |
| 174 | + <actionGroup ref="StorefrontClearCompareActionGroup" stepKey="compareClearCompare" after="compareAssertCategory2"/> |
| 175 | + <comment userInput="End of Comparing Products" stepKey="endOfComparingProducts" after="compareClearCompare"/> |
| 176 | + </test> |
| 177 | +</tests> |
0 commit comments