Skip to content

Commit 8cc4f76

Browse files
committed
MQE-1686: Paypal integration test leveraging Adobe Vault - PayPalSmartButtonInCheckoutPage
fixed review comments
1 parent 2f27966 commit 8cc4f76

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

app/code/Magento/Checkout/Test/Mftf/ActionGroup/VerifyCheckoutSuccessActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="VerifyCheckoutSuccessActionGroup">
1212
<annotations>
13-
<description>Goes to the checkout one page success page and verifies if theorder is placed successfully.</description>
13+
<description>Verifies if the order is placed successfully on the 'one page checkout' page.</description>
1414
</annotations>
1515
<waitForElement selector="{{CheckoutSuccessMainSection.successTitle}}" stepKey="waitForLoadSuccessPageTitle"/>
1616
<waitForElement selector="{{CheckoutSuccessMainSection.success}}" time="30" stepKey="waitForLoadSuccessPage"/>

app/code/Magento/Paypal/Test/Mftf/ActionGroup/PayOrderOnPayPalCheckoutActionGroup.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="PayOrderOnPayPalCheckoutActionGroup">
1212
<annotations>
13-
<description>Goes to PayPal payment checkout page, confirms product name and clicks 'Pay Now'.</description>
13+
<description>Verifies product name on Paypal cart and clicks 'Pay Now' on PayPal payment checkout page.</description>
1414
</annotations>
15+
<arguments>
16+
<argument name="productName" type="string"/>
17+
</arguments>
1518
<click selector="{{PayPalPaymentSection.cartIcon}}" stepKey="openCart"/>
16-
<seeElement selector="{{PayPalPaymentSection.itemName($$createProduct.name$$)}}" stepKey="seeProductname"/>
19+
<seeElement selector="{{PayPalPaymentSection.itemName(productName)}}" stepKey="seeProductName"/>
1720
<click selector="{{PayPalPaymentSection.PayPalSubmitBtn}}" stepKey="clickPayPalSubmitBtn"/>
1821
<switchToPreviousTab stepKey="switchToPreviousTab"/>
1922
<waitForPageLoad stepKey="waitForPageLoad"/>

app/code/Magento/Paypal/Test/Mftf/ActionGroup/PayPalExpressCheckoutConfigurationActionGroup.xml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
<waitForPageLoad stepKey="waitForPageLoad1"/>
2222
<click selector="{{PayPalExpressCheckoutConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalConfigureBtn"/>
2323
<waitForElementVisible selector="{{PayPalAdvancedSettingConfigSection.advancedSettingTab(countryCode)}}" stepKey="waitForAdvancedSettingTab"/>
24-
<fillField selector ="{{PayPalExpressCheckoutConfigSection.email(countryCode)}}" userInput="{{_CREDS.magento/paypal_express_checkout_us_business_account}}" stepKey="inputEmailAssociatedWithPayPalMerchantAccount"/>
24+
<fillField selector ="{{PayPalExpressCheckoutConfigSection.email(countryCode)}}" userInput="{{credentials.magento/paypal_express_checkout_us_business_account}}" stepKey="inputEmailAssociatedWithPayPalMerchantAccount"/>
2525
<selectOption selector ="{{PayPalExpressCheckoutConfigSection.apiMethod(countryCode)}}" userInput="API Signature" stepKey="inputAPIAuthenticationMethods"/>
26-
<fillField selector ="{{PayPalExpressCheckoutConfigSection.username(countryCode)}}" userInput="{{_CREDS.magento/paypal_express_checkout_us_api_username}}" stepKey="inputAPIUsername"/>
27-
<fillField selector ="{{PayPalExpressCheckoutConfigSection.password(countryCode)}}" userInput="{{_CREDS.magento/paypal_express_checkout_us_api_password}}" stepKey="inputAPIPassword"/>
28-
<fillField selector ="{{PayPalExpressCheckoutConfigSection.signature(countryCode)}}" userInput="{{_CREDS.magento/paypal_express_checkout_us_api_signature}}" stepKey="inputAPISignature"/>
26+
<fillField selector ="{{PayPalExpressCheckoutConfigSection.username(countryCode)}}" userInput="{{credentials.magento/paypal_express_checkout_us_api_username}}" stepKey="inputAPIUsername"/>
27+
<fillField selector ="{{PayPalExpressCheckoutConfigSection.password(countryCode)}}" userInput="{{credentials.magento/paypal_express_checkout_us_api_password}}" stepKey="inputAPIPassword"/>
28+
<fillField selector ="{{PayPalExpressCheckoutConfigSection.signature(countryCode)}}" userInput="{{credentials.magento/paypal_express_checkout_us_api_signature}}" stepKey="inputAPISignature"/>
2929
<selectOption selector ="{{PayPalExpressCheckoutConfigSection.sandboxMode(countryCode)}}" userInput="Yes" stepKey="enableSandboxMode"/>
3030
<selectOption selector="{{PayPalExpressCheckoutConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/>
31-
<fillField selector ="{{PayPalExpressCheckoutConfigSection.merchantID(countryCode)}}" userInput="{{_CREDS.magento/paypal_express_checkout_us_merchant_id}}" stepKey="inputMerchantID"/>
31+
<fillField selector ="{{PayPalExpressCheckoutConfigSection.merchantID(countryCode)}}" userInput="{{credentials.magento/paypal_express_checkout_us_merchant_id}}" stepKey="inputMerchantID"/>
3232
<!--Save configuration-->
3333
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
3434
</actionGroup>
@@ -39,7 +39,10 @@
3939
</annotations>
4040
<arguments>
4141
<argument name="payerName" defaultValue="MPI" type="string"/>
42+
<argument name="credentials" defaultValue="_CREDS"/>
4243
</arguments>
44+
45+
<!-- click on PayPal payment radio button -->
4346
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPlaceOrderButton"/>
4447
<click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="clickPlaceOrder"/>
4548

@@ -57,8 +60,8 @@
5760
<waitForPageLoad stepKey="waitForPageLoad"/>
5861
<seeCurrentUrlMatches regex="~\//www.sandbox.paypal.com/~" stepKey="seeCurrentUrlMatchesConfigPath1"/>
5962
<waitForElement selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm" />
60-
<fillField selector="{{PayPalPaymentSection.email}}" userInput="{{_CREDS.magento/paypal_sandbox_login_email}}" stepKey="fillEmail"/>
61-
<fillField selector="{{PayPalPaymentSection.password}}" userInput="{{_CREDS.magento/paypal_sandbox_login_password}}" stepKey="fillPassword"/>
63+
<fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/paypal_sandbox_login_email}}" stepKey="fillEmail"/>
64+
<fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/paypal_sandbox_login_password}}" stepKey="fillPassword"/>
6265
<click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="login"/>
6366
<waitForPageLoad stepKey="wait"/>
6467
<see userInput="{{payerName}}" selector="{{PayPalPaymentSection.reviewUserInfo}}" stepKey="seePayerName"/>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@
6767
</actionGroup>
6868

6969
<!-- PayPal checkout -->
70-
<actionGroup ref="PayOrderOnPayPalCheckoutActionGroup" stepKey="payOrderOnPayPalCheckout"/>
70+
<actionGroup ref="PayOrderOnPayPalCheckoutActionGroup" stepKey="payOrderOnPayPalCheckout">
71+
<argument name="productName" value="$$createProduct.name$$"/>
72+
</actionGroup>
7173

7274
<!-- I see order successful Page instead of Order Review Page -->
7375
<actionGroup ref="VerifyCheckoutSuccessActionGroup" stepKey="verifyCheckoutSuccess"/>

app/code/Magento/Sales/Test/Mftf/ActionGroup/CreateOrderToPrintPageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<arguments>
1616
<argument name="Category"/>
1717
</arguments>
18-
18+
1919
<amOnPage url="{{StorefrontCategoryPage.url(Category.name)}}" stepKey="onCategoryPage"/>
2020
<waitForPageLoad stepKey="waitForPageLoad1"/>
2121
<moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/>

0 commit comments

Comments
 (0)