|
| 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="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="AdminAddRecentlyViewedProductWidgetToSeeProductPriceTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Cms"/> |
| 14 | + <stories value="Admin Add Recently Viewed Product Widget To SeeProduct PriceTest"/> |
| 15 | + <group value="Cms"/> |
| 16 | + <title value="Admin Add Recently Viewed Product Widget To SeeProduct PriceTest in frontend"/> |
| 17 | + <description value="Admin Add Recently Viewed Product Widget To SeeProduct PriceTest in frontend"/> |
| 18 | + <severity value="BLOCKER"/> |
| 19 | + <testCaseId value="git-38159"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <createData entity="_defaultCategory" stepKey="createPreReqCategory"/> |
| 23 | + <createData entity="SimpleOutOfStockProduct" stepKey="createPreReqProduct"> |
| 24 | + <requiredEntity createDataKey="createPreReqCategory"/> |
| 25 | + </createData> |
| 26 | + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> |
| 27 | + <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> |
| 28 | + <actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" /> |
| 29 | + <!-- Configure Magento to show out of stock products and to allow backorders --> |
| 30 | + <magentoCLI command="config:set {{CatalogInventoryOptionsShowOutOfStockEnable.path}} {{CatalogInventoryOptionsShowOutOfStockEnable.value}}" stepKey="setConfigShowOutOfStockTrue"/> |
| 31 | + </before> |
| 32 | + <!--Main test--> |
| 33 | + <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToPage"/> |
| 34 | + <fillField selector="{{CmsNewPagePageBasicFieldsSection.pageTitle}}" userInput="{{_defaultCmsPage.title}}" stepKey="fillFieldTitle"/> |
| 35 | + <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickContentTab" /> |
| 36 | + <waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCE"/> |
| 37 | + <executeJS function="tinyMCE.activeEditor.setContent('Hello CMS Page!');" stepKey="executeJSFillContent"/> |
| 38 | + <seeElement selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="seeWidgetIcon" /> |
| 39 | + <click selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="clickInsertWidgetIcon" /> |
| 40 | + <waitForPageLoad stepKey="waitForPageLoad" /> |
| 41 | + <see userInput="Inserting a widget does not create a widget instance." stepKey="seeMessage" /> |
| 42 | + <!--see Insert Widget button disabled--> |
| 43 | + <see selector="{{WidgetSection.InsertWidgetBtnDisabled}}" userInput="Insert Widget" stepKey="seeInsertWidgetDisabled" /> |
| 44 | + <!--see Cancel button enabled--> |
| 45 | + <see selector="{{WidgetSection.CancelBtnEnabled}}" userInput="Cancel" stepKey="seeCancelBtnEnabled" /> |
| 46 | + <!--Select "Widget Type"--> |
| 47 | + <selectOption selector="{{WidgetSection.WidgetType}}" userInput="Recently Viewed Products" stepKey="selectRecentlyViewedProducts" /> |
| 48 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear" /> |
| 49 | + <!--see Insert Widget button enabled--> |
| 50 | + <see selector="{{WidgetSection.InsertWidgetBtnEnabled}}" userInput="Insert Widget" stepKey="seeInsertWidgetEnabled" /> |
| 51 | + <fillField selector="{{WidgetSection.PageSize}}" userInput="5" stepKey="fillNoOfProductDisplay" /> |
| 52 | + <selectOption selector="{{WidgetSection.ProductAttribute}}" parameterArray="['Name','Image','Price','Learn More Link']" stepKey="selectProductAttributes" /> |
| 53 | + <selectOption selector="{{WidgetSection.ButtonToShow}}" parameterArray="['Add to Cart', 'Add To Compare', 'Add To Wishlist']" stepKey="selectBtnToShow" /> |
| 54 | + <selectOption selector="{{WidgetSection.WidgetTemplate}}" userInput="Viewed Products Grid Template" stepKey="selectTemplate" /> |
| 55 | + <actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/> |
| 56 | + <scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" /> |
| 57 | + <click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/> |
| 58 | + <fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/> |
| 59 | + <actionGroup ref="SaveCmsPageActionGroup" stepKey="clickSavePage"/> |
| 60 | + <amOnPage url="$$createPreReqProduct.custom_attributes[url_key]$$.html" stepKey="amOnProductPage" /> |
| 61 | + <waitForPageLoad stepKey="waitForPage" /> |
| 62 | + <amOnPage url="{{_defaultCmsPage.identifier}}" stepKey="amOnPageTestPage"/> |
| 63 | + <waitForPageLoad stepKey="wait5" /> |
| 64 | + <!--see widget on Storefront--> |
| 65 | + <see userInput="Hello CMS Page!" stepKey="seeContent"/> |
| 66 | + <waitForPageLoad stepKey="wait6" /> |
| 67 | + <waitForText userInput="$$createPreReqProduct.name$$" stepKey="waitForProductVisible" /> |
| 68 | + <see userInput="$$createPreReqProduct.name$$" stepKey="seeProductName" /> |
| 69 | + <see userInput="$$createPreReqProduct.price$$" stepKey="seeProductPrice" /> |
| 70 | + <after> |
| 71 | + <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCatalog" /> |
| 72 | + <deleteData createDataKey="createPreReqProduct" stepKey="deletePreReqProduct" /> |
| 73 | + <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> |
| 74 | + <!-- Set Magento back to default configuration --> |
| 75 | + <magentoCLI command="config:set {{CatalogInventoryOptionsShowOutOfStockDisable.path}} {{CatalogInventoryOptionsShowOutOfStockDisable.value}}" stepKey="setConfigShowOutOfStockFalse"/> |
| 76 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 77 | + </after> |
| 78 | + </test> |
| 79 | +</tests> |
0 commit comments