|
| 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="AdminPlaceOrderWhenCountryAllowedOnlyOnCurrentWebsiteScopeTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Customer"/> |
| 13 | + <stories value="Customer Order"/> |
| 14 | + <title value="Place an order when country allowed only on current website"/> |
| 15 | + <description value="Place an order when country allowed only on current website scope"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <group value="customer"/> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + <magentoCLI command="config:set --scope={{SetAllowedCountryUsConfig.scope}} --scope-code={{SetAllowedCountryUsConfig.scope_code}} {{SetAllowedCountryUsConfig.path}} {{SetAllowedCountryUsConfig.value}}" stepKey="setAllowedCountryUs"/> |
| 21 | + <magentoCLI command="config:set {{SetAllowedCountryUsConfig.path}} ''" stepKey="unselectAllCountriesFromAllowedCounties"/> |
| 22 | + <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> |
| 23 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 28 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 29 | + <createData entity="DisableAdminAccountAllowCountry" stepKey="setDefaultValueForAllowCountries"/> |
| 30 | + <createData entity="SetAdminAccountAllowCountryToDefaultForDefaultWebsite" stepKey="setDefaultValueForAllowCountriesForDefaultWebsites"/> |
| 31 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 32 | + </after> |
| 33 | + |
| 34 | + <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer"> |
| 35 | + <argument name="customer" value="$createCustomer$"/> |
| 36 | + </actionGroup> |
| 37 | + <actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addSimpleProductToTheOrder"> |
| 38 | + <argument name="product" value="$createSimpleProduct$"/> |
| 39 | + <argument name="productQty" value="2"/> |
| 40 | + </actionGroup> |
| 41 | + <actionGroup ref="AdminSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/> |
| 42 | + <actionGroup ref="AdminOrderClickSubmitOrderActionGroup" stepKey="submitOrder"/> |
| 43 | + <actionGroup ref="VerifyCreatedOrderInformationActionGroup" stepKey="verifyCreatedOrderInformation"/> |
| 44 | + </test> |
| 45 | +</tests> |
0 commit comments