|
20 | 20 | <group value="Catalog"/>
|
21 | 21 | </annotations>
|
22 | 22 | <before>
|
23 |
| - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
24 | 23 | <magentoCLI command="config:set {{CatalogInventoryOptionsShowOutOfStockDisable.path}} {{CatalogInventoryOptionsShowOutOfStockDisable.value}}" stepKey="setConfigShowOutOfStockFalse"/>
|
25 | 24 | <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
|
26 | 25 | <argument name="tags" value=""/>
|
|
30 | 29 | <requiredEntity createDataKey="category"/>
|
31 | 30 | </createData>
|
32 | 31 | </before>
|
| 32 | + |
33 | 33 | <after>
|
34 |
| - <magentoCLI command="config:set {{CatalogInventoryOptionsShowOutOfStockDisable.path}} {{CatalogInventoryOptionsShowOutOfStockDisable.value}}" stepKey="setConfigShowOutOfStockFalse"/> |
| 34 | + <magentoCLI command="config:set {{CatalogInventoryOptionsShowOutOfStockDisable.path}} {{CatalogInventoryOptionsShowOutOfStockDisable.value}}" stepKey="setConfigShowOutOfStockFalse"/> |
35 | 35 | <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
|
36 | 36 | <argument name="tags" value=""/>
|
37 | 37 | </actionGroup>
|
38 |
| - <deleteData createDataKey="product" stepKey="deleteProduct"/> |
39 |
| - <deleteData createDataKey="category" stepKey="deleteCategory"/> |
40 |
| - <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 38 | + <deleteData createDataKey="product" stepKey="deleteProduct"/> |
| 39 | + <deleteData createDataKey="category" stepKey="deleteCategory"/> |
41 | 40 | </after>
|
42 |
| - <!--Open product page--> |
43 |
| - <comment userInput="Open product page" stepKey="openProdPage"/> |
44 |
| - <amOnPage url="{{StorefrontProductPage.url($$product.custom_attributes[url_key]$$)}}" stepKey="goToSimpleProductPage"/> |
45 |
| - <waitForPageLoad stepKey="waitForSimpleProductPage"/> |
46 |
| - <!--'Add to compare' link is not available--> |
47 |
| - <comment userInput="'Add to compare' link is not available" stepKey="addToCompareLinkAvailability"/> |
| 41 | + |
| 42 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductStorefront"> |
| 43 | + <argument name="productUrl" value="$$product.custom_attributes[url_key]$$"/> |
| 44 | + </actionGroup> |
| 45 | + |
48 | 46 | <dontSeeElement selector="{{StorefrontProductInfoMainSection.productAddToCompare}}" stepKey="dontSeeAddToCompareLink"/>
|
49 |
| - <!--Turn on 'out on stock' config--> |
50 |
| - <comment userInput="Turn on 'out of stock' config" stepKey="onOutOfStockConfig"/> |
| 47 | + |
51 | 48 | <magentoCLI command="config:set {{CatalogInventoryOptionsShowOutOfStockEnable.path}} {{CatalogInventoryOptionsShowOutOfStockEnable.value}}" stepKey="setConfigShowOutOfStockTrue"/>
|
52 |
| - <!--Clear cache and reindex--> |
53 |
| - <comment userInput="Clear cache and reindex" stepKey="cleanCache"/> |
| 49 | + |
54 | 50 | <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
|
55 |
| - <argument name="indices" value=""/> |
56 |
| -</actionGroup> |
| 51 | + <argument name="indices" value=""/> |
| 52 | + </actionGroup> |
57 | 53 | <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
|
58 |
| - <argument name="tags" value=""/> |
59 |
| -</actionGroup> |
60 |
| - <!--Open product page--> |
61 |
| - <comment userInput="Open product page" stepKey="openProductPage"/> |
62 |
| - <amOnPage url="{{StorefrontProductPage.url($$product.custom_attributes[url_key]$$)}}" stepKey="goToSimpleProductPage2"/> |
63 |
| - <waitForPageLoad stepKey="waitForSimpleProductPage2"/> |
64 |
| - <!--Click on 'Add to Compare' link--> |
65 |
| - <waitForElementVisible selector="{{StorefrontProductInfoMainSection.productAddToCompare}}" stepKey="seeAddToCompareLink"/> |
66 |
| - <comment userInput="Click on 'Add to Compare' link" stepKey="clickOnAddToCompareLink"/> |
67 |
| - <click selector="{{StorefrontProductInfoMainSection.productAddToCompare}}" stepKey="clickOnAddToCompare"/> |
68 |
| - <waitForPageLoad stepKey="waitForProdAddToCmpList"/> |
69 |
| - <!--Assert success message--> |
70 |
| - <comment userInput="Assert success message" stepKey="assertSuccessMsg"/> |
71 |
| - <grabTextFrom selector="{{StorefrontMessagesSection.success}}" stepKey="grabTextFromSuccessMessage"/> |
72 |
| - <assertEquals stepKey="assertSuccessMessage"> |
73 |
| - <actualResult type="const">($grabTextFromSuccessMessage)</actualResult> |
74 |
| - <expectedResult type="string">You added product $$product.name$$ to the comparison list.</expectedResult> |
75 |
| - </assertEquals> |
76 |
| - <!--See product in the comparison list--> |
77 |
| - <comment userInput="See product in the comparison list" stepKey="seeProductInComparisonList"/> |
78 |
| - <amOnPage url="{{StorefrontProductComparePage.url}}" stepKey="navigateToComparePage"/> |
79 |
| - <waitForPageLoad stepKey="waitForStorefrontProductComparePageLoad"/> |
80 |
| - <seeElement selector="{{StorefrontProductCompareMainSection.ProductLinkByName($product.name$)}}" stepKey="seeProductInCompareList"/> |
81 |
| - <!--Go to Category page and delete product from comparison list--> |
82 |
| - <comment userInput="Go to Category page and delete product from comparison list" stepKey="deleteProdFromCmpList"/> |
83 |
| - <amOnPage url="{{StorefrontCategoryPage.url($$category.name$$)}}" stepKey="onCategoryPage"/> |
84 |
| - <waitForPageLoad time="30" stepKey="waitForPageLoad1"/> |
85 |
| - <click selector="{{StorefrontComparisonSidebarSection.ClearAll}}" stepKey="clickClearAll"/> |
86 |
| - <waitForPageLoad time="30" stepKey="waitForConfirmPageLoad"/> |
87 |
| - <click selector="{{AdminDeleteRoleSection.confirm}}" stepKey="confirmProdDelate"/> |
88 |
| - <waitForPageLoad time="30" stepKey="waitForConfirmLoad"/> |
89 |
| - <!--Add product to compare list from Category page--> |
90 |
| - <comment userInput="Add product to compare list fom Category page" stepKey="addToCmpFromCategPage"/> |
91 |
| - <moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverOverProduct"/> |
92 |
| - <click selector="{{StorefrontProductInfoMainSection.productAddToCompare}}" stepKey="clickAddToCompare"/> |
93 |
| - <waitForPageLoad stepKey="waitProdAddingToCmpList"/> |
94 |
| - <!--Assert success message--> |
95 |
| - <comment userInput="Assert success message" stepKey="assertSuccessMsg2"/> |
96 |
| - <grabTextFrom selector="{{StorefrontMessagesSection.success}}" stepKey="grabTextFromSuccessMessage2"/> |
97 |
| - <assertEquals stepKey="assertSuccessMessage2"> |
98 |
| - <actualResult type="const">($grabTextFromSuccessMessage)</actualResult> |
99 |
| - <expectedResult type="string">You added product $$product.name$$ to the comparison list.</expectedResult> |
100 |
| - </assertEquals> |
101 |
| - <!--Check that product displays on add to compare widget--> |
102 |
| - <comment userInput="Check that product displays on add to compare widget" stepKey="checkProdNameOnWidget"/> |
| 54 | + <argument name="tags" value=""/> |
| 55 | + </actionGroup> |
| 56 | + |
| 57 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductStorefront1"> |
| 58 | + <argument name="productUrl" value="$$product.custom_attributes[url_key]$$"/> |
| 59 | + </actionGroup> |
| 60 | + |
| 61 | + <actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="addProductToCompare1"> |
| 62 | + <argument name="productVar" value="$$product$$"/> |
| 63 | + </actionGroup> |
| 64 | + |
| 65 | + <actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="openCategoryPage"> |
| 66 | + <argument name="categoryName" value="$$category.name$$"/> |
| 67 | + </actionGroup> |
| 68 | + |
| 69 | + <actionGroup ref="StorefrontOpenAndCheckComparisionActionGroup" stepKey="compareOpenComparePage"/> |
| 70 | + |
| 71 | + <actionGroup ref="SeeProductInComparisonListActionGroup" stepKey="seeProductInComparisonList"> |
| 72 | + <argument name="productVar" value="$$product$$"/> |
| 73 | + </actionGroup> |
| 74 | + |
| 75 | + <actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="openCategoryPage1"> |
| 76 | + <argument name="categoryName" value="$$category.name$$"/> |
| 77 | + </actionGroup> |
| 78 | + |
| 79 | + <actionGroup ref="StorefrontClearCompareActionGroup" stepKey="clearList"/> |
| 80 | + |
| 81 | + <actionGroup ref="StorefrontHoverProductOnCategoryPageActionGroup" stepKey="hoverProduct"/> |
| 82 | + |
| 83 | + <actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="addProductToCompare2"> |
| 84 | + <argument name="productVar" value="$$product$$"/> |
| 85 | + </actionGroup> |
| 86 | + |
103 | 87 | <seeElement selector="{{StorefrontComparisonSidebarSection.ProductTitleByName($$product.name$$)}}" stepKey="seeProdNameOnCmpWidget"/>
|
104 |
| - <!--See product in the compare page--> |
105 |
| - <comment userInput="See product in the compare page" stepKey="seeProductInComparePage"/> |
106 |
| - <amOnPage url="{{StorefrontProductComparePage.url}}" stepKey="navigateToComparePage2"/> |
107 |
| - <waitForPageLoad stepKey="waitForStorefrontProductComparePageLoad2"/> |
108 |
| - <seeElement selector="{{StorefrontProductCompareMainSection.ProductLinkByName($product.name$)}}" stepKey="seeProductInCompareList2"/> |
| 88 | + |
| 89 | + <actionGroup ref="StorefrontOpenAndCheckComparisionActionGroup" stepKey="compareOpenComparePage1"/> |
| 90 | + |
| 91 | + <actionGroup ref="SeeProductInComparisonListActionGroup" stepKey="seeProductInComparisonList1"> |
| 92 | + <argument name="productVar" value="$$product$$"/> |
| 93 | + </actionGroup> |
| 94 | + |
109 | 95 | </test>
|
110 | 96 | </tests>
|
0 commit comments