|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
2 | 2 | <!--
|
3 |
| - /** |
4 |
| - * Copyright © Magento, Inc. All rights reserved. |
5 |
| - * See COPYING.txt for license details. |
6 |
| - */ |
| 3 | +/** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
7 | 7 | -->
|
8 | 8 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
9 |
| - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
10 | 10 | <test name="StoreFrontRecentlyViewedAtStoreViewLevelTest">
|
11 | 11 | <annotations>
|
12 | 12 | <stories value="Recently Viewed Product"/>
|
|
19 | 19 | </annotations>
|
20 | 20 | <before>
|
21 | 21 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
|
22 |
| - <!--Create Simple Product and Category --> |
| 22 | + <!--Create Simple Product and Category --> |
23 | 23 | <createData entity="SimpleSubCategory" stepKey="createCategory"/>
|
24 | 24 | <createData entity="SimpleProduct" stepKey="createSimpleProduct1">
|
25 | 25 | <requiredEntity createDataKey="createCategory"/>
|
|
37 | 37 | <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreViewOne">
|
38 | 38 | <argument name="customStore" value="customStoreEN"/>
|
39 | 39 | </actionGroup>
|
| 40 | + <magentoCron stepKey="runCronIndex" groups="index"/> |
| 41 | + |
40 | 42 | <!-- Set Stores > Configurations > Catalog > Recently Viewed/Compared Products > Show for Current = store view-->
|
41 | 43 | <magentoCLI command="config:set {{RecentlyViewedProductScopeStore.path}} {{RecentlyViewedProductScopeStore.value}}" stepKey="RecentlyViewedProductScopeStore"/>
|
42 | 44 | </before>
|
|
66 | 68 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
67 | 69 | <magentoCLI command="indexer:reindex" stepKey="reindex"/>
|
68 | 70 | <magentoCLI command="cache:flush" stepKey="flushCacheAfterDeletion"/>
|
69 |
| - |
70 | 71 | </after>
|
71 | 72 |
|
72 |
| - <!--Create widget for recently viewed products--> |
| 73 | + <!--Create widget for recently viewed products--> |
73 | 74 | <actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="clearRecentlyViewedWidgetsFromCMSContentBefore">
|
74 |
| - <argument name="content" value="{{CmsHomePageContent.content}}"/> |
75 |
| - <argument name="pageId" value="{{CmsHomePageContent.page_id}}"/> |
| 75 | + <argument name="content" value="{{CmsHomePageContent.content}}"/> |
| 76 | + <argument name="pageId" value="{{CmsHomePageContent.page_id}}"/> |
76 | 77 | </actionGroup>
|
77 | 78 |
|
78 | 79 | <amOnPage url="{{AdminCmsPageEditPage.url(CmsHomePageContent.page_id)}}" stepKey="navigateToEditHomePagePage"/>
|
79 | 80 | <waitForPageLoad time="50" stepKey="waitForContentPageToLoad"/>
|
80 | 81 |
|
81 | 82 | <actionGroup ref="AdminInsertRecentlyViewedWidgetActionGroup" stepKey="insertRecentlyViewedWidget">
|
82 |
| - <argument name="attributeSelector1" value="show_attributes"/> |
83 |
| - <argument name="attributeSelector2" value="show_buttons"/> |
84 |
| - <argument name="productAttributeSection1" value="1"/> |
85 |
| - <argument name="productAttributeSection2" value="4"/> |
86 |
| - <argument name="buttonToShowSection1" value="1"/> |
87 |
| - <argument name="buttonToShowSection2" value="3"/> |
| 83 | + <argument name="attributeSelector1" value="show_attributes"/> |
| 84 | + <argument name="attributeSelector2" value="show_buttons"/> |
| 85 | + <argument name="productAttributeSection1" value="1"/> |
| 86 | + <argument name="productAttributeSection2" value="4"/> |
| 87 | + <argument name="buttonToShowSection1" value="1"/> |
| 88 | + <argument name="buttonToShowSection2" value="3"/> |
88 | 89 | </actionGroup>
|
89 | 90 |
|
90 |
| - <!-- Warm up cache --> |
91 | 91 | <magentoCLI command="cache:flush" stepKey="flushCacheAfterWidgetCreated"/>
|
92 | 92 |
|
93 | 93 | <!-- Navigate to product 3 on store front -->
|
94 | 94 | <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct2.name$)}}" stepKey="goToStore1ProductPage2"/>
|
95 | 95 | <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct3.name$)}}" stepKey="goToStore1ProductPage3"/>
|
96 | 96 | <!-- Go to Home Page -->
|
97 | 97 | <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnHomePage"/>
|
98 |
| - <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertStore1RecentlyViewedProduct2"> |
| 98 | + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertStore1RecentlyViewedProduct2"> |
99 | 99 | <argument name="productName" value="$$createSimpleProduct2.name$$"/>
|
100 | 100 | <argument name="productPosition" value="2"/>
|
101 | 101 | </actionGroup>
|
|
104 | 104 | <argument name="productPosition" value="1"/>
|
105 | 105 | </actionGroup>
|
106 | 106 |
|
107 |
| - <!-- Switch store view --> |
| 107 | + <!-- Switch store view --> |
108 | 108 | <waitForPageLoad time="40" stepKey="waitForStorefrontPageLoad"/>
|
109 | 109 | <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchStoreViewActionGroup">
|
110 | 110 | <argument name="storeView" value="customStoreEN"/>
|
|
126 | 126 | </actionGroup>
|
127 | 127 |
|
128 | 128 | <grabTextFrom selector="{{StoreFrontRecentlyViewedProductSection.ProductName('2')}}" stepKey="grabDontSeeHomeProduct3"/>
|
129 |
| - <assertNotContains stepKey="assertNotSeeProduct3"> |
130 |
| - <actualResult type="const">$grabDontSeeHomeProduct3</actualResult> |
131 |
| - <expectedResult type="const">$$createSimpleProduct3.name$$</expectedResult> |
| 129 | + <assertNotContains stepKey="assertNotSeeProduct3"> |
| 130 | + <actualResult type="const">$grabDontSeeHomeProduct3</actualResult> |
| 131 | + <expectedResult type="const">$$createSimpleProduct3.name$$</expectedResult> |
132 | 132 | </assertNotContains>
|
133 | 133 |
|
134 | 134 | <actionGroup ref="StorefrontSwitchDefaultStoreViewActionGroup" stepKey="switchToDefualtStoreView"/>
|
|
145 | 145 |
|
146 | 146 | <grabTextFrom selector="{{StoreFrontRecentlyViewedProductSection.ProductName('2')}}" stepKey="grabDontSeeHomeProduct1"/>
|
147 | 147 | <assertNotContains stepKey="assertNotSeeProduct1">
|
148 |
| - <actualResult type="const">$grabDontSeeHomeProduct1</actualResult> |
149 |
| - <expectedResult type="const">$$createSimpleProduct1.name$$</expectedResult> |
| 148 | + <actualResult type="const">$grabDontSeeHomeProduct1</actualResult> |
| 149 | + <expectedResult type="const">$$createSimpleProduct1.name$$</expectedResult> |
150 | 150 | </assertNotContains>
|
151 | 151 | </test>
|
152 | 152 | </tests>
|
0 commit comments