|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminDisablesMultishippingFunctionalityTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Multishipping"/> |
| 13 | + <stories value="Multishipping"/> |
| 14 | + <title value="Disable multishipping functionality in configuration page"/> |
| 15 | + <description value="Admin Should be able to disable multishipping functionality."/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="MC-26572"/> |
| 18 | + <useCaseId value="MC-26572"/> |
| 19 | + <group value="multishipping"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 23 | + <createData entity="_defaultProduct" stepKey="createSimpleProduct"> |
| 24 | + <requiredEntity createDataKey="createCategory"/> |
| 25 | + </createData> |
| 26 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 27 | + </before> |
| 28 | + <after> |
| 29 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 30 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 31 | + <wait stepKey="k1" time="10"/> |
| 32 | + <!-- Go to Admin > Store > Configuration > Sales > Multishipping, Choose YES to mutishipping which is the default state--> |
| 33 | + <amOnPage url="{{MultishippingAdminConfigPage.url}}" stepKey="NavigateToMultishippingOptions"/> |
| 34 | + <waitForPageLoad time="10" stepKey="waitForSectionDisplay"/> |
| 35 | + <selectOption selector="{{MultipleshippingConfigurationSection.AllowMultipleShippingDropdown}}" userInput="Yes" stepKey="SelectAllowMultipleShippingAddress"/> |
| 36 | + <waitForPageLoad time="10" stepKey="waitForSectionDisplayss"/> |
| 37 | + <click selector="{{MultipleshippingConfigurationSection.AllowMultipleShippingCheckbox}}" stepKey="ClickOnCheckbox"/> |
| 38 | + <waitForPageLoad time="10" stepKey="waitForSectionDisplaysss"/> |
| 39 | + <click selector="{{CatalogSection.save}}" stepKey="clickSaveConfigBtn"/> |
| 40 | + <magentoCLI command="cache:flush config" stepKey="flushCacheAfterTestRun"/> |
| 41 | + </after> |
| 42 | + |
| 43 | + <!-- Login to admin --> |
| 44 | + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAdmin"/> |
| 45 | + <!-- Go to Admin > Store > Configuration > Sales > Multishipping, Choose No to mutishipping --> |
| 46 | + <amOnPage url="{{MultishippingAdminConfigPage.url}}" stepKey="NavigateToMultishippingOptions"/> |
| 47 | + <waitForPageLoad stepKey="waitForSectionDisplay"/> |
| 48 | + <click selector="{{MultipleshippingConfigurationSection.AllowMultipleShippingCheckbox}}" stepKey="ClickOnCheckbox"/> |
| 49 | + <selectOption selector="{{MultipleshippingConfigurationSection.AllowMultipleShippingDropdown}}" userInput="No" stepKey="SelectAllowMultipleShippingAddress"/> |
| 50 | + <click selector="{{CatalogSection.save}}" stepKey="clickSaveConfigBtn"/> |
| 51 | + <!-- Flushing all the config data --> |
| 52 | + <magentoCLI command="cache:flush config" stepKey="flushCacheAfterTestRun"/> |
| 53 | + <!-- Go to Storefront as Guest --> |
| 54 | + <amOnPage url="{{StorefrontCategoryPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="onCategoryPage"/> |
| 55 | + <waitForPageLoad time="5" stepKey="waitForPageLoad"/> |
| 56 | + <click selector="{{StorefrontBundleProductActionSection.addToCartButton}}" stepKey="AddToCart"/> |
| 57 | + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="CheckoutPage"/> |
| 58 | + <!-- Assert text "Check Out with Multiple Addresses" is NOT present --> |
| 59 | + <actionGroup ref="AssertStorefrontMultiShippingOptionIsNotPresentOnShoppingCartPageActionGroup" stepKey="MultipleAddressCheckoutIsNotPresent"/> |
| 60 | + <!-- Login as Customer --> |
| 61 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> |
| 62 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 63 | + </actionGroup> |
| 64 | + |
| 65 | + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="CheckoutPage2"/> |
| 66 | + <!-- Assert text "Check Out with Multiple Addresses" is NOT present --> |
| 67 | + <actionGroup ref="AssertStorefrontMultiShippingOptionIsNotPresentOnShoppingCartPageActionGroup" stepKey="MultipleAddressCheckoutIsNotPresents"/> |
| 68 | + |
| 69 | + </test> |
| 70 | +</tests> |
0 commit comments