forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from amol2jcommerce/2.2-develop-PR-port-20170
[Backport] Order API resources updated. magento#20169
- Loading branch information
Showing
41 changed files
with
1,089 additions
and
362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
...ut/Test/Mftf/Test/StorefrontCustomerCheckoutTestWithRestrictedCountriesForPaymentTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="StorefrontCustomerCheckoutTestWithRestrictedCountriesForPaymentTest" | ||
extends="StorefrontGuestCheckoutTestWithRestrictedCountriesForPaymentTest"> | ||
<annotations> | ||
<stories value="Checkout via the Storefront"/> | ||
<title value="Checkout via Customer Checkout with restricted countries for payment"/> | ||
<description value="Should be able to place an order as a Customer with restricted countries for payment."/> | ||
<testCaseId value="MC-10831"/> | ||
</annotations> | ||
<before> | ||
<createData entity="Simple_US_Customer" stepKey="createSimpleUsCustomer"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="CustomerLogoutStorefrontActionGroup" stepKey="customerLogoutStorefront"/> | ||
<deleteData createDataKey="createSimpleUsCustomer" stepKey="deleteCustomer"/> | ||
</after> | ||
|
||
<remove keyForRemoval="guestCheckoutFillingShippingSection"/> | ||
<remove keyForRemoval="guestCheckoutFillingShippingSectionUK"/> | ||
<remove keyForRemoval="guestPlaceOrder"/> | ||
|
||
<!-- Login as Customer --> | ||
<actionGroup ref="CustomerLoginOnStorefront" before="goToProductPage" stepKey="customerLogin"> | ||
<argument name="customer" value="$$createSimpleUsCustomer$$" /> | ||
</actionGroup> | ||
|
||
<!-- Select address and go to payments page--> | ||
<see selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{US_Address_TX.state}}" after="shippingStepIsOpened" stepKey="seeRegion" /> | ||
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" after="seeRegion" stepKey="waitNextButton"/> | ||
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" after="waitNextButton" stepKey="selectShippingMethod"/> | ||
<click selector="{{CheckoutShippingMethodsSection.next}}" after="selectShippingMethod" stepKey="clickNextButton" /> | ||
<waitForPageLoad after="clickNextButton" stepKey="waitBillingForm"/> | ||
<seeElement selector="{{CheckoutPaymentSection.isPaymentSection}}" after="waitBillingForm" stepKey="checkoutPaymentStepIsOpened"/> | ||
|
||
<!-- Fill UK Address and verify that payment available and checkout successful --> | ||
<click selector="{{CheckoutShippingSection.newAdress}}" after="shippingStepIsOpened1" stepKey="fillNewAddress" /> | ||
<actionGroup ref="LoggedInUserCheckoutAddNewShippingSectionWithoutRegionActionGroup" after="fillNewAddress" stepKey="customerCheckoutFillingShippingSectionUK"> | ||
<argument name="customerVar" value="$$createSimpleUsCustomer$$" /> | ||
<argument name="customerAddressVar" value="UK_Default_Address" /> | ||
</actionGroup> | ||
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" after="customerCheckoutFillingShippingSectionUK" stepKey="waitNextButton1"/> | ||
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" after="waitNextButton1" stepKey="selectShippingMethod1"/> | ||
<click selector="{{CheckoutShippingMethodsSection.next}}" after="selectShippingMethod1" stepKey="clickNextButton1" /> | ||
|
||
<actionGroup ref="CheckoutPlaceOrderActionGroup" after="selectCheckMoneyOrderPayment" stepKey="customerPlaceorder"> | ||
<argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage" /> | ||
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" /> | ||
</actionGroup> | ||
</test> | ||
</tests> |
70 changes: 70 additions & 0 deletions
70
...ckout/Test/Mftf/Test/StorefrontGuestCheckoutTestWithRestrictedCountriesForPaymentTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="StorefrontGuestCheckoutTestWithRestrictedCountriesForPaymentTest"> | ||
<annotations> | ||
<features value="Checkout"/> | ||
<stories value="Checkout via Guest Checkout"/> | ||
<title value="Checkout via Guest Checkout with restricted countries for payment"/> | ||
<description value="Should be able to place an order as a Guest with restricted countries for payment."/> | ||
<severity value="MAJOR"/> | ||
<testCaseId value="MC-8243"/> | ||
<group value="checkout"/> | ||
</annotations> | ||
<before> | ||
<createData entity="_defaultCategory" stepKey="createCategory"/> | ||
<createData entity="ApiSimpleProduct" stepKey="createProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<magentoCLI command="config:set payment/checkmo/allowspecific" arguments="1" stepKey="setAllowSpecificCountiesValue" /> | ||
<magentoCLI command="config:set payment/checkmo/specificcountry" arguments="GB" stepKey="setSpecificCountryValue" /> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/> | ||
<magentoCLI command="config:set payment/checkmo/allowspecific" arguments="0" stepKey="unsetAllowSpecificCountiesValue"/> | ||
<magentoCLI command="config:set payment/checkmo/specificcountry" arguments="''" stepKey="unsetSpecificCountryValue" /> | ||
</after> | ||
|
||
<!-- Add product to cart --> | ||
<amOnPage url="{{StorefrontProductPage.url($$createProduct.sku$$)}}" stepKey="goToProductPage"/> | ||
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addProductToCart"> | ||
<argument name="productName" value="$$createProduct.name$$"/> | ||
</actionGroup> | ||
<!-- Go to checkout page --> | ||
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart" /> | ||
|
||
<!-- Fill US Address and verify that no payment available --> | ||
<seeElement selector="{{CheckoutShippingSection.isShippingStep}}" stepKey="shippingStepIsOpened"/> | ||
<actionGroup ref="GuestCheckoutFillingShippingSectionWithoutPaymentsActionGroup" stepKey="guestCheckoutFillingShippingSection"> | ||
<argument name="customerVar" value="Simple_US_Customer"/> | ||
<argument name="customerAddressVar" value="US_Address_TX"/> | ||
<argument name="shippingMethod" value="Flat Rate" type="string"/> | ||
</actionGroup> | ||
|
||
<waitForElementVisible selector="{{CheckoutPaymentSection.noPaymentMethods}}" stepKey="waitMessage"/> | ||
<see userInput="No Payment method available." stepKey="checkMessage"/> | ||
|
||
<!-- Fill UK Address and verify that payment available and checkout successful --> | ||
<click selector="{{CheckoutHeaderSection.shippingMethodStep}}" stepKey="goToShipping" /> | ||
<waitForElementVisible selector="{{CheckoutShippingSection.isShippingStep}}" stepKey="shippingStepIsOpened1"/> | ||
|
||
<actionGroup ref="GuestCheckoutFillingShippingSectionWithoutRegionActionGroup" stepKey="guestCheckoutFillingShippingSectionUK"> | ||
<argument name="customerVar" value="Simple_US_Customer" /> | ||
<argument name="customerAddressVar" value="UK_Default_Address" /> | ||
<argument name="shippingMethod" value="Flat Rate" type="string"/> | ||
</actionGroup> | ||
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrderPayment" /> | ||
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="guestPlaceOrder"> | ||
<argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage" /> | ||
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" /> | ||
</actionGroup> | ||
</test> | ||
</tests> |
Oops, something went wrong.