|
| 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="CheckOrderOfProdsInWidgetOnCMSPageTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <title value="Checking order of products in a widget on a CMS page - SKU condition"/> |
| 15 | + <description value="Checking order of products in a widget on a CMS page - SKU condition"/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <testCaseId value="MC-13718"/> |
| 18 | + <useCaseId value="MC-5906"/> |
| 19 | + <group value="Catalog"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 23 | + <actionGroup ref="EnabledWYSIWYGEditor" stepKey="enableWYSIWYG"/> |
| 24 | + <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="enableTinyMCE4"/> |
| 25 | + <waitForPageLoad stepKey="waitConfigToSave"/> |
| 26 | + <createData entity="ApiCategory" stepKey="createFirstCategory"/> |
| 27 | + <createData entity="ApiSimpleProduct" stepKey="product1"> |
| 28 | + <requiredEntity createDataKey="createFirstCategory"/> |
| 29 | + </createData> |
| 30 | + <createData entity="ApiSimpleProduct" stepKey="product2"> |
| 31 | + <requiredEntity createDataKey="createFirstCategory"/> |
| 32 | + </createData> |
| 33 | + <amOnPage url="{{CmsPageEditPage.url('2')}}" stepKey="navigateToEditHomePagePage"/> |
| 34 | + <waitForPageLoad stepKey="waitEditHomePagePageToLoad"/> |
| 35 | + <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickContentTab" /> |
| 36 | + <waitForElementNotVisible selector="{{CmsWYSIWYGSection.CheckIfTabExpand}}" stepKey="waitForTabExpand"/> |
| 37 | + <click selector="{{CmsNewPagePageActionsSection.showHideEditor}}" stepKey="showHiddenButtons"/> |
| 38 | + <seeElement selector="{{TinyMCESection.InsertWidgetBtn}}" stepKey="seeWidgetButton" /> |
| 39 | + <click selector="{{TinyMCESection.InsertWidgetBtn}}" stepKey="clickInsertWidgetButton" /> |
| 40 | + <waitForPageLoad stepKey="waitForPageLoad1" /> |
| 41 | + <see userInput="Inserting a widget does not create a widget instance." stepKey="seeMessage" /> |
| 42 | + <see selector="{{WidgetSection.InsertWidgetBtnDisabled}}" userInput="Insert Widget" stepKey="seeInsertWidgetDisabled" /> |
| 43 | + <see selector="{{WidgetSection.CancelBtnEnabled}}" userInput="Cancel" stepKey="seeCancelBtnEnabled" /> |
| 44 | + <selectOption selector="{{WidgetSection.WidgetType}}" userInput="Catalog Products List" stepKey="selectCatalogProductsList" /> |
| 45 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear" /> |
| 46 | + <click selector="{{WidgetSection.AddParam}}" stepKey="clickAddParamBtn" /> |
| 47 | + <waitForElementVisible selector="{{WidgetSection.ConditionsDropdown}}" stepKey="waitForDropdownVisible"/> |
| 48 | + <selectOption selector="{{WidgetSection.ConditionsDropdown}}" userInput="SKU" stepKey="selectCategoryCondition" /> |
| 49 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear2" /> |
| 50 | + <click selector="{{WidgetSection.RuleParam1('3')}}" stepKey="clickOnRuleParam1"/> |
| 51 | + <waitForElementVisible selector="{{AdminTargetRuleProductsToMatchSection.newConditionOperator}}" stepKey="waitDropdownToAppear"/> |
| 52 | + <selectOption selector="{{AdminTargetRuleProductsToMatchSection.newConditionOperator}}" userInput="is one of" stepKey="selectOption"/> |
| 53 | + <click selector="{{WidgetSection.RuleParam}}" stepKey="clickOnRuleParam"/> |
| 54 | + <waitForElementVisible selector="{{WidgetSection.Chooser}}" stepKey="waitForElement" /> |
| 55 | + <click selector="{{WidgetSection.Chooser}}" stepKey="clickChooser" /> |
| 56 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear3" /> |
| 57 | + <click selector="{{WidgetSection.PreCreateProduct('$$product1.name$$')}}" stepKey="selectproduct1" /> |
| 58 | + <click selector="{{WidgetSection.PreCreateProduct('$$product2.name$$')}}" stepKey="selectproduct2" /> |
| 59 | + <click selector="{{AdminNewWidgetSection.applyParameter}}" stepKey="applyProducts"/> |
| 60 | + <click selector="{{WidgetSection.InsertWidget}}" stepKey="clickOnInsertWidgetButton"/> |
| 61 | + <waitForLoadingMaskToDisappear stepKey="waitSaveButtonToBeClickable"/> |
| 62 | + <click selector="{{InsertWidgetSection.save}}" stepKey="saveWidget"/> |
| 63 | + <waitForPageLoad stepKey="waitForSaveComplete"/> |
| 64 | + </before> |
| 65 | + <after> |
| 66 | + <actionGroup ref="ClearWidgetsFromCMSContent" stepKey="removeWidgets"/> |
| 67 | + <deleteData createDataKey="createFirstCategory" stepKey="deleteCategory"/> |
| 68 | + <deleteData createDataKey="product1" stepKey="deleteproduct1"/> |
| 69 | + <deleteData createDataKey="product2" stepKey="deleteproduct2"/> |
| 70 | + <actionGroup ref="logout" stepKey="logoutOfAdmin"/> |
| 71 | + </after> |
| 72 | + <actionGroup ref="CompareTwoProductsOrder" stepKey="compareProductOrders1"> |
| 73 | + <argument name="product_1" value="$$product1$$"/> |
| 74 | + <argument name="product_2" value="$$product2$$"/> |
| 75 | + </actionGroup> |
| 76 | + |
| 77 | + <amOnPage url="{{CmsPageEditPage.url('2')}}" stepKey="navigateToEditHomePagePage"/> |
| 78 | + <waitForPageLoad stepKey="waitEditHomePagePageToLoad"/> |
| 79 | + <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickContentTab" /> |
| 80 | + <waitForElementNotVisible selector="{{CmsWYSIWYGSection.CheckIfTabExpand}}" stepKey="waitForTabExpand"/> |
| 81 | + <executeJS function="jQuery('[id=\'cms_page_form_content_ifr\']').attr('name', 'preview-iframe')" stepKey="setPreviewFrameName"/> |
| 82 | + <switchToIFrame selector="preview-iframe" stepKey="switchToIframe"/> |
| 83 | + <doubleClick selector="{{TinyMCESection.WidgetButton}}" stepKey="clickToEditWidget"/> |
| 84 | + <switchToIFrame stepKey="switchOutFromIframe"/> |
| 85 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/> |
| 86 | + <wait time="2" stepKey="waitOptionsToLoadProperly"/> |
| 87 | + <click selector="{{WidgetSection.RuleParam1('4')}}" stepKey="openProductsList"/> |
| 88 | + <waitForElementVisible selector="{{WidgetSection.Chooser}}" stepKey="waitForElement2"/> |
| 89 | + <click selector="{{WidgetSection.Chooser}}" stepKey="clickChooser2" /> |
| 90 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear4" /> |
| 91 | + <click selector="{{WidgetSection.PreCreateProduct('$$product1.name$$')}}" stepKey="selectproduct1_1" /> |
| 92 | + <click selector="{{WidgetSection.PreCreateProduct('$$product1.name$$')}}" stepKey="selectproduct2_2" /> |
| 93 | + <click selector="{{AdminNewWidgetSection.applyParameter}}" stepKey="applyProducts1"/> |
| 94 | + <click selector="{{WidgetSection.InsertWidget}}" stepKey="clickOnInsertWidgetButton1"/> |
| 95 | + <waitForLoadingMaskToDisappear stepKey="waitSaveButtonToBeClickable1"/> |
| 96 | + <click selector="{{InsertWidgetSection.save}}" stepKey="saveWidget1"/> |
| 97 | + <waitForPageLoad stepKey="waitForSaveComplete1"/> |
| 98 | + |
| 99 | + <actionGroup ref="CompareTwoProductsOrder" stepKey="compareProductOrders2"> |
| 100 | + <argument name="product_1" value="$$product2$$"/> |
| 101 | + <argument name="product_2" value="$$product1$$"/> |
| 102 | + </actionGroup> |
| 103 | + </test> |
| 104 | +</tests> |
0 commit comments