|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright 2025 Adobe |
| 5 | + * All Rights Reserved. |
| 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="AdminVerifyDifferentStoreCustomizableOptionPricesTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Sales"/> |
| 14 | + <stories value="Create different stores"/> |
| 15 | + <title value="Create different stores with product customizable option price"/> |
| 16 | + <description value="Verify different stores with product customizable option price on order creation page."/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="AC-13151"/> |
| 19 | + <group value="Sales"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Create simple product and customer --> |
| 23 | + <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> |
| 24 | + <createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/> |
| 25 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 26 | + <!-- Create two store and storeViews --> |
| 27 | + <!-- Create first store and storeView --> |
| 28 | + <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewCustomStoreGroup"> |
| 29 | + <argument name="website" value="{{_defaultWebsite.name}}"/> |
| 30 | + <argument name="storeGroupName" value="{{customStoreGroup.name}}"/> |
| 31 | + <argument name="storeGroupCode" value="{{customStoreGroup.code}}"/> |
| 32 | + </actionGroup> |
| 33 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView"> |
| 34 | + <argument name="StoreGroup" value="customStoreGroup"/> |
| 35 | + <argument name="customStore" value="customStore"/> |
| 36 | + </actionGroup> |
| 37 | + <!-- Create second store and storeView --> |
| 38 | + <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="adminCreateNewStore"> |
| 39 | + <argument name="website" value="{{_defaultWebsite.name}}"/> |
| 40 | + <argument name="storeGroupName" value="{{NewStoreData.name}}"/> |
| 41 | + <argument name="storeGroupCode" value="{{NewStoreData.code}}"/> |
| 42 | + </actionGroup> |
| 43 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createSecondStoreView"> |
| 44 | + <argument name="StoreGroup" value="NewStoreData"/> |
| 45 | + <argument name="customStore" value="storeViewData"/> |
| 46 | + </actionGroup> |
| 47 | + </before> |
| 48 | + <after> |
| 49 | + <!-- Delete created data --> |
| 50 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 51 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 52 | + <actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteFirstStoreGroup"> |
| 53 | + <argument name="storeGroupName" value="customStoreGroup.name"/> |
| 54 | + </actionGroup> |
| 55 | + <actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteSecondStoreGroup"> |
| 56 | + <argument name="storeGroupName" value="NewStoreData.name"/> |
| 57 | + </actionGroup> |
| 58 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 59 | + </after> |
| 60 | + <!-- Open created product for edit --> |
| 61 | + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage"> |
| 62 | + <argument name="productId" value="$createSimpleProduct.id$"/> |
| 63 | + </actionGroup> |
| 64 | + <waitForPageLoad stepKey="waitForProductPageLoad"/> |
| 65 | + <!-- Expand customizable options --> |
| 66 | + <scrollTo selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="scrollToAddButtonOption"/> |
| 67 | + <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" visible="false" stepKey="openCustomOptionSection"/> |
| 68 | + <!-- Add Custom Options --> |
| 69 | + <actionGroup ref="AdminAddProductCustomOptionActionGroup" stepKey="addProductCustomRadiobuttonOption"> |
| 70 | + <argument name="customOptionTitle" value="{{ProductOptionRadiobutton.title}}"/> |
| 71 | + <argument name="customOptionType" value="{{ProductRadioButtonType.type}}"/> |
| 72 | + </actionGroup> |
| 73 | + <actionGroup ref="AdminAddTitleAndPriceValueToCustomOptionActionGroup" stepKey="addTitleAndPriceValueToCustomRadiobuttonOption"> |
| 74 | + <argument name="optionValue" value="ProductOptionValueRadioButtons1"/> |
| 75 | + </actionGroup> |
| 76 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/> |
| 77 | + <!--Change Scope to first store view and change price of custom option--> |
| 78 | + <actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="changeScopeToFirstStoreView"> |
| 79 | + <argument name="storeViewName" value="{{customStore.name}}"/> |
| 80 | + </actionGroup> |
| 81 | + <scrollTo selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="scrollToAddButtonOptionInFirstStoreView"/> |
| 82 | + <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" visible="false" stepKey="openCustomOptionSectionInFirstStoreView"/> |
| 83 | + <fillField selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="1000" stepKey="fillInValuePriceInFirstStoreView"/> |
| 84 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductInFirstStoreView"/> |
| 85 | + <!--Change Scope to Default store view and change price of custom option--> |
| 86 | + <actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="changeScopeToDefaultStoreView"> |
| 87 | + <argument name="storeViewName" value="'Default Store View'"/> |
| 88 | + </actionGroup> |
| 89 | + <scrollTo selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="scrollToAddButtonOptionInDefaultStoreView"/> |
| 90 | + <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" visible="false" stepKey="openCustomOptionSectionInDefaultStoreView"/> |
| 91 | + <fillField selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="1500" stepKey="fillInValuePriceInDefaultStoreView"/> |
| 92 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductInDefaultStoreView"/> |
| 93 | + <!-- Go to order page and select existing customer --> |
| 94 | + <actionGroup ref="AdminNavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderPage"> |
| 95 | + <argument name="customer" value="$createCustomer$"/> |
| 96 | + </actionGroup> |
| 97 | + <actionGroup ref="AdminSelectStoreDuringOrderCreationActionGroup" stepKey="selectCustomStore"> |
| 98 | + <argument name="storeView" value="customStore"/> |
| 99 | + </actionGroup> |
| 100 | + <!-- Assert created product custom option price --> |
| 101 | + <actionGroup ref="AdminVerifySimpleProductCustomOptionPriceActionGroup" stepKey="assertProductCustomPrice"> |
| 102 | + <argument name="product" value="$createSimpleProduct$"/> |
| 103 | + </actionGroup> |
| 104 | + </test> |
| 105 | +</tests> |
0 commit comments