|
| 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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminValidateApplyingTierPriceWithEmptyDiscountValueTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Apply tier price"/> |
| 13 | + <title value="Apply Tier Price with empty discount value"/> |
| 14 | + <description value="Validate applying tier price to product"/> |
| 15 | + <stories value="Apply Tier Price with empty discount value" /> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <testCaseId value="MAGETWO-96484"/> |
| 18 | + <group value="product"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 22 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct"> |
| 23 | + <requiredEntity createDataKey="createCategory"/> |
| 24 | + </createData> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 28 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 29 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> |
| 30 | + <actionGroup ref="AdminResetProductGridToDefaultViewActionGroup" stepKey="resetGridToDefaultKeywordSearch"/> |
| 31 | + <actionGroup ref="logout" stepKey="logoutFromAdmin"/> |
| 32 | + </after> |
| 33 | + |
| 34 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 35 | + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct"> |
| 36 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 37 | + </actionGroup> |
| 38 | + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProductPage"> |
| 39 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 40 | + </actionGroup> |
| 41 | + <click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton"/> |
| 42 | + <waitForElement selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="waitForCustomerGroupPriceAddButton"/> |
| 43 | + <click selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="addCustomerGroupPrice"/> |
| 44 | + <fillField selector="{{AdminProductFormAdvancedPricingSection.productTierPriceQtyInput('0')}}" userInput="1" stepKey="fillProductTierPriceQtyInput"/> |
| 45 | + <selectOption selector="{{AdminProductFormAdvancedPricingSection.productTierPriceValueTypeSelect('0')}}" userInput="Discount" stepKey="selectProductTierPriceValueType"/> |
| 46 | + <clearField selector="{{AdminProductFormAdvancedPricingSection.productTierPricePercentageValuePriceInput('0')}}" stepKey="clearPercentageValueField"/> |
| 47 | + <click selector="{{AdminProductFormAdvancedPricingSection.doneButton}}" stepKey="clickDoneButton"/> |
| 48 | + <see selector="{{AdminProductFormAdvancedPricingSection.productTierPricePercentageError}}" userInput="This is a required field." stepKey="assertPercentageError"/> |
| 49 | + <fillField selector="{{AdminProductFormAdvancedPricingSection.productTierPricePercentageValuePriceInput('0')}}" userInput="10" stepKey="setPercentageValue"/> |
| 50 | + <click selector="{{AdminProductFormAdvancedPricingSection.doneButton}}" stepKey="clickDoneButton1"/> |
| 51 | + <dontSee selector="{{AdminProductFormAdvancedPricingSection.productTierPricePercentageError}}" userInput="This is a required field." stepKey="assertNoPercentageError"/> |
| 52 | + <actionGroup ref="SaveProductOnProductPageOnAdmin" stepKey="saveProduct"/> |
| 53 | + </test> |
| 54 | +</tests> |
0 commit comments