|
| 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="DefaultConfigForUPSTypeTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Ups"/> |
| 13 | + <stories value="UPS configuration"/> |
| 14 | + <title value="Default Configuration for UPS Type"/> |
| 15 | + <stories value="UPS"/> |
| 16 | + <description value="Default Configuration for UPS Type"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MAGETWO-99012"/> |
| 19 | + <useCaseId value="MAGETWO-98947"/> |
| 20 | + <group value="ups"/> |
| 21 | + <group value="cloud"/> |
| 22 | + </annotations> |
| 23 | + <before> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <!--Collapse UPS tab and logout--> |
| 28 | + <comment userInput="Collapse UPS tab and logout" stepKey="collapseTabAndLogout"/> |
| 29 | + <click selector="{{AdminShippingMethodsUpsSection.carriersUpsTab}}" stepKey="collapseTab"/> |
| 30 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 31 | + </after> |
| 32 | + <!-- Set shipping methods UPS type to default --> |
| 33 | + <comment userInput="Set shipping methods UPS type to default" stepKey="setToDefaultShippingMethodsUpsType"/> |
| 34 | + <!--<createData entity="ShippingMethodsUpsTypeSetDefault" stepKey="setShippingMethodsUpsTypeToDefault"/>--> |
| 35 | + <!-- Navigate to Stores -> Configuration -> Sales -> Shipping Methods Page --> |
| 36 | + <comment userInput="Navigate to Stores -> Configuration -> Sales -> Shipping Methods Page" stepKey="goToAdminShippingMethodsPage"/> |
| 37 | + <amOnPage url="{{AdminShippingMethodsConfigPage.url}}" stepKey="navigateToAdminShippingMethodsPage"/> |
| 38 | + <waitForPageLoad stepKey="waitPageToLoad"/> |
| 39 | + <!-- Expand 'UPS' tab --> |
| 40 | + <comment userInput="Expand UPS tab" stepKey="expandUpsTab"/> |
| 41 | + <conditionalClick selector="{{AdminShippingMethodsUpsSection.carriersUpsTab}}" dependentSelector="{{AdminShippingMethodsUpsSection.carriersUpsType}}" visible="false" stepKey="expandTab"/> |
| 42 | + <waitForElementVisible selector="{{AdminShippingMethodsUpsSection.carriersUpsType}}" stepKey="waitTabToExpand"/> |
| 43 | + <!-- Assert that selected UPS type is 'United Parcel Service REST' --> |
| 44 | + <comment userInput="Check that selected UPS type is 'United Parcel Service REST'" stepKey="assertResUpsType"/> |
| 45 | + <uncheckOption selector="{{AdminShippingMethodsUpsSection.carriersUPSTypeSystem}}" stepKey="uncheckDefault" ></uncheckOption> |
| 46 | + <selectOption userInput="UPS_REST" selector="{{AdminShippingMethodsUpsSection.carriersUpsType}}" stepKey="selectUpsOption"/> |
| 47 | + <grabValueFrom selector="{{AdminShippingMethodsUpsSection.carriersUpsType}}" stepKey="grabSelectedOptionValue"/> |
| 48 | + <assertEquals stepKey="assertRestUpsType"> |
| 49 | + <actualResult type="const">($grabSelectedOptionValue)</actualResult> |
| 50 | + <expectedResult type="string">UPS_REST</expectedResult> |
| 51 | + </assertEquals> |
| 52 | + </test> |
| 53 | +</tests> |
0 commit comments