|
269 | 269 | <actualResult type="variable">grabTextFromMiniCartSubtotalField2</actualResult>
|
270 | 270 | </assertEquals>
|
271 | 271 | </test>
|
| 272 | + <test name="AdminApplyTierPriceToProductWithPercentageDiscountTest"> |
| 273 | + <annotations> |
| 274 | + <features value="Catalog"/> |
| 275 | + <stories value="MC-5517 - System tries to save 0 in Advanced Pricing which is invalid for Discount field"/> |
| 276 | + <title value="You should be able to apply tier price to a product with float percent discount."/> |
| 277 | + <description value="You should be able to apply tier price to a product with float percent discount."/> |
| 278 | + <severity value="AVERAGE"/> |
| 279 | + <testCaseId value="MAGETWO-96881"/> |
| 280 | + <group value="product"/> |
| 281 | + </annotations> |
| 282 | + <before> |
| 283 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 284 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct"> |
| 285 | + <requiredEntity createDataKey="createCategory"/> |
| 286 | + <field key="price">100</field> |
| 287 | + </createData> |
| 288 | + </before> |
| 289 | + <after> |
| 290 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 291 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 292 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> |
| 293 | + <waitForPageLoad time="30" stepKey="waitForProductIndexPageLoad"/> |
| 294 | + <actionGroup ref="resetProductGridToDefaultView" stepKey="resetGridToDefaultKeywordSearch"/> |
| 295 | + <actionGroup ref="logout" stepKey="logoutFromAdmin"/> |
| 296 | + </after> |
| 297 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 298 | + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct"> |
| 299 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 300 | + </actionGroup> |
| 301 | + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct1"> |
| 302 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 303 | + </actionGroup> |
| 304 | + <scrollToTopOfPage stepKey="scrollToTopOfPage"/> |
| 305 | + <click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton"/> |
| 306 | + <waitForElement selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="waitForCustomerGroupPriceAddButton"/> |
| 307 | + <click selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceAddButton}}" stepKey="addCustomerGroupAllGroupsQty1PriceDiscountAndpercent"/> |
| 308 | + <fillField selector="{{AdminProductFormAdvancedPricingSection.productTierPriceQtyInput('0')}}" userInput="1" stepKey="fillProductTierPriceQtyInput"/> |
| 309 | + <selectOption selector="{{AdminProductFormAdvancedPricingSection.productTierPriceValueTypeSelect('0')}}" userInput="Discount" stepKey="selectProductTierPriceValueType"/> |
| 310 | + <fillField selector="{{AdminProductFormAdvancedPricingSection.productTierPricePercentageValuePriceInput('0')}}" userInput="0.1" stepKey="selectProductTierPricePriceInput"/> |
| 311 | + <click selector="{{AdminProductFormAdvancedPricingSection.doneButton}}" stepKey="clickDoneButton"/> |
| 312 | + <actionGroup ref="saveProductForm" stepKey="saveProduct1"/> |
| 313 | + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.sku$$)}}" stepKey="goProductPageOnStorefront"/> |
| 314 | + <waitForPageLoad time="30" stepKey="waitForPageLoad1"/> |
| 315 | + <seeElement selector="{{StorefrontCategoryProductSection.productPriceFinal('99.90')}}" stepKey="assertProductFinalPriceProductPage"/> |
| 316 | + <seeElement selector="{{StorefrontCategoryProductSection.productPriceLabel('Regular Price')}}" stepKey="assertRegularPriceProductPage"/> |
| 317 | + <seeElement selector="{{StorefrontCategoryProductSection.productPriceOld('100')}}" stepKey="assertRegularPriceAmountProductPage"/> |
| 318 | + <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="navigateToCategoryPage"/> |
| 319 | + <waitForPageLoad time="30" stepKey="waitForPageLoad2"/> |
| 320 | + <seeElement selector="{{StorefrontCategoryProductSection.productPriceFinal('99.90')}}" stepKey="assertProductFinalPriceCategoryPage"/> |
| 321 | + <seeElement selector="{{StorefrontCategoryProductSection.productPriceLabel('Regular Price')}}" stepKey="assertRegularPriceLabelCategoryPage"/> |
| 322 | + <seeElement selector="{{StorefrontCategoryProductSection.productPriceOld('100')}}" stepKey="assertRegularPriceAmountCategoryPage"/> |
| 323 | + </test> |
272 | 324 | </tests>
|
0 commit comments