|
| 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="AdminFixedTaxValSavedForSpecificWebsiteTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Tax"/> |
| 14 | + <title value="Cannot Save FPT (Fixed Product Tax) On Catalog Product For Specific Website"/> |
| 15 | + <description value="Cannot Save FPT (Fixed Product Tax) On Catalog Product For Specific Website"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="MC-17182"/> |
| 18 | + <useCaseId value=" MC-17014"/> |
| 19 | + <group value="tax"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Create product attribute and add it to default attribute set />--> |
| 23 | + <comment userInput="Create product attribute and add it to default attribute set" stepKey="createAttrAndAddToDefaultAttrSet"/> |
| 24 | + <createData entity="productFPTAttribute" stepKey="createProductFPTAttribute"/> |
| 25 | + <createData entity="AddToDefaultSet" stepKey="addToDefaultAttributeSet"> |
| 26 | + <requiredEntity createDataKey="createProductFPTAttribute"/> |
| 27 | + </createData> |
| 28 | + <!-- Create product, category and log in --> |
| 29 | + <comment userInput="Create product, category and log in" stepKey="createDataAndLogIn"/> |
| 30 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 31 | + <createData entity="ApiSimpleProduct" stepKey="createProduct"> |
| 32 | + <requiredEntity createDataKey="createCategory"/> |
| 33 | + </createData> |
| 34 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 35 | + <!-- Create website, store and store view --> |
| 36 | + <comment userInput="Create website, store and store view" stepKey="createWebsite"/> |
| 37 | + <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createSecondWebsite"> |
| 38 | + <argument name="newWebsiteName" value="{{NewWebSiteData.name}}"/> |
| 39 | + <argument name="websiteCode" value="{{NewWebSiteData.code}}"/> |
| 40 | + </actionGroup> |
| 41 | + <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createSecondStore"> |
| 42 | + <argument name="website" value="{{NewWebSiteData.name}}"/> |
| 43 | + <argument name="storeGroupName" value="{{NewStoreData.name}}"/> |
| 44 | + <argument name="storeGroupCode" value="{{NewStoreData.code}}"/> |
| 45 | + </actionGroup> |
| 46 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createSecondStoreView"> |
| 47 | + <argument name="StoreGroup" value="NewStoreData"/> |
| 48 | + <argument name="customStore" value="storeViewData"/> |
| 49 | + </actionGroup> |
| 50 | + </before> |
| 51 | + <after> |
| 52 | + <!-- Delete created data and log out --> |
| 53 | + <comment userInput="Delete created data and log out" stepKey="deleteDataAndLogOut"/> |
| 54 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 55 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 56 | + <deleteData createDataKey="createProductFPTAttribute" stepKey="deleteProductFPTAttribute"/> |
| 57 | + <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteCustomWebsite"> |
| 58 | + <argument name="websiteName" value="{{NewWebSiteData.name}}"/> |
| 59 | + </actionGroup> |
| 60 | + <actionGroup ref="logout" stepKey="logoutOfAdmin"/> |
| 61 | + </after> |
| 62 | + <!-- Go to product edit page and assign it to created website --> |
| 63 | + <comment userInput="Go to product edit page and assign it to created website" stepKey="assignProductToCreatedWebsite"/> |
| 64 | + <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="navigateToProductPage"/> |
| 65 | + <actionGroup ref="attachOneWebsiteToProductActionGroup" stepKey="updateSimpleProductAddingWebsiteCreated"> |
| 66 | + <argument name="website" value="{{NewWebSiteData.name}}"/> |
| 67 | + </actionGroup> |
| 68 | + <!-- Add Fixed Product Tax attribute --> |
| 69 | + <comment userInput="Add Fixed Product Tax attribute" stepKey="addFixedProdTaxAttr"/> |
| 70 | + <actionGroup ref="AdminProductAddFPTValueActionGroup" stepKey="addFixedProductTaxAttr"> |
| 71 | + <argument name="FPTAttributeCode" value="$$createProductFPTAttribute.attribute_code$$"/> |
| 72 | + <argument name="stateForFPT" value="California"/> |
| 73 | + <argument name="valueForFPT" value="10"/> |
| 74 | + </actionGroup> |
| 75 | + <actionGroup ref="saveProductForm" stepKey="saveProduct"/> |
| 76 | + <!-- Check if created tax attribute is saved --> |
| 77 | + <comment userInput="Check if created tax attribute is saved" stepKey="checkThatTaxAttributeIsSaved"/> |
| 78 | + <seeElement selector="{{AdminProductAddFPTValueSection.setTaxValueForFPT($$createProductFPTAttribute.attribute_code$$)}}" stepKey="checkIfTaxAttributeSaved"/> |
| 79 | + </test> |
| 80 | +</tests> |
0 commit comments