Skip to content

Commit fb10bbf

Browse files
committed
MAGETWO-66634: PayPal ExpressCheckout func tests fail
1 parent 54d4e70 commit fb10bbf

File tree

11 files changed

+86
-36
lines changed

11 files changed

+86
-36
lines changed

app/code/Magento/Paypal/view/frontend/templates/express/review/details.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<?php foreach ($block->getItems() as $item): ?>
2525
<?php echo $block->getItemHtml($item) ?>
2626
<?php endforeach ?>
27-
<tfoot>
27+
<tfoot class="opc-block-summary">
2828
<?php echo $block->getChildHtml('totals'); ?>
2929
</tfoot>
3030
</table>

dev/tests/functional/tests/app/Magento/Paypal/Test/Block/Express/Review.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,16 @@ public function selectShippingMethod(array $shippingMethod)
3232
$shippingElement = $this->_rootElement->find(
3333
$this->shippingMethod,
3434
Locator::SELECTOR_CSS,
35-
'Magento\Paypal\Test\Block\Express\Review\ShippingoptgroupElement'
35+
\Magento\Paypal\Test\Block\Express\Review\ShippingoptgroupElement::class
3636
);
3737
$shippingElement->setValue($shippingMethod['shipping_service'] . '/' . $shippingMethod['shipping_method']);
3838
}
39+
40+
/**
41+
* Click "Place Order" button.
42+
*/
43+
public function placeOrder()
44+
{
45+
$this->_rootElement->find('#review-button')->click();
46+
}
3947
}

dev/tests/functional/tests/app/Magento/Paypal/Test/Block/Sandbox/ExpressMainReview.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ public function getReviewBlock()
3636
{
3737
if ($this->_rootElement->find($this->expressReview)->isVisible()) {
3838
return $this->blockFactory->create(
39-
'Magento\Paypal\Test\Block\Sandbox\ExpressReview',
40-
['element' => $this->_rootElement->find($this->expressReview)]
39+
\Magento\Paypal\Test\Block\Sandbox\ExpressReview::class,
40+
['element' => $this->_rootElement]
4141
);
4242
}
4343
return $this->blockFactory->create(
44-
'Magento\Paypal\Test\Block\Sandbox\ExpressOldReview',
45-
['element' => $this->_rootElement->find($this->expressOldReview)]
44+
\Magento\Paypal\Test\Block\Sandbox\ExpressOldReview::class,
45+
['element' => $this->_rootElement]
4646
);
4747
}
4848
}

dev/tests/functional/tests/app/Magento/Paypal/Test/Block/Sandbox/ExpressReview.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ExpressReview extends Block
2626
*
2727
* @var string
2828
*/
29-
protected $total = '.amountFormatted';
29+
protected $total = '#transactionCart .ng-binding';
3030

3131
/**
3232
* Method that escapes currency symbols.

dev/tests/functional/tests/app/Magento/Paypal/Test/Block/Sandbox/SignupCreate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SignupCreate extends Form
1919
*
2020
* @var string
2121
*/
22-
protected $termsAgree = '#termsAgree';
22+
protected $termsAgree = '#termsAgreeLabel span';
2323

2424
/**
2525
* Continue personal account signup button.

dev/tests/functional/tests/app/Magento/Paypal/Test/Page/Sandbox/AccountSignup.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/pages.xsd">
99
<page name="AccountSignup" area="Sandbox" mca="https://www.sandbox.paypal.com/signup/account" module="Magento_Paypal">
10-
<block name="signupChooseAccountTypeBlock" class="Magento\Paypal\Test\Block\Sandbox\SignupChooseAccountType" locator="#radioOptions" strategy="css selector" />
1110
<block name="signupPersonalAccountBlock" class="Magento\Paypal\Test\Block\Sandbox\SignupPersonalAccount" locator=".personalAccountSignUp" strategy="css selector" />
1211
</page>
1312
</config>

dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromShoppingCartTest.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Paypal\Test\TestCase\ExpressCheckoutFromShoppingCartTest" summary="Guest Checkout with &quot;Checkout with PayPal&quot; button (Payflow Edition) from the Shopping Cart and Offline Shipping" ticketId="MAGETWO-12414">
1010
<variation name="ExpressCheckoutFromShoppingCartTestVariation1" summary="Check Out as a Guest with 'Checkout with PayPal' button (Payflow Edition) from the Shopping Cart and Offline Shipping" ticketId="MAGETWO-12414">
11-
<data name="products" xsi:type="string">catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option, bundleProduct::fixed_100_dollar_with_required_options</data>
11+
<data name="products" xsi:type="string">catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option, bundleProduct::bundle_fixed_100_dollar_product</data>
1212
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data>
13-
<data name="sandboxCustomer/dataSet" xsi:type="string">sandbox_us_default</data>
13+
<data name="sandboxCustomer/dataset" xsi:type="string">sandbox_us_default</data>
1414
<data name="checkoutMethod" xsi:type="string">guest</data>
1515
<data name="shipping" xsi:type="array">
1616
<item name="shipping_method" xsi:type="string">Fixed</item>
1717
<item name="shipping_service" xsi:type="string">Flat Rate</item>
1818
</data>
1919
<data name="paypalPrices" xsi:type="array">
20-
<item name="total" xsi:type="string">131.00</item>
20+
<item name="total" xsi:type="string">121.00</item>
2121
</data>
2222
<data name="prices" xsi:type="array">
23-
<item name="subTotal" xsi:type="string">131.00</item>
24-
<item name="taxTotal" xsi:type="string">10.81</item>
23+
<item name="subTotal" xsi:type="string">121.00</item>
24+
<item name="taxTotal" xsi:type="string">9.98</item>
2525
<item name="shippingTotal" xsi:type="string">15.00</item>
26-
<item name="grandTotal" xsi:type="string">156.81</item>
26+
<item name="grandTotal" xsi:type="string">145.98</item>
2727
</data>
2828
<data name="configData" xsi:type="string">payflowpro</data>
2929
<data name="tag" xsi:type="string">test_type:3rd_party_test</data>

dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutOnePageTest.xml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,24 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Paypal\Test\TestCase\ExpressCheckoutOnePageTest" summary="Guest Checkout Using PayPal Express Checkout Method and Flat Rate" ticketId="MAGETWO-12413">
1010
<variation name="ExpressCheckoutOnePageTestVariation1" summary="Check Out as a Guest Using PayPal Express Checkout Method and Offline Shipping Method" ticketId="MAGETWO-12413">
11-
<data name="products" xsi:type="string">catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option, bundleProduct::fixed_100_dollar_with_required_options</data>
11+
<data name="products" xsi:type="string">catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option, bundleProduct::bundle_fixed_100_dollar_product</data>
1212
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data>
1313
<data name="sandboxCustomer/dataset" xsi:type="string">sandbox_us_default</data>
1414
<data name="customer/dataset" xsi:type="string">default</data>
15+
<data name="shippingAddress/dataset" xsi:type="string">US_address_1</data>
1516
<data name="checkoutMethod" xsi:type="string">guest</data>
1617
<data name="shipping" xsi:type="array">
1718
<item name="shipping_method" xsi:type="string">Fixed</item>
1819
<item name="shipping_service" xsi:type="string">Flat Rate</item>
1920
</data>
2021
<data name="paypalPrices" xsi:type="array">
21-
<item name="total" xsi:type="string">156.81</item>
22+
<item name="total" xsi:type="string">145.98</item>
2223
</data>
2324
<data name="prices" xsi:type="array">
24-
<item name="subTotal" xsi:type="string">131.00</item>
25-
<item name="taxTotal" xsi:type="string">10.81</item>
25+
<item name="subTotal" xsi:type="string">121.00</item>
26+
<item name="taxTotal" xsi:type="string">9.98</item>
2627
<item name="shippingTotal" xsi:type="string">15.00</item>
27-
<item name="grandTotal" xsi:type="string">156.81</item>
28+
<item name="grandTotal" xsi:type="string">145.98</item>
2829
</data>
2930
<data name="payment/method" xsi:type="string">paypal_express</data>
3031
<data name="configData" xsi:type="string">paypal_express</data>
@@ -34,24 +35,24 @@
3435
<constraint name="Magento\Sales\Test\Constraint\AssertOrderCommentsHistory" />
3536
</variation>
3637
<variation name="ExpressCheckoutOnePageTestVariation2" summary="Check Out as a Guest using Payflow Link - PayPal Express Checkout Payflow Edition and Offline Shipping" ticketId="MAGETWO-14359">
37-
<data name="products" xsi:type="string">catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option, bundleProduct::fixed_100_dollar_with_required_options</data>
38+
<data name="products" xsi:type="string">catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option, bundleProduct::bundle_fixed_100_dollar_product</data>
3839
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data>
3940
<data name="sandboxCustomer/dataset" xsi:type="string">sandbox_us_default</data>
4041
<data name="customer/dataset" xsi:type="string">default</data>
4142
<data name="checkoutMethod" xsi:type="string">guest</data>
43+
<data name="shippingAddress/dataset" xsi:type="string">US_address_1</data>
4244
<data name="shipping" xsi:type="array">
4345
<item name="shipping_method" xsi:type="string">Fixed</item>
4446
<item name="shipping_service" xsi:type="string">Flat Rate</item>
4547
</data>
46-
<data name="grandTotal" xsi:type="string">156.81</data>
4748
<data name="paypalPrices" xsi:type="array">
48-
<item name="total" xsi:type="string">156.81</item>
49+
<item name="total" xsi:type="string">145.98</item>
4950
</data>
5051
<data name="prices" xsi:type="array">
51-
<item name="subTotal" xsi:type="string">131.00</item>
52-
<item name="taxTotal" xsi:type="string">10.81</item>
52+
<item name="subTotal" xsi:type="string">121.00</item>
53+
<item name="taxTotal" xsi:type="string">9.98</item>
5354
<item name="shippingTotal" xsi:type="string">15.00</item>
54-
<item name="grandTotal" xsi:type="string">156.81</item>
55+
<item name="grandTotal" xsi:type="string">145.98</item>
5556
</data>
5657
<data name="payment/method" xsi:type="string">paypal_express</data>
5758
<data name="configData" xsi:type="string">payflowlink</data>
@@ -61,24 +62,24 @@
6162
<constraint name="Magento\Sales\Test\Constraint\AssertOrderCommentsHistory" />
6263
</variation>
6364
<variation name="ExpressCheckoutOnePageTestVariation3" summary="Check Out as Guest User using PayPal Express and Offline Shipping Method" ticketId="MAGETWO-12996">
64-
<data name="products" xsi:type="string">catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option, bundleProduct::fixed_100_dollar_with_required_options</data>
65+
<data name="products" xsi:type="string">catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option, bundleProduct::bundle_fixed_100_dollar_product</data>
6566
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data>
6667
<data name="sandboxCustomer/dataset" xsi:type="string">sandbox_us_default</data>
6768
<data name="customer/dataset" xsi:type="string">default</data>
6869
<data name="checkoutMethod" xsi:type="string">guest</data>
70+
<data name="shippingAddress/dataset" xsi:type="string">US_address_1</data>
6971
<data name="shipping" xsi:type="array">
7072
<item name="shipping_method" xsi:type="string">Fixed</item>
7173
<item name="shipping_service" xsi:type="string">Flat Rate</item>
7274
</data>
73-
<data name="grandTotal" xsi:type="string">156.81</data>
7475
<data name="paypalPrices" xsi:type="array">
75-
<item name="total" xsi:type="string">156.81</item>
76+
<item name="total" xsi:type="string">145.98</item>
7677
</data>
7778
<data name="prices" xsi:type="array">
78-
<item name="subTotal" xsi:type="string">131.00</item>
79-
<item name="taxTotal" xsi:type="string">10.81</item>
79+
<item name="subTotal" xsi:type="string">121.00</item>
80+
<item name="taxTotal" xsi:type="string">9.98</item>
8081
<item name="shippingTotal" xsi:type="string">15.00</item>
81-
<item name="grandTotal" xsi:type="string">156.81</item>
82+
<item name="grandTotal" xsi:type="string">145.98</item>
8283
</data>
8384
<data name="payment/method" xsi:type="string">paypal_express</data>
8485
<data name="configData" xsi:type="string">paypal_express</data>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
/**
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Paypal\Test\TestStep;
8+
9+
use Magento\Checkout\Test\Page\CheckoutOnepage;
10+
use Magento\Mtf\TestStep\TestStepInterface;
11+
12+
/**
13+
* Continue to PayPal from one page checkout.
14+
*/
15+
class ContinueToPaypalStep implements TestStepInterface
16+
{
17+
/**
18+
* Onepage checkout page.
19+
*
20+
* @var CheckoutOnepage
21+
*/
22+
protected $checkoutOnepage;
23+
24+
/**
25+
* @construct
26+
* @param CheckoutOnepage $checkoutOnepage
27+
*/
28+
public function __construct(CheckoutOnepage $checkoutOnepage)
29+
{
30+
$this->checkoutOnepage = $checkoutOnepage;
31+
}
32+
33+
/**
34+
* Click Continue to PayPal button.
35+
*
36+
* @return array
37+
*/
38+
public function run()
39+
{
40+
$this->checkoutOnepage->getPaymentBlock()->getSelectedPaymentMethodBlock()->clickPlaceOrder();
41+
}
42+
}

dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CreateSandboxCustomerStep.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public function __construct(
7272
public function run()
7373
{
7474
$this->accountSignup->open();
75-
$this->accountSignup->getSignupChooseAccountTypeBlock()->selectPersonalAccount();
7675
$this->accountSignup->getSignupPersonalAccountBlock()->fill($this->sandboxCustomer);
7776
$this->accountSignup->getSignupPersonalAccountBlock()->continueSignup();
7877
$this->signupCreate->getSignupCreateBlock()->fill($this->sandboxCustomer);

0 commit comments

Comments
 (0)