Skip to content

Commit 65cf71b

Browse files
author
rani-webkul
committed
Merge branch '2.3-develop' of https://github.com/magento/magento2 into 23971
2 parents 1cf1389 + e67ce21 commit 65cf71b

File tree

1,248 files changed

+38434
-3885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,248 files changed

+38434
-3885
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminSystemMessagesSection">
12+
<element name="systemMessagesDropdown" type="button" selector="#system_messages .message-system-action-dropdown"/>
13+
<element name="actionMessageLog" type="button" selector="//*[contains(@class, 'message-system-summary')]/a[contains(text(), '{{textMessage}}')]" parameterized="true"/>
14+
</section>
15+
</sections>

app/code/Magento/AdvancedSearch/etc/adminhtml/system.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
</field>
5656
<field id="search_suggestion_count" translate="label" type="text" sortOrder="91" showInDefault="1" showInWebsite="1" showInStore="1">
5757
<label>Search Suggestions Count</label>
58+
<validate>validate-digits validate-zero-or-greater</validate>
5859
<depends>
5960
<field id="search_suggestion_enabled">1</field>
6061
</depends>

app/code/Magento/Authorizenet/etc/adminhtml/system.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@
8585
</field>
8686
<field id="min_order_total" translate="label" type="text" sortOrder="190" showInDefault="1" showInWebsite="1" showInStore="0">
8787
<label>Minimum Order Total</label>
88+
<validate>validate-number validate-zero-or-greater</validate>
8889
</field>
8990
<field id="max_order_total" translate="label" type="text" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="0">
9091
<label>Maximum Order Total</label>
92+
<validate>validate-number validate-zero-or-greater</validate>
9193
</field>
9294
<field id="sort_order" translate="label" type="text" sortOrder="210" showInDefault="1" showInWebsite="1" showInStore="0">
9395
<label>Sort Order</label>

app/code/Magento/AuthorizenetAcceptjs/Test/Mftf/ActionGroup/ConfigureAuthorizenetAcceptjsActionGroup.xml

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,53 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8+
89
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
910
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10-
<actionGroup name="ConfigureAuthorizenetAcceptjs">
11+
<actionGroup name="ConfigureAuthorizenetAcceptjs" extends="EnableAuthorizenetAcceptjs">
12+
<annotations>
13+
<description>Sets up the Authorize.net Accept JS configuration setting with a specified Payment action.</description>
14+
</annotations>
1115
<arguments>
1216
<argument name="paymentAction" type="string"/>
1317
</arguments>
14-
<!-- Navigate to configuration -->
15-
<waitForPageLoad stepKey="waitForStores"/>
16-
<click stepKey="clickOnStores" selector="{{AdminMenuSection.stores}}"/>
17-
<waitForPageLoad stepKey="waitForConfiguration"/>
18-
<click stepKey="clickOnConfiguration" selector="{{StoresSubmenuSection.configuration}}"/>
19-
<waitForPageLoad stepKey="waitForSales"/>
20-
<waitForElementVisible stepKey="waitForVisibleHack" selector="{{AdminMenuSection.currencySetup}}"/>
21-
<scrollTo stepKey="scrollToSales" selector="{{StoresConfigurationListSection.sales}}"/>
22-
<click stepKey="clickOnSales" selector="{{StoresConfigurationListSection.sales}}" />
23-
<waitForPageLoad stepKey="waitForPaymentMethods"/>
24-
<click stepKey="clickOnPaymentMethods" selector="{{StoresConfigurationListSection.salesPaymentMethods}}" />
25-
<waitForPageLoad stepKey="waitForOpenConfiguration"/>
26-
<scrollTo stepKey="scrollToOpenConfig" selector="{{AuthorizenetAcceptjsConfigurationSection.openSectionToggle}}"/>
27-
<conditionalClick stepKey="openConfiguration" selector="{{AuthorizenetAcceptjsConfigurationSection.openSectionToggle}}" dependentSelector="{{AuthorizenetAcceptjsConfigurationSection.alreadyOpenSectionToggle}}" visible="false"/>
28-
2918
<!-- Fill Auth.net fields and save -->
30-
<waitForPageLoad stepKey="waitToFillApiLogin"/>
19+
<waitForElementVisible selector="{{AuthorizenetAcceptjsConfigurationSection.paymentActionCheckbox}}" stepKey="waitForFormVisible"/>
3120
<conditionalClick selector="{{AuthorizenetAcceptjsConfigurationSection.paymentActionCheckbox}}" stepKey="uncheckPaymentActionDefault" dependentSelector="{{AuthorizenetAcceptjsConfigurationSection.paymentActionSelectDisabled}}" visible="true"/>
3221
<selectOption selector="{{AuthorizenetAcceptjsConfigurationSection.paymentActionSelect}}" stepKey="selectPaymentAction" userInput="{{paymentAction}}"/>
33-
<scrollTo stepKey="scrollToApiLoginId" selector="{{AuthorizenetAcceptjsConfigurationSection.apiLoginIdField}}"/>
34-
<fillField stepKey="fillApiLoginId" selector="{{AuthorizenetAcceptjsConfigurationSection.apiLoginIdField}}" userInput="{{_CREDS.authorizenet_acceptjs_api_login_id}}"/>
35-
<fillField stepKey="fillTransactionKey" selector="{{AuthorizenetAcceptjsConfigurationSection.transactionKeyField}}" userInput="{{_CREDS.authorizenet_acceptjs_transaction_key}}"/>
36-
<fillField stepKey="fillPublicClientKey" selector="{{AuthorizenetAcceptjsConfigurationSection.publicClientKeyField}}" userInput="{{_CREDS.authorizenet_acceptjs_public_client_key}}"/>
37-
<fillField stepKey="fillSignatureKey" selector="{{AuthorizenetAcceptjsConfigurationSection.signatureKeyField}}" userInput="{{_CREDS.authorizenet_acceptjs_signature_key}}"/>
38-
<uncheckOption stepKey="uncheckCheckbox" selector="{{AuthorizenetAcceptjsConfigurationSection.enabledDefaultCheckbox}}"/>
39-
<selectOption stepKey="fillExpYear" selector="{{AuthorizenetAcceptjsConfigurationSection.enabledDefaultSelect}}" userInput="Yes"/>
40-
<click stepKey="clickOnSave" selector="{{ConfigurationMainActionsSection.save}}" />
22+
<scrollTo selector="{{AuthorizenetAcceptjsConfigurationSection.apiLoginIdField}}" stepKey="scrollToApiLoginId"/>
23+
<fillField selector="{{AuthorizenetAcceptjsConfigurationSection.apiLoginIdField}}" userInput="{{_CREDS.authorizenet_acceptjs_api_login_id}}" stepKey="fillApiLoginId"/>
24+
<fillField selector="{{AuthorizenetAcceptjsConfigurationSection.transactionKeyField}}" userInput="{{_CREDS.authorizenet_acceptjs_transaction_key}}" stepKey="fillTransactionKey"/>
25+
<fillField selector="{{AuthorizenetAcceptjsConfigurationSection.publicClientKeyField}}" userInput="{{_CREDS.authorizenet_acceptjs_public_client_key}}" stepKey="fillPublicClientKey"/>
26+
<fillField selector="{{AuthorizenetAcceptjsConfigurationSection.signatureKeyField}}" userInput="{{_CREDS.authorizenet_acceptjs_signature_key}}" stepKey="fillSignatureKey"/>
4127
</actionGroup>
4228

4329
<actionGroup name="DisableAuthorizenetAcceptjs">
30+
<annotations>
31+
<description>Disables the Authorize.net Accept JS configuration setting via the CLI.</description>
32+
</annotations>
33+
4434
<magentoCLI stepKey="disableAuthorizenetAcceptjs" command="config:set payment/authorizenet_acceptjs/active 0"/>
4535
</actionGroup>
36+
37+
<actionGroup name="EnableAuthorizenetAcceptjs">
38+
<scrollTo selector="{{AuthorizenetAcceptjsConfigurationSection.openSectionToggle}}" stepKey="scrollToAuthorizeNetConfigSection"/>
39+
<conditionalClick selector="{{AuthorizenetAcceptjsConfigurationSection.openSectionToggle}}" dependentSelector="{{AuthorizenetAcceptjsConfigurationSection.enabledDefaultSelect}}" visible="false" stepKey="openConfigSection"/>
40+
<waitForElementVisible selector="{{AuthorizenetAcceptjsConfigurationSection.enabledDefaultSelect}}" stepKey="waitForEnableFieldVisible"/>
41+
<uncheckOption selector="{{AuthorizenetAcceptjsConfigurationSection.enabledDefaultCheckbox}}" stepKey="uncheckCheckbox"/>
42+
<selectOption selector="{{AuthorizenetAcceptjsConfigurationSection.enabledDefaultSelect}}" userInput="Yes" stepKey="enablePayment"/>
43+
</actionGroup>
44+
45+
<actionGroup name="AssertAuthorizenetAcceptjsRequiredFieldsValidationIsPresentOnSave">
46+
<scrollToTopOfPage stepKey="scrollToTop"/>
47+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSave"/>
48+
<scrollTo selector="{{AuthorizenetAcceptjsConfigurationSection.apiLoginIdField}}" stepKey="scrollToApiLoginIdField"/>
49+
<see selector="{{AuthorizenetAcceptjsConfigurationSection.apiLoginIdField}} + {{AdminConfigSection.fieldError}}" userInput="This is a required field." stepKey="seeApiLoginIdRequiredMessage"/>
50+
<scrollTo selector="{{AuthorizenetAcceptjsConfigurationSection.publicClientKeyField}}" stepKey="scrollToPublicClientKeyField"/>
51+
<see selector="{{AuthorizenetAcceptjsConfigurationSection.publicClientKeyField}} + {{AdminConfigSection.fieldError}}" userInput="This is a required field." stepKey="seePublicClientKeyRequiredErrorMessage"/>
52+
<scrollTo selector="{{AuthorizenetAcceptjsConfigurationSection.transactionKeyField}}" stepKey="scrollTransactionKeyField"/>
53+
<see selector="{{AuthorizenetAcceptjsConfigurationSection.transactionKeyField}} + {{AdminConfigSection.fieldError}}" userInput="This is a required field." stepKey="seeTransactionKeyRequiredErrorMessage"/>
54+
<scrollTo selector="{{AuthorizenetAcceptjsConfigurationSection.signatureKeyField}}" stepKey="scrollToSignatureKeyField"/>
55+
<see selector="{{AuthorizenetAcceptjsConfigurationSection.signatureKeyField}} + {{AdminConfigSection.fieldError}}" userInput="This is a required field." stepKey="seeSignatureKeyRequiredErrorMessage"/>
56+
</actionGroup>
4657
</actionGroups>

app/code/Magento/AuthorizenetAcceptjs/Test/Mftf/ActionGroup/FillPaymentInformationActionGroup.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8+
89
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
910
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1011
<actionGroup name="FillPaymentInformation">
12+
<annotations>
13+
<description>Fill Payment Method with Authorize.net</description>
14+
</annotations>
15+
1116
<click stepKey="clickOnAuthorizenetToggle" selector="{{AuthorizenetCheckoutSection.selectAuthorizenet}}"/>
1217
<waitForPageLoad stepKey="waitForCardDataSection"/>
1318
<fillField stepKey="fillCardNumber" selector="{{AuthorizenetCheckoutSection.cardInput}}" userInput="{{PaymentAndShippingInfo.cardNumber}}"/>
@@ -18,12 +23,16 @@
1823
<waitForPageLoad stepKey="waitForCheckout"/>
1924
</actionGroup>
2025

21-
<!-- Guest checkout Authorizenet fill billing address -->
26+
<!-- Guest checkout Authorize.net fill billing address -->
2227
<actionGroup name="GuestCheckoutAuthorizenetFillBillingAddress">
28+
<annotations>
29+
<description>Fill Billing Address as Guest with Authorize.net</description>
30+
</annotations>
2331
<arguments>
2432
<argument name="customer"/>
2533
<argument name="customerAddress"/>
2634
</arguments>
35+
2736
<fillField selector="{{GuestAuthorizenetCheckoutSection.firstName}}" userInput="{{customer.firstName}}" stepKey="fillFirstName"/>
2837
<fillField selector="{{GuestAuthorizenetCheckoutSection.lastName}}" userInput="{{customer.lastName}}" stepKey="fillLastName"/>
2938
<fillField selector="{{GuestAuthorizenetCheckoutSection.street}}" userInput="{{customerAddress.street[0]}}" stepKey="fillStreet"/>

app/code/Magento/AuthorizenetAcceptjs/Test/Mftf/ActionGroup/ViewAndValidateOrderActionGroup.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8+
89
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
910
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1011
<actionGroup name="ViewAndValidateOrderActionGroup">
12+
<annotations>
13+
<description>Validate the Order is Correct. Then Submit the Invoice.</description>
14+
</annotations>
1115
<arguments>
1216
<argument name="amount" type="string"/>
1317
<argument name="status" type="string"/>
1418
<argument name="captureStatus" type="string"/>
1519
<argument name="closedStatus" type="string"/>
1620
</arguments>
21+
1722
<amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/>
1823
<click selector="{{AdminMenuSection.sales}}" stepKey="clickSales"/>
1924
<waitForPageLoad stepKey="waitForSalesSubsection"/>
@@ -39,13 +44,18 @@
3944
<see userInput="{{closedStatus}}" selector="{{ViewOrderSection.confirmClosed}}" stepKey="seeClosed"/>
4045
-->
4146
</actionGroup>
47+
4248
<actionGroup name="ViewAndValidateOrderActionGroupNoSubmit">
49+
<annotations>
50+
<description>Validate the Order is Correct. Do Not Submit the Invoice.</description>
51+
</annotations>
4352
<arguments>
4453
<argument name="amount" type="string"/>
4554
<argument name="status" type="string"/>
4655
<argument name="captureStatus" type="string"/>
4756
<argument name="closedStatus" type="string"/>
4857
</arguments>
58+
4959
<amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/>
5060
<click selector="{{AdminMenuSection.sales}}" stepKey="clickSales"/>
5161
<waitForPageLoad stepKey="waitForSalesSubsection"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="ConfigureAuthorizenetAcceptjsWithoutRequiredOptionsTest">
12+
<annotations>
13+
<stories value="Authorize.net Accept.js"/>
14+
<title value="Unable to configure Authorize.net Accept.js without required options"/>
15+
<description value="Unable to configure Authorize.net Accept.js without required options"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-17805"/>
18+
<useCaseId value="MC-17753"/>
19+
<group value="AuthorizenetAcceptjs"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
</before>
24+
<after>
25+
<actionGroup ref="logout" stepKey="logout"/>
26+
</after>
27+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
28+
<actionGroup ref="EnableAuthorizenetAcceptjs" stepKey="enableAuthorizenetAcceptjs"/>
29+
<actionGroup ref="AssertAuthorizenetAcceptjsRequiredFieldsValidationIsPresentOnSave" stepKey="assertErrorMessages"/>
30+
</test>
31+
</tests>

app/code/Magento/AuthorizenetAcceptjs/Test/Mftf/Test/FullCaptureAuthorizenetAcceptjsTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@
3131
</createData>
3232

3333
<!--Configure Auth.net-->
34+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
3435
<actionGroup ref="ConfigureAuthorizenetAcceptjs" stepKey="configureAuthorizenetAcceptjs">
3536
<argument name="paymentAction" value="Authorize Only"/>
3637
</actionGroup>
38+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/>
3739

3840
</before>
3941
<after>

app/code/Magento/AuthorizenetAcceptjs/Test/Mftf/Test/GuestCheckoutVirtualProductAuthorizenetAcceptjsTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@
3636
<actionGroup ref="saveProductForm" stepKey="saveProductForm"/>
3737

3838
<!--Configure Auth.net-->
39+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
3940
<actionGroup ref="ConfigureAuthorizenetAcceptjs" stepKey="configureAuthorizenetAcceptjs">
4041
<argument name="paymentAction" value="Authorize and Capture"/>
4142
</actionGroup>
43+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/>
4244

4345
</before>
4446
<after>

app/code/Magento/AuthorizenetAcceptjs/etc/adminhtml/system.xml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<group id="authorizenet_acceptjs_required"/>
1818
</requires>
1919
</field>
20-
<group id="required" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="5">
20+
<group id="required" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="15">
2121
<label>Basic Authorize.Net Settings</label>
2222
<attribute type="expanded">1</attribute>
2323
<frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
@@ -39,25 +39,44 @@
3939
<label>API Login ID</label>
4040
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
4141
<config_path>payment/authorizenet_acceptjs/login</config_path>
42+
<validate>required-entry</validate>
43+
<depends>
44+
<field id="*/authorizenet_acceptjs/active">1</field>
45+
</depends>
4246
</field>
4347
<field id="trans_key" translate="label" type="obscure" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0">
4448
<label>Transaction Key</label>
4549
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
4650
<config_path>payment/authorizenet_acceptjs/trans_key</config_path>
51+
<validate>required-entry</validate>
52+
<depends>
53+
<field id="*/authorizenet_acceptjs/active">1</field>
54+
</depends>
4755
</field>
4856
<field id="public_client_key" translate="label" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0">
4957
<label>Public Client Key</label>
5058
<config_path>payment/authorizenet_acceptjs/public_client_key</config_path>
59+
<validate>required-entry</validate>
60+
<depends>
61+
<field id="*/authorizenet_acceptjs/active">1</field>
62+
</depends>
5163
</field>
5264
<field id="trans_signature_key" translate="label" type="obscure" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0">
5365
<label>Signature Key</label>
5466
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
5567
<config_path>payment/authorizenet_acceptjs/trans_signature_key</config_path>
68+
<validate>required-entry</validate>
69+
<depends>
70+
<field id="*/authorizenet_acceptjs/active">1</field>
71+
</depends>
5672
</field>
5773
<field id="trans_md5" translate="label" type="obscure" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0">
5874
<label>Merchant MD5 (deprecated)</label>
5975
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
6076
<config_path>payment/authorizenet_acceptjs/trans_md5</config_path>
77+
<depends>
78+
<field id="*/authorizenet_acceptjs/active">1</field>
79+
</depends>
6180
</field>
6281
</group>
6382
<group id="advanced" translate="label" showInDefault="1" showInWebsite="1" showInStore="0" sortOrder="20">
@@ -101,10 +120,12 @@
101120
<field id="min_order_total" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0">
102121
<label>Minimum Order Total</label>
103122
<config_path>payment/authorizenet_acceptjs/min_order_total</config_path>
123+
<validate>validate-number validate-zero-or-greater</validate>
104124
</field>
105125
<field id="max_order_total" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0">
106126
<label>Maximum Order Total</label>
107127
<config_path>payment/authorizenet_acceptjs/max_order_total</config_path>
128+
<validate>validate-number validate-zero-or-greater</validate>
108129
</field>
109130
<field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0">
110131
<label>Sort Order</label>

0 commit comments

Comments
 (0)