|
| 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="AdminBundleProductPriceSymbolValidationInGridTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Bundle"/> |
| 14 | + <stories value="Bundle Products Special Price Column in admin Grid should have % sign not currency sign"/> |
| 15 | + <title value="Admin to validate the bundle products special price column in grid should display percentage symbol instead of currency sign"/> |
| 16 | + <description value="Admin to validate the bundle products special price column in grid should display percentage symbol instead of currency sign"/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="AC-1378"/> |
| 19 | + <useCaseId value="ACP2E-64"/> |
| 20 | + <group value="Bundle"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <!-- Create a simple product --> |
| 24 | + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> |
| 25 | + <!-- Admin login --> |
| 26 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> |
| 27 | + <!-- Navigate to catalog product grid page --> |
| 28 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndexPage"/> |
| 29 | + <!-- Open the column dropdown to add the special price from the catalog product grid --> |
| 30 | + <actionGroup ref="ToggleAdminProductGridColumnsDropdownActionGroup" stepKey="openColumnsDropdownSpecialPrice"/> |
| 31 | + <actionGroup ref="CheckAdminProductGridColumnOptionActionGroup" stepKey="checkSpecialPriceOption"> |
| 32 | + <argument name="optionName" value="Special Price"/> |
| 33 | + </actionGroup> |
| 34 | + <actionGroup ref="ToggleAdminProductGridColumnsDropdownActionGroup" stepKey="closeColumnsDropdownSpecialPrice"/> |
| 35 | + <!-- It takes a few seconds for column update to be saved --> |
| 36 | + <!-- waitForPageLoad won't work here since saving is happening with a short delay --> |
| 37 | + <wait time="5" stepKey="waitForColumnUpdateToSave"/> |
| 38 | + </before> |
| 39 | + <after> |
| 40 | + <!-- Navigate to catalog product grid page --> |
| 41 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndexPage"/> |
| 42 | + <!-- Clean applied product filters before delete --> |
| 43 | + <actionGroup ref="AdminClearGridFiltersActionGroup" stepKey="clearAppliedFilters"/> |
| 44 | + <!-- Delete all the products from the catalog product grid --> |
| 45 | + <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteAllProducts"/> |
| 46 | + <!-- Set product grid to default columns --> |
| 47 | + <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="setProductGridToDefaultColumns"/> |
| 48 | + <!-- Logging out --> |
| 49 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 50 | + </after> |
| 51 | + <!-- Go to bundle product creation page --> |
| 52 | + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="openNewBundleProductPage"> |
| 53 | + <argument name="productType" value="{{BundleProduct.type}}"/> |
| 54 | + <argument name="attributeSetId" value="{{BundleProduct.set}}"/> |
| 55 | + </actionGroup> |
| 56 | + <!-- Sets the provided Special Price on the Admin Product creation/edit page. --> |
| 57 | + <actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPrice"> |
| 58 | + <argument name="price" value="{{SimpleProductWithSpecialPrice.special_price}}"/> |
| 59 | + </actionGroup> |
| 60 | + <!-- Fill up the new product form with data --> |
| 61 | + <actionGroup ref="CreateBasicBundleProductActionGroup" stepKey="createBundledProduct"> |
| 62 | + <argument name="bundleProduct" value="BundleProduct"/> |
| 63 | + </actionGroup> |
| 64 | + <!-- Add the bundle option to the product --> |
| 65 | + <actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOption"> |
| 66 | + <argument name="x" value="0"/> |
| 67 | + <argument name="n" value="1"/> |
| 68 | + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> |
| 69 | + <argument name="prodTwoSku" value=""/> |
| 70 | + <argument name="optionTitle" value="{{BundleProduct.optionTitle1}}"/> |
| 71 | + <argument name="inputType" value="{{BundleProduct.optionInputType1}}"/> |
| 72 | + </actionGroup> |
| 73 | + <!-- Save the bundle product --> |
| 74 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/> |
| 75 | + <!-- Navigate to catalog product grid page --> |
| 76 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndexPageAfterProdSave"/> |
| 77 | + <!-- Search the created bundle product with sku --> |
| 78 | + <actionGroup ref="FilterProductGridBySku2ActionGroup" stepKey="filterBundleProductGridBySku"> |
| 79 | + <argument name="sku" value="{{BundleProduct.sku}}"/> |
| 80 | + </actionGroup> |
| 81 | + <!-- Asserting with the special price value contains the percentage value --> |
| 82 | + <actionGroup ref="AdminAssertSpecialPriceAttributeValueOnProductGridPageActionGroup" stepKey="assertSpecialPricePercentageSymbol"> |
| 83 | + <argument name="expectedValue" value="90.00%"/> |
| 84 | + </actionGroup> |
| 85 | + </test> |
| 86 | +</tests> |
0 commit comments