Skip to content

Commit f735d02

Browse files
ACQE-6375 : Registered Checkout Using PayPal Smart Button and Flat Rate
Added gift card steps and added action group of gift card.
1 parent a68570f commit f735d02

File tree

3 files changed

+56
-2
lines changed

3 files changed

+56
-2
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="addGiftCardAmount">
11+
<arguments>
12+
<argument name="giftCardAmount"/>
13+
</arguments>
14+
<waitForPageLoad before="clickBodyToFixFocus" stepKey="waitForClickingBodyToFixFocus"/>
15+
</actionGroup>
16+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminFillGiftCardProductFieldsActionGroup">
12+
<arguments>
13+
<argument name="product" type="entity"/>
14+
</arguments>
15+
<waitForPageLoad before="fillGiftCardName" stepKey="waitForFillingGiftCardNameField"/>
16+
</actionGroup>
17+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/Test/RegisteredPaypalCheckoutWithFlatRatePaymentActionSaleTest.xml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
</createData>
3737
</before>
3838
<after>
39+
<actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteProduct">
40+
<argument name="sku" value="{{GiftCard.sku}}"/>
41+
</actionGroup>
3942
<magentoCLI command="config:set paypal/general/merchant_country US" stepKey="setMerchantCountry"/>
4043
<magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/>
4144
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer" />
@@ -50,11 +53,25 @@
5053
<actionGroup ref="GoToSpecifiedCreateProductPageActionGroup" stepKey="openProductFillForm">
5154
<argument name="productType" value="giftcard"/>
5255
</actionGroup>
53-
<!-- Save gift card product -->
56+
<!-- Fill gift card product values -->
57+
<actionGroup ref="AdminFillGiftCardProductFieldsActionGroup" stepKey="fillGiftCardProductFields">
58+
<argument name="product" value="GiftCard"/>
59+
</actionGroup>
60+
<!-- Add amount to gift card product -->
61+
<actionGroup ref="addGiftCardAmount" stepKey="addAmountToGiftCard">
62+
<argument name="giftCardAmount" value="GiftCard.amounts[0]"/>
63+
</actionGroup>
64+
<!-- Add gift card product to category -->
65+
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createCategory.name$$]" stepKey="fillCategory" after="addAmountToGiftCard"/>
66+
<!-- Save gift card product -->
5467
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
5568
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="signUpNewUser">
5669
<argument name="Customer" value="$$createCustomer$$"/>
5770
</actionGroup>
71+
<!-- Quick search gift card product -->
72+
<actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="quickSearchForGiftCardProduct">
73+
<argument name="phrase" value="GiftCard.sku"/>
74+
</actionGroup>
5875
<!-- Go to gift card product page on storefront -->
5976
<seeElement selector="{{StorefrontCategoryMainSection.productLink}}" stepKey="seeProductsInCategory"/>
6077
<waitForElementClickable selector="{{StorefrontCategoryMainSection.productLink}}" stepKey="waitForProductClickable"/>
@@ -110,5 +127,9 @@
110127
<!-- Check comment history -->
111128
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistory"/>
112129
<waitForText selector="{{AdminOrderCommentsTabSection.orderCommentsWithType('Captured amount')}}" userInput="Captured amount of $15.00 online. Transaction ID: &quot;{$grabLastTransactionIDForCaptured}&quot;" stepKey="seeOrderHistoryNotes"/>
113-
</test>
130+
<!-- Go to invoice tab and verify invoice is present-->
131+
<actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="clickInvoicesTabOrdersPage"/>
132+
<waitForElementVisible selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="waitForInvoicesTabOpenedOne"/>
133+
<seeElement selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="seeForInvoicesTabOpenedOne"/>
134+
</test>
114135
</tests>

0 commit comments

Comments
 (0)