Skip to content

Commit 0479cf9

Browse files
[Magento Community Engineering] Community Contributions - 2.3-develop
- merged latest code from mainline branch
2 parents d9193aa + d574dce commit 0479cf9

16 files changed

+474
-204
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="AssertStorefrontCheckoutSuccessActionGroup">
12+
<annotations>
13+
<description>Verifies if the order is placed successfully on the 'one page checkout' page.</description>
14+
</annotations>
15+
<waitForElement selector="{{CheckoutSuccessMainSection.successTitle}}" stepKey="waitForLoadSuccessPageTitle"/>
16+
<waitForElement selector="{{CheckoutSuccessMainSection.success}}" time="30" stepKey="waitForLoadSuccessPage"/>
17+
<seeElement selector="{{CheckoutSuccessMainSection.orderLink}}" stepKey="seeOrderLink"/>
18+
</actionGroup>
19+
</actionGroups>
20+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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="AdminAddImageToCMSBlockContent">
11+
<arguments>
12+
<argument name="image" type="entity" defaultValue="MagentoLogo"/>
13+
</arguments>
14+
<click selector="{{TinyMCESection.InsertImage}}" stepKey="clickAddImageButton"/>
15+
<waitForElementVisible selector="{{MediaGallerySection.Browse}}" stepKey="waitForBrowseImage"/>
16+
<click selector="{{MediaGallerySection.Browse}}" stepKey="clickBrowseImage"/>
17+
<waitForElementVisible selector="{{MediaGallerySection.StorageRootArrow}}" stepKey="waitForAttacheFiles"/>
18+
<waitForLoadingMaskToDisappear stepKey="waitForStorageRootLoadingMaskDisappear"/>
19+
<click selector="{{MediaGallerySection.StorageRootArrow}}" stepKey="clickRoot"/>
20+
<waitForPageLoad stepKey="waitForPageLoad"/>
21+
<attachFile selector="{{MediaGallerySection.BrowseUploadImage}}" userInput="{{image.file}}" stepKey="attachLogo"/>
22+
<waitForElementVisible selector="{{MediaGallerySection.InsertFile}}" stepKey="waitForAddSelected"/>
23+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear"/>
24+
<click selector="{{MediaGallerySection.InsertFile}}" stepKey="clickAddSelected"/>
25+
<waitForElementVisible selector="{{MediaGallerySection.OkBtn}}" stepKey="waitForOkButton"/>
26+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear2"/>
27+
<click selector="{{MediaGallerySection.OkBtn}}" stepKey="clickOk"/>
28+
</actionGroup>
29+
</actionGroups>

app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockActionsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
</section>
2525
<section name="BlockContentSection">
2626
<element name="TextArea" type="input" selector="#cms_block_form_content"/>
27+
<element name="image" type="file" selector="#tinymce img"/>
28+
<element name="contentIframe" type="iframe" selector="cms_block_form_content_ifr"/>
2729
</section>
2830
<section name="CmsBlockBlockActionSection">
2931
<element name="deleteBlock" type="button" selector="#delete" timeout="30"/>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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="AdminMediaGalleryPopupUploadImagesWithoutErrorTest">
11+
<annotations>
12+
<features value="Cms"/>
13+
<stories value="Spinner is Always Displayed on Media Gallery popup"/>
14+
<title value="Media Gallery popup upload images without error"/>
15+
<description value="Media Gallery popup upload images without error"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-18962"/>
18+
<useCaseId value="MC-18709"/>
19+
<group value="Cms"/>
20+
</annotations>
21+
<before>
22+
<!--Enable WYSIWYG options-->
23+
<comment userInput="Enable WYSIWYG options" stepKey="commentEnableWYSIWYG"/>
24+
<magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYGEditor"/>
25+
<magentoCLI command="config:set cms/wysiwyg/editor 'TinyMCE 4'" stepKey="setValueWYSIWYGEditor"/>
26+
<!--Create block-->
27+
<comment userInput="Create block" stepKey="commentCreateBlock"/>
28+
<createData entity="Sales25offBlock" stepKey="createBlock"/>
29+
<actionGroup ref="LoginActionGroup" stepKey="login"/>
30+
</before>
31+
<after>
32+
<!--Disable WYSIWYG options-->
33+
<comment userInput="Disable WYSIWYG options" stepKey="commentDisableWYSIWYG"/>
34+
<magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/>
35+
<deleteData createDataKey="createBlock" stepKey="deleteBlock" />
36+
<actionGroup ref="logout" stepKey="logout"/>
37+
</after>
38+
<!--Open created block page and add image-->
39+
<comment userInput="Open create block page and add image" stepKey="commentOpenBlockPage"/>
40+
<actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage1">
41+
<argument name="CMSBlockPage" value="$$createBlock$$"/>
42+
</actionGroup>
43+
<actionGroup ref="AdminAddImageToCMSBlockContent" stepKey="addImage">
44+
<argument name="image" value="TestImageNew"/>
45+
</actionGroup>
46+
<click selector="{{BlockWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtnFirstTime"/>
47+
<click selector="{{BlockWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtnSecondTime"/>
48+
<waitForPageLoad stepKey="waitForPageLoad"/>
49+
<!--Switch to content frame and click on image-->
50+
<comment userInput="Switch to content frame and click on image" stepKey="commentSwitchToIframe"/>
51+
<switchToIFrame selector="{{BlockContentSection.contentIframe}}" stepKey="switchToContentFrame"/>
52+
<click selector="{{BlockContentSection.image}}" stepKey="clickImage"/>
53+
<switchToIFrame stepKey="switchBack"/>
54+
<!--Add image second time and assert-->
55+
<comment userInput="Add image second time and assert" stepKey="commentAddImageAndAssert"/>
56+
<actionGroup ref="AdminAddImageToCMSBlockContent" stepKey="addImageSecondTime">
57+
<argument name="image" value="MagentoLogo"/>
58+
</actionGroup>
59+
<switchToIFrame selector="{{BlockContentSection.contentIframe}}" stepKey="switchToContentFrameSecondTime"/>
60+
<seeElement selector="{{BlockContentSection.image}}" stepKey="seeImageElement"/>
61+
</test>
62+
</tests>

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

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,31 @@
1616
<argument name="credentials" defaultValue="_CREDS"/>
1717
<argument name="countryCode" type="string" defaultValue="us"/>
1818
</arguments>
19-
19+
20+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
21+
<waitForPageLoad stepKey="waitForPageLoad1"/>
22+
<click selector="{{PayPalExpressCheckoutConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalConfigureBtn"/>
23+
<waitForElementVisible selector="{{PayPalAdvancedSettingConfigSection.advancedSettingTab(countryCode)}}" stepKey="waitForAdvancedSettingTab"/>
24+
<fillField selector ="{{PayPalExpressCheckoutConfigSection.email(countryCode)}}" userInput="{{credentials.magento/paypal_express_checkout_us_business_account}}" stepKey="inputEmailAssociatedWithPayPalMerchantAccount"/>
25+
<selectOption selector ="{{PayPalExpressCheckoutConfigSection.apiMethod(countryCode)}}" userInput="API Signature" stepKey="inputAPIAuthenticationMethods"/>
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"/>
29+
<selectOption selector ="{{PayPalExpressCheckoutConfigSection.sandboxMode(countryCode)}}" userInput="Yes" stepKey="enableSandboxMode"/>
30+
<selectOption selector="{{PayPalExpressCheckoutConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/>
31+
<fillField selector ="{{PayPalExpressCheckoutConfigSection.merchantID(countryCode)}}" userInput="{{credentials.magento/paypal_express_checkout_us_merchant_id}}" stepKey="inputMerchantID"/>
32+
<!--Save configuration-->
33+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
34+
</actionGroup>
35+
36+
<actionGroup name="SampleConfigPayPalExpressCheckout">
37+
<annotations>
38+
<description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal credentials and other details. Clicks on Save.</description>
39+
</annotations>
40+
<arguments>
41+
<argument name="credentials" defaultValue="SamplePaypalExpressConfig"/>
42+
<argument name="countryCode" type="string" defaultValue="us"/>
43+
</arguments>
2044
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
2145
<waitForPageLoad stepKey="waitForPageLoad1"/>
2246
<click selector="{{PayPalExpressCheckoutConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalConfigureBtn"/>
@@ -29,50 +53,52 @@
2953
<selectOption selector ="{{PayPalExpressCheckoutConfigSection.sandboxMode(countryCode)}}" userInput="Yes" stepKey="enableSandboxMode"/>
3054
<selectOption selector="{{PayPalExpressCheckoutConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/>
3155
<fillField selector ="{{PayPalExpressCheckoutConfigSection.merchantID(countryCode)}}" userInput="{{credentials.paypal_express_merchantID}}" stepKey="inputMerchantID"/>
32-
3356
<!--Save configuration-->
3457
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
3558
</actionGroup>
36-
59+
3760
<actionGroup name="CreatePayPalOrderWithSelectedPaymentMethodActionGroup" extends="CreateOrderToPrintPageActionGroup">
3861
<annotations>
3962
<description>EXTENDS: CreateOrderToPrintPageActionGroup. Clicks on PayPal. Fills the PayPay details in the modal. PLEASE NOTE: The PayPal Payment credentials are Hardcoded using 'Payer'.</description>
4063
</annotations>
41-
64+
<arguments>
65+
<argument name="payerName" defaultValue="MPI" type="string"/>
66+
<argument name="credentials" defaultValue="_CREDS"/>
67+
</arguments>
68+
69+
<!-- click on PayPal payment radio button -->
4270
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPlaceOrderButton"/>
4371
<click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="clickPlaceOrder"/>
44-
72+
4573
<!--set ID for iframe of PayPal group button-->
4674
<executeJS function="jQuery('.zoid-component-frame.zoid-visible').attr('id', 'myIframe')" stepKey="clickOrderLink"/>
47-
75+
4876
<!--switch to iframe of PayPal group button-->
49-
<comment userInput="switch to iframe of PayPal group button" stepKey="commentSwitchToIframe"/>
5077
<switchToIFrame userInput="myIframe" stepKey="clickPrintOrderLink"/>
5178
<waitForElementVisible selector="{{CheckoutPaymentSection.PayPalBtn}}" stepKey="waitForPayPalBtn"/>
5279
<click selector="{{CheckoutPaymentSection.PayPalBtn}}" stepKey="clickPayPalBtn"/>
5380
<switchToIFrame stepKey="switchBack1"/>
54-
81+
5582
<!--Check in-context-->
56-
<comment userInput="Check in-context" stepKey="commentVerifyInContext"/>
5783
<switchToNextTab stepKey="switchToInContentTab"/>
5884
<waitForPageLoad stepKey="waitForPageLoad"/>
5985
<seeCurrentUrlMatches regex="~\//www.sandbox.paypal.com/~" stepKey="seeCurrentUrlMatchesConfigPath1"/>
60-
<waitForElement selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm"/>
61-
<fillField selector="{{PayPalPaymentSection.email}}" userInput="{{Payer.buyerEmail}}" stepKey="fillEmail"/>
62-
<fillField selector="{{PayPalPaymentSection.password}}" userInput="{{Payer.buyerPassword}}" stepKey="fillPassword"/>
86+
<waitForElement selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm" />
87+
<fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/paypal_sandbox_login_email}}" stepKey="fillEmail"/>
88+
<fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/paypal_sandbox_login_password}}" stepKey="fillPassword"/>
6389
<click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="login"/>
6490
<waitForPageLoad stepKey="wait"/>
65-
<seeElement selector="{{PayPalPaymentSection.reviewUserInfo}}" stepKey="seePayerName"/>
91+
<see userInput="{{payerName}}" selector="{{PayPalPaymentSection.reviewUserInfo}}" stepKey="seePayerName"/>
6692
</actionGroup>
67-
93+
6894
<actionGroup name="addProductToCheckoutPage">
6995
<annotations>
7096
<description>Goes to the provided Category page on the Storefront. Adds the 1st Product to the Cart. Goes to Checkout. Select the Shipping Method. Selects PayPal as the Payment Method.</description>
7197
</annotations>
7298
<arguments>
7399
<argument name="Category"/>
74100
</arguments>
75-
101+
76102
<amOnPage url="{{StorefrontCategoryPage.url(Category.name)}}" stepKey="onCategoryPage"/>
77103
<waitForPageLoad stepKey="waitForPageLoad1"/>
78104
<moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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="StorefrontPayOrderOnPayPalCheckoutActionGroup">
12+
<annotations>
13+
<description>Verifies product name on Paypal cart and clicks 'Pay Now' on PayPal payment checkout page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName" type="string"/>
17+
</arguments>
18+
<click selector="{{PayPalPaymentSection.cartIcon}}" stepKey="openCart"/>
19+
<seeElement selector="{{PayPalPaymentSection.itemName(productName)}}" stepKey="seeProductName"/>
20+
<click selector="{{PayPalPaymentSection.PayPalSubmitBtn}}" stepKey="clickPayPalSubmitBtn"/>
21+
<switchToPreviousTab stepKey="switchToPreviousTab"/>
22+
<waitForPageLoad stepKey="waitForPageLoad"/>
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="StorefrontPaypalEnableConfigData">
12+
<data key="path">payment/paypal_express/active</data>
13+
<data key="scope_id">1</data>
14+
<data key="label">Yes</data>
15+
<data key="value">1</data>
16+
</entity>
17+
<entity name="StorefrontPaypalDisableConfigData">
18+
<data key="path">payment/paypal_express/active</data>
19+
<data key="scope_id">1</data>
20+
<data key="label">No</data>
21+
<data key="value">0</data>
22+
</entity>
23+
<entity name="StorefrontPaypalMerchantAccountIdConfigData">
24+
<data key="path">payment/paypal_express/merchant_id</data>
25+
<data key="scope_id">1</data>
26+
<data key="value">''</data>
27+
</entity>
28+
<entity name="StorefrontPaypalEnableSkipOrderReviewStepConfigData">
29+
<data key="path">payment/paypal_express/skip_order_review_step</data>
30+
<data key="scope_id">1</data>
31+
<data key="label">Yes</data>
32+
<data key="value">1</data>
33+
</entity>
34+
<entity name="StorefrontPaypalDisableSkipOrderReviewStepConfigData">
35+
<data key="path">payment/paypal_express/skip_order_review_step</data>
36+
<data key="scope_id">1</data>
37+
<data key="label">No</data>
38+
<data key="value">0</data>
39+
</entity>
40+
<entity name="StorefrontPaypalEnableInContextCheckoutConfigData">
41+
<data key="path">payment/paypal_express/in_context</data>
42+
<data key="scope_id">1</data>
43+
<data key="label">Yes</data>
44+
<data key="value">1</data>
45+
</entity>
46+
<entity name="StorefrontPaypalDisableInContextCheckoutConfigData">
47+
<data key="path">payment/paypal_express/active</data>
48+
<data key="scope_id">1</data>
49+
<data key="label">No</data>
50+
<data key="value">0</data>
51+
</entity>
52+
</entities>

app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,37 @@
9999
<data key="paypal_express_api_signature">someApiSignature</data>
100100
<data key="paypal_express_merchantID">someMerchantId</data>
101101
</entity>
102+
<entity name="PaypalConfig" type="paypal_config_state">
103+
<requiredEntity type="business_account">BusinessAccount</requiredEntity>
104+
<requiredEntity type="api_username">ApiUsername</requiredEntity>
105+
<requiredEntity type="api_password">ApiPassword</requiredEntity>
106+
<requiredEntity type="api_signature">ApiSignature</requiredEntity>
107+
<requiredEntity type="api_authentication">ApiAuthentication</requiredEntity>
108+
<requiredEntity type="sandbox_flag">SandboxFlag</requiredEntity>
109+
<requiredEntity type="use_proxy">UseProxy</requiredEntity>
110+
</entity>
111+
<entity name="BusinessAccount" type="business_account">
112+
<data key="value">{{_CREDS.magento/paypal_express_checkout_us_business_account}}</data>
113+
</entity>
114+
<entity name="ApiUsername" type="api_username">
115+
<data key="value">{{_CREDS.magento/paypal_express_checkout_us_api_username}}</data>
116+
</entity>
117+
<entity name="ApiPassword" type="api_password">
118+
<data key="value">{{_CREDS.magento/paypal_express_checkout_us_api_password}}</data>
119+
</entity>
120+
<entity name="ApiSignature" type="api_signature">
121+
<data key="value">{{_CREDS.magento/paypal_express_checkout_us_api_signature}}</data>
122+
</entity>
123+
<entity name="ApiAuthentication" type="api_authentication">
124+
<data key="value">0</data>
125+
</entity>
126+
<entity name="SandboxFlag" type="sandbox_flag">
127+
<data key="value">1</data>
128+
</entity>
129+
<entity name="UseProxy" type="use_proxy">
130+
<data key="value">0</data>
131+
</entity>
132+
<entity name="Payer">
133+
<data key="firstName">Alex</data>
134+
</entity>
102135
</entities>

app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<element name="email" type="input" selector="//input[contains(@name, 'email') and not(contains(@style, 'display:none'))]"/>
5858
<element name="password" type="input" selector="//input[contains(@name, 'password') and not(contains(@style, 'display:none'))]"/>
5959
<element name="loginBtn" type="input" selector="button#btnLogin"/>
60-
<element name="reviewUserInfo" type="text" selector="//p[@id='reviewUserInfo' and contains(text(),'Hi, MPI!')]"/>
60+
<element name="reviewUserInfo" type="text" selector="#reviewUserInfo"/>
6161
<element name="cartIcon" type="text" selector="#transactionCart"/>
6262
<element name="itemName" type="text" selector="//span[@title='{{productName}}']" parameterized="true"/>
6363
<element name="PayPalSubmitBtn" type="text" selector="//input[@type='submit']"/>

0 commit comments

Comments
 (0)