|
| 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="CatalogProductListWidgetOperatorsTest"> |
| 12 | + <annotations> |
| 13 | + <features value="CatalogWidget"/> |
| 14 | + <stories value="MAGETWO-91609: Problems with operator more/less in the 'catalog Products List' widget"/> |
| 15 | + <title value="Checking operator more/less in the 'catalog Products List' widget"/> |
| 16 | + <description value="Check 'less than', 'equals or greater than', 'equals or less than' operators"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MAGETWO-94479"/> |
| 19 | + <group value="CatalogWidget"/> |
| 20 | + </annotations> |
| 21 | + |
| 22 | + <before> |
| 23 | + <createData entity="SimpleSubCategory" stepKey="simplecategory"/> |
| 24 | + <createData entity="SimpleProduct" stepKey="createFirstProduct"> |
| 25 | + <requiredEntity createDataKey="simplecategory"/> |
| 26 | + <field key="price">10</field> |
| 27 | + </createData> |
| 28 | + <createData entity="SimpleProduct" stepKey="createSecondProduct"> |
| 29 | + <requiredEntity createDataKey="simplecategory"/> |
| 30 | + <field key="price">50</field> |
| 31 | + </createData> |
| 32 | + <createData entity="SimpleProduct" stepKey="createThirdProduct"> |
| 33 | + <requiredEntity createDataKey="simplecategory"/> |
| 34 | + <field key="price">100</field> |
| 35 | + </createData> |
| 36 | + |
| 37 | + <createData entity="_defaultBlock" stepKey="createPreReqBlock"/> |
| 38 | + <!--User log in on back-end as admin--> |
| 39 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 40 | + <actionGroup ref="EnabledWYSIWYG" stepKey="enableWYSIWYG"/> |
| 41 | + </before> |
| 42 | + |
| 43 | + <!--Open block with widget.--> |
| 44 | + <actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage1"> |
| 45 | + <argument name="CMSBlockPage" value="$$createPreReqBlock$$"/> |
| 46 | + </actionGroup> |
| 47 | + |
| 48 | + <actionGroup ref="AdminCreateBlockWithWidget" stepKey="adminCreateBlockWithWidget"> |
| 49 | + <argument name="addCondition" value="Price"/> |
| 50 | + <argument name="isCondition" value="greater than"/> |
| 51 | + <argument name="fieldCondition" value="20"/> |
| 52 | + </actionGroup> |
| 53 | + |
| 54 | + <!--Go to Catalog > Categories (choose category where created products)--> |
| 55 | + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="onCategoryIndexPage"/> |
| 56 | + <waitForPageLoad stepKey="waitForCategoryPageLoadAddProducts" after="onCategoryIndexPage"/> |
| 57 | + <click selector="{{AdminCategorySidebarTreeSection.expandAll}}" stepKey="clickExpandAll" after="waitForCategoryPageLoadAddProducts"/> |
| 58 | + <click selector="{{AdminCategorySidebarTreeSection.categoryInTree(SimpleSubCategory.name)}}" stepKey="clickCategoryLink"/> |
| 59 | + <waitForPageLoad stepKey="waitForCategoryPageLoad"/> |
| 60 | + |
| 61 | + <!--Content > Add CMS Block: name saved block--> |
| 62 | + <waitForElementVisible selector="{{AdminCategoryContentSection.sectionHeader}}" stepKey="waitForContentSection"/> |
| 63 | + <conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/> |
| 64 | + <waitForPageLoad stepKey="waitForContentLoad"/> |
| 65 | + |
| 66 | + <selectOption selector="{{AdminCategoryContentSection.AddCMSBlock}}" stepKey="selectSavedBlock" userInput="{{_defaultBlock.title}}"/> |
| 67 | + |
| 68 | + <!--Display Settings > Display Mode: Static block only--> |
| 69 | + <waitForElementVisible selector="{{AdminCategoryDisplaySettingsSection.settingsHeader}}" stepKey="waitForDisplaySettingsSection"/> |
| 70 | + <conditionalClick selector="{{AdminCategoryDisplaySettingsSection.settingsHeader}}" dependentSelector="{{AdminCategoryDisplaySettingsSection.displayMode}}" visible="false" stepKey="openDisplaySettingsSection"/> |
| 71 | + <waitForPageLoad stepKey="waitForDisplaySettingsLoad"/> |
| 72 | + <selectOption stepKey="selectStaticBlockOnlyOption" userInput="Static block only" selector="{{AdminCategoryDisplaySettingsSection.displayMode}}"/> |
| 73 | + <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategoryWithProducts"/> |
| 74 | + <waitForPageLoad stepKey="waitForCategorySaved"/> |
| 75 | + <see userInput="You saved the category." stepKey="seeSuccessMessage"/> |
| 76 | + |
| 77 | + <!--Go to Storefront > category--> |
| 78 | + <amOnPage url="$$simplecategory.name$$.html" stepKey="goToStorefrontCategoryPage"/> |
| 79 | + <waitForPageLoad stepKey="waitForStorefrontPageLoaded"/> |
| 80 | + |
| 81 | + <!--Check operators Greater than--> |
| 82 | + <dontSeeElement selector="{{InsertWidgetSection.checkElementStorefrontByPrice('10')}}" stepKey="dontSeeElementByPrice20"/> |
| 83 | + <seeElement selector="{{InsertWidgetSection.checkElementStorefrontByPrice('50')}}" stepKey="seeElementByPrice50"/> |
| 84 | + <seeElement selector="{{InsertWidgetSection.checkElementStorefrontByPrice('100')}}" stepKey="seeElementByPrice100"/> |
| 85 | + |
| 86 | + <!--Open block with widget.--> |
| 87 | + <actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage2"> |
| 88 | + <argument name="CMSBlockPage" value="$$createPreReqBlock$$"/> |
| 89 | + </actionGroup> |
| 90 | + |
| 91 | + <actionGroup ref="AdminCreateBlockWithWidget" stepKey="adminCreateBlockWithWidgetLessThan"> |
| 92 | + <argument name="addCondition" value="Price"/> |
| 93 | + <argument name="isCondition" value="less than"/> |
| 94 | + <argument name="fieldCondition" value="20"/> |
| 95 | + </actionGroup> |
| 96 | + |
| 97 | + <!--Go to Storefront > category--> |
| 98 | + <amOnPage url="$$simplecategory.name$$.html" stepKey="goToStorefrontCategoryPage2"/> |
| 99 | + <waitForPageLoad stepKey="waitForStorefrontPageLoaded2"/> |
| 100 | + |
| 101 | + <!--Check operators Greater than--> |
| 102 | + <seeElement selector="{{InsertWidgetSection.checkElementStorefrontByPrice('10')}}" stepKey="seeElementByPrice20"/> |
| 103 | + <dontSeeElement selector="{{InsertWidgetSection.checkElementStorefrontByPrice('50')}}" stepKey="dontSeeElementByPrice50"/> |
| 104 | + <dontSeeElement selector="{{InsertWidgetSection.checkElementStorefrontByPrice('100')}}" stepKey="dontSeeElementByPrice100"/> |
| 105 | + |
| 106 | + <!--Open block with widget.--> |
| 107 | + <actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage3"> |
| 108 | + <argument name="CMSBlockPage" value="$$createPreReqBlock$$"/> |
| 109 | + </actionGroup> |
| 110 | + |
| 111 | + <actionGroup ref="AdminCreateBlockWithWidget" stepKey="adminCreateBlockWithWidgetEqualsOrGreaterThan"> |
| 112 | + <argument name="addCondition" value="Price"/> |
| 113 | + <argument name="isCondition" value="equals or greater than"/> |
| 114 | + <argument name="fieldCondition" value="50"/> |
| 115 | + </actionGroup> |
| 116 | + |
| 117 | + <!--Go to Storefront > category--> |
| 118 | + <amOnPage url="$$simplecategory.name$$.html" stepKey="goToStorefrontCategoryPage3"/> |
| 119 | + <waitForPageLoad stepKey="waitForStorefrontPageLoaded3"/> |
| 120 | + |
| 121 | + <!--Check operators Greater than--> |
| 122 | + <dontSeeElement selector="{{InsertWidgetSection.checkElementStorefrontByPrice('10')}}" stepKey="dontSeeElementByPrice20s"/> |
| 123 | + <seeElement selector="{{InsertWidgetSection.checkElementStorefrontByPrice('50')}}" stepKey="seeElementByPrice50s"/> |
| 124 | + <seeElement selector="{{InsertWidgetSection.checkElementStorefrontByPrice('100')}}" stepKey="seeElementByPrice100s"/> |
| 125 | + |
| 126 | + <!--Open block with widget.--> |
| 127 | + <actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage4"> |
| 128 | + <argument name="CMSBlockPage" value="$$createPreReqBlock$$"/> |
| 129 | + </actionGroup> |
| 130 | + |
| 131 | + <actionGroup ref="AdminCreateBlockWithWidget" stepKey="adminCreateBlockWithWidgetEqualsOrLessThan"> |
| 132 | + <argument name="addCondition" value="Price"/> |
| 133 | + <argument name="isCondition" value="equals or less than"/> |
| 134 | + <argument name="fieldCondition" value="50"/> |
| 135 | + </actionGroup> |
| 136 | + |
| 137 | + <!--Go to Storefront > category--> |
| 138 | + <amOnPage url="$$simplecategory.name$$.html" stepKey="goToStorefrontCategoryPage4"/> |
| 139 | + <waitForPageLoad stepKey="waitForStorefrontPageLoaded4"/> |
| 140 | + |
| 141 | + <!--Check operators Greater than--> |
| 142 | + <seeElement selector="{{InsertWidgetSection.checkElementStorefrontByPrice('10')}}" stepKey="seeElementByPrice20s"/> |
| 143 | + <seeElement selector="{{InsertWidgetSection.checkElementStorefrontByPrice('50')}}" stepKey="seeElementByPrice50t"/> |
| 144 | + <dontSeeElement selector="{{InsertWidgetSection.checkElementStorefrontByPrice('100')}}" stepKey="dontSeeElementByPrice100s"/> |
| 145 | + |
| 146 | + <after> |
| 147 | + <actionGroup ref="DisabledWYSIWYG" stepKey="disableWYSIWYG"/> |
| 148 | + <deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock" /> |
| 149 | + <deleteData createDataKey="simplecategory" stepKey="deleteSimpleCategory"/> |
| 150 | + <deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/> |
| 151 | + <deleteData createDataKey="createSecondProduct" stepKey="deleteSecondProduct"/> |
| 152 | + <deleteData createDataKey="createThirdProduct" stepKey="deleteThirdProduct"/> |
| 153 | + <actionGroup ref="logout" stepKey="logout"/> |
| 154 | + </after> |
| 155 | + </test> |
| 156 | +</tests> |
0 commit comments