Skip to content

Commit cc8fd81

Browse files
committed
Merge branch 'MC-36204' into MC-36428
2 parents e307571 + a639ad1 commit cc8fd81

File tree

12 files changed

+79
-19
lines changed

12 files changed

+79
-19
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="StorefrontGoToCustomerOrderDetailsPageActionGroup">
12+
<annotations>
13+
<description>Navigate to storefront order details page</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="orderId" type="string"/>
17+
<argument name="orderNumber" type="string"/>
18+
</arguments>
19+
<amOnPage url="{{StorefrontCustomerOrderViewPage.url(orderId)}}" stepKey="goToOrdersPage"/>
20+
<waitForPageLoad stepKey="waitForPageLoad"/>
21+
<waitForText selector="{{StorefrontCustomerAccountMainSection.pageTitle}}" userInput="{{orderNumber}}" stepKey="verifyOrderNo"/>
22+
</actionGroup>
23+
</actionGroups>
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontVerifyCustomerOrderDataActionGroup">
12+
<annotations>
13+
<description>Verify a customer's order details on the view order page on the storefront</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="createdDate" type="string"/>
17+
<argument name="productName" type="string"/>
18+
<argument name="grandTotal" type="string"/>
19+
<argument name="orderPlacedBy" type="string"/>
20+
<argument name="paymentMethod" type="string"/>
21+
</arguments>
22+
<waitForText selector="{{StorefrontCustomerOrderViewSection.paymentMethod}}" userInput="{{paymentMethod}}" stepKey="storefrontVerifyPaymentMethod"/>
23+
<waitForText selector="{{StorefrontCustomerOrderViewSection.createdDate}}" userInput="{{createdDate}}" stepKey="storefrontVerifyOrderCreatedDate"/>
24+
<waitForText selector="{{StorefrontCustomerOrderViewSection.orderPlacedBy}}" userInput="{{orderPlacedBy}}" stepKey="storefrontVerifyOrderPlacedBy"/>
25+
<waitForText selector="{{StorefrontCustomerOrderViewSection.productName}}" userInput="{{productName}}" stepKey="storefrontVerifyProductName"/>
26+
<waitForText selector="{{StorefrontCustomerOrderViewSection.grandTotal}}" userInput="{{grandTotal}}" stepKey="storefrontVerifyGrandTotal"/>
27+
28+
</actionGroup>
29+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerOrderViewSection.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@
1818
<element name="billingAddress" type="text" selector=".box.box-order-billing-address"/>
1919
<element name="orderStatusInGrid" type="text" selector="//td[contains(.,'{{orderId}}')]/../td[contains(.,'{{status}}')]" parameterized="true"/>
2020
<element name="pager" type="block" selector=".pager"/>
21+
<element name="createdDate" type="text" selector=".block-order-details-comments .comment-date"/>
22+
<element name="orderPlacedBy" type="text" selector=".block-order-details-comments .comment-content"/>
23+
<element name="productName" type="text" selector="//td[@data-th='Product Name']"/>
24+
<element name="grandTotal" type="text" selector="//tr[@class='grand_total']//td[@data-th='Grand Total']"/>
2125
</section>
2226
</sections>

app/code/Magento/Paypal/Model/AbstractConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ abstract class AbstractConfig implements ConfigInterface
5858
/**
5959
* @var string
6060
*/
61-
private static $bnCode = 'Magento_Cart_%s';
61+
private static $bnCode = 'Magento_2_%s';
6262

6363
/**
6464
* @var \Magento\Framework\App\Config\ScopeConfigInterface

app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
use PHPUnit\Framework\MockObject\MockObject;
1616
use PHPUnit\Framework\TestCase;
1717

18+
/**
19+
* Test for \Magento\Paypal\Model\AbstractConfig
20+
*/
1821
class AbstractConfigTest extends TestCase
1922
{
2023

@@ -353,7 +356,7 @@ public function testGetBuildNotationCode()
353356
$productMetadata
354357
);
355358

356-
self::assertEquals('Magento_Cart_SomeEdition', $this->config->getBuildNotationCode());
359+
self::assertEquals('Magento_2_SomeEdition', $this->config->getBuildNotationCode());
357360
}
358361

359362
/**

dev/tests/integration/testsuite/Magento/Paypal/Model/Api/NvpTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testRequestTotalsAndLineItemsWithFPT()
9595
. '&SHIPPINGAMT=0.00&ITEMAMT=112.70&TAXAMT=0.00'
9696
. '&L_NAME0=Simple+Product+FPT&L_QTY0=1&L_AMT0=100.00'
9797
. '&L_NAME1=FPT&L_QTY1=1&L_AMT1=12.70'
98-
. '&METHOD=SetExpressCheckout&VERSION=72.0&BUTTONSOURCE=Magento_Cart_';
98+
. '&METHOD=SetExpressCheckout&VERSION=72.0&BUTTONSOURCE=Magento_2_';
9999

100100
$this->httpClient->method('write')
101101
->with(
@@ -146,7 +146,7 @@ public function testCallRefundTransaction()
146146

147147
$httpQuery = 'TRANSACTIONID=fooTransactionId&REFUNDTYPE=Partial'
148148
.'&CURRENCYCODE=USD&AMT=145.98&METHOD=RefundTransaction'
149-
.'&VERSION=72.0&BUTTONSOURCE=Magento_Cart_';
149+
.'&VERSION=72.0&BUTTONSOURCE=Magento_2_';
150150

151151
$this->httpClient->expects($this->once())->method('write')
152152
->with(

dev/tests/integration/testsuite/Magento/Paypal/Model/Api/PayflowNvpTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testRequestLineItems()
9595
. 'L_NAME1=Simple 2&L_QTY1=2&L_COST1=9.69&'
9696
. 'L_NAME2=Simple 3&L_QTY2=3&L_COST2=11.69&'
9797
. 'L_NAME3=Discount&L_QTY3=1&L_COST3=-10.00&'
98-
. 'TRXTYPE=A&ACTION=S&BUTTONSOURCE=Magento_Cart_';
98+
. 'TRXTYPE=A&ACTION=S&BUTTONSOURCE=Magento_2_';
9999

100100
$this->httpClient->method('write')
101101
->with(

dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Customer/PlaceOrderWithPayflowLinkTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ public function testResolvePlaceOrderWithPayflowLinkForCustomer(): void
119119
cart_id: "$cartId"
120120
payment_method: {
121121
code: "$paymentMethod"
122-
payflow_link:
122+
payflow_link:
123123
{
124124
cancel_url:"paypal/payflow/cancelPayment"
125125
return_url:"paypal/payflow/returnUrl"
126126
error_url:"paypal/payflow/errorUrl"
127127
}
128128
}
129-
}) {
129+
}) {
130130
cart {
131131
selected_payment_method {
132132
code
@@ -142,7 +142,7 @@ public function testResolvePlaceOrderWithPayflowLinkForCustomer(): void
142142
QUERY;
143143

144144
$productMetadata = ObjectManager::getInstance()->get(ProductMetadataInterface::class);
145-
$button = 'Magento_Cart_' . $productMetadata->getEdition();
145+
$button = 'Magento_2_' . $productMetadata->getEdition();
146146

147147
$payflowLinkResponse = new DataObject(
148148
[

dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithPayflowLinkTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ public function testResolvePlaceOrderWithPayflowLink(): void
117117
cart_id: "$cartId"
118118
payment_method: {
119119
code: "$paymentMethod"
120-
payflow_link:
120+
payflow_link:
121121
{
122122
cancel_url:"paypal/payflow/cancel"
123123
return_url:"paypal/payflow/return"
124124
error_url:"paypal/payflow/error"
125125
}
126126
}
127-
}) {
127+
}) {
128128
cart {
129129
selected_payment_method {
130130
code
@@ -140,7 +140,7 @@ public function testResolvePlaceOrderWithPayflowLink(): void
140140
QUERY;
141141

142142
$productMetadata = ObjectManager::getInstance()->get(ProductMetadataInterface::class);
143-
$button = 'Magento_Cart_' . $productMetadata->getEdition();
143+
$button = 'Magento_2_' . $productMetadata->getEdition();
144144

145145
$payflowLinkResponse = new DataObject(
146146
[
@@ -219,14 +219,14 @@ public function testResolveWithPayflowLinkDeclined(): void
219219
cart_id: "$cartId"
220220
payment_method: {
221221
code: "$paymentMethod"
222-
payflow_link:
222+
payflow_link:
223223
{
224224
cancel_url:"paypal/payflow/cancelPayment"
225225
return_url:"paypal/payflow/returnUrl"
226226
error_url:"paypal/payflow/returnUrl"
227227
}
228228
}
229-
}) {
229+
}) {
230230
cart {
231231
selected_payment_method {
232232
code

dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithPaymentsAdvancedTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function testResolvePlaceOrderWithPaymentsAdvanced(): void
108108
$cartId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
109109

110110
$productMetadata = ObjectManager::getInstance()->get(ProductMetadataInterface::class);
111-
$button = 'Magento_Cart_' . $productMetadata->getEdition();
111+
$button = 'Magento_2_' . $productMetadata->getEdition();
112112

113113
$payflowLinkResponse = new DataObject(
114114
[
@@ -256,7 +256,7 @@ private function setPaymentMethodAndPlaceOrder(string $cartId, string $paymentMe
256256
error_url:"paypal/payflowadvanced/customerror"
257257
}
258258
}
259-
}) {
259+
}) {
260260
cart {
261261
selected_payment_method {
262262
code
@@ -300,7 +300,7 @@ private function setPaymentMethodWithInValidUrl(string $cartId, string $paymentM
300300
error_url:"paypal/payflowadvanced/error"
301301
}
302302
}
303-
}) {
303+
}) {
304304
cart {
305305
selected_payment_method {
306306
code

0 commit comments

Comments
 (0)