From fbd244b15158d98bc9dad3a2bbc8eebeb1fb7743 Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Fri, 22 Jul 2016 18:47:24 +0300 Subject: [PATCH 01/21] MAGETWO-55671: Order status should be changed related to Kount Status - Updated Risk Data handler to triggering Fraud order status - Fixed incorrect payment statuses processing in authorization and sale commands --- .../Gateway/Response/RiskDataHandler.php | 9 + .../Gateway/Response/RiskDataHandlerTest.php | 118 +++++----- app/code/Magento/Braintree/etc/config.xml | 2 + app/code/Magento/Braintree/etc/di.xml | 1 + .../Order/Payment/State/AuthorizeCommand.php | 24 +- .../Order/Payment/State/CaptureCommand.php | 22 +- .../Payment/State/AuthorizeCommandTest.php | 213 ++++++++++++++++++ .../Payment/State/CaptureCommandTest.php | 211 +++++++++++++++++ app/code/Magento/Sales/i18n/en_US.csv | 8 +- .../Adminhtml/Order/PaymentReviewTest.php | 119 ++++++++++ .../Magento/Braintree/_files/fraud_order.php | 38 ++++ 11 files changed, 679 insertions(+), 86 deletions(-) create mode 100644 app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/AuthorizeCommandTest.php create mode 100644 app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/CaptureCommandTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Braintree/_files/fraud_order.php diff --git a/app/code/Magento/Braintree/Gateway/Response/RiskDataHandler.php b/app/code/Magento/Braintree/Gateway/Response/RiskDataHandler.php index 46d415c97b7c6..9f4d1cd455e3a 100644 --- a/app/code/Magento/Braintree/Gateway/Response/RiskDataHandler.php +++ b/app/code/Magento/Braintree/Gateway/Response/RiskDataHandler.php @@ -24,6 +24,11 @@ class RiskDataHandler implements HandlerInterface */ const RISK_DATA_DECISION = 'riskDataDecision'; + /** + * Risk data Review status + */ + private static $statusReview = 'Review'; + /** * @var SubjectReader */ @@ -62,5 +67,9 @@ public function handle(array $handlingSubject, array $response) $payment->setAdditionalInformation(self::RISK_DATA_ID, $transaction->riskData->id); $payment->setAdditionalInformation(self::RISK_DATA_DECISION, $transaction->riskData->decision); + + if ($transaction->riskData->decision === self::$statusReview) { + $payment->setIsFraudDetected(true); + } } } diff --git a/app/code/Magento/Braintree/Test/Unit/Gateway/Response/RiskDataHandlerTest.php b/app/code/Magento/Braintree/Test/Unit/Gateway/Response/RiskDataHandlerTest.php index 239524e04c0e0..2baf3356a0008 100644 --- a/app/code/Magento/Braintree/Test/Unit/Gateway/Response/RiskDataHandlerTest.php +++ b/app/code/Magento/Braintree/Test/Unit/Gateway/Response/RiskDataHandlerTest.php @@ -5,12 +5,12 @@ */ namespace Magento\Braintree\Test\Unit\Gateway\Response; -use Braintree\RiskData; use Braintree\Transaction; -use Magento\Sales\Model\Order\Payment; use Magento\Braintree\Gateway\Helper\SubjectReader; use Magento\Braintree\Gateway\Response\RiskDataHandler; use Magento\Payment\Gateway\Data\PaymentDataObjectInterface; +use Magento\Sales\Model\Order\Payment; +use PHPUnit_Framework_MockObject_MockObject as MockObject; /** * Class RiskDataHandlerTest @@ -25,99 +25,95 @@ class RiskDataHandlerTest extends \PHPUnit_Framework_TestCase private $riskDataHandler; /** - * @var SubjectReader|\PHPUnit_Framework_MockObject_MockObject + * @var SubjectReader|MockObject */ - private $subjectReaderMock; + private $subjectReader; /** * Set up */ protected function setUp() { - $this->subjectReaderMock = $this->getMockBuilder(SubjectReader::class) + $this->subjectReader = $this->getMockBuilder(SubjectReader::class) ->disableOriginalConstructor() + ->setMethods(['readPayment', 'readTransaction']) ->getMock(); - $this->riskDataHandler = new RiskDataHandler($this->subjectReaderMock); + $this->riskDataHandler = new RiskDataHandler($this->subjectReader); } /** - * Run test for handle method + * Test for handle method + * @covers \Magento\Braintree\Gateway\Response\RiskDataHandler::handle + * @param string $riskDecision + * @param boolean $isFraud + * @dataProvider riskDataProvider */ - public function testHandle() + public function testHandle($riskDecision, $isFraud) { - $paymentData = $this->getPaymentDataObjectMock(); - $transaction = $this->getBraintreeTransactionMock(); + /** @var Payment|MockObject $payment */ + $payment = $this->getMockBuilder(Payment::class) + ->disableOriginalConstructor() + ->setMethods(['setAdditionalInformation', 'setIsFraudDetected']) + ->getMock(); + /** @var PaymentDataObjectInterface|MockObject $paymentDO */ + $paymentDO = $this->getMock(PaymentDataObjectInterface::class); + $paymentDO->expects(self::once()) + ->method('getPayment') + ->willReturn($payment); + + $transaction = Transaction::factory([ + 'riskData' => [ + 'id' => 'test-id', + 'decision' => $riskDecision + ] + ]); $response = [ 'object' => $transaction ]; $handlingSubject = [ - 'payment' =>$paymentData, + 'payment' => $paymentDO, ]; - $this->subjectReaderMock->expects(self::once()) + $this->subjectReader->expects(static::once()) ->method('readPayment') ->with($handlingSubject) - ->willReturn($paymentData); - $this->subjectReaderMock->expects(self::once()) + ->willReturn($paymentDO); + $this->subjectReader->expects(static::once()) ->method('readTransaction') ->with($response) ->willReturn($transaction); - $this->riskDataHandler->handle($handlingSubject, $response); - } - - /** - * @return \PHPUnit_Framework_MockObject_MockObject - */ - private function getBraintreeTransactionMock() - { - $transaction = \Braintree\Transaction::factory([]); - $transaction->_set( - 'riskData', - RiskData::factory( - [ - 'id' => 'test-id', - 'decision' => 'test-decision', - ] - ) - ); - - return $transaction; - } - - /** - * @return \PHPUnit_Framework_MockObject_MockObject - */ - private function getPaymentDataObjectMock() - { - $mock = $this->getMockBuilder(PaymentDataObjectInterface::class) - ->getMockForAbstractClass(); + $payment->expects(static::at(0)) + ->method('setAdditionalInformation') + ->with(RiskDataHandler::RISK_DATA_ID, 'test-id'); + $payment->expects(static::at(1)) + ->method('setAdditionalInformation') + ->with(RiskDataHandler::RISK_DATA_DECISION, $riskDecision); - $mock->expects(static::once()) - ->method('getPayment') - ->willReturn($this->getPaymentMock()); + if (!$isFraud) { + $payment->expects(static::never()) + ->method('setIsFraudDetected'); + } else { + $payment->expects(static::once()) + ->method('setIsFraudDetected') + ->with(true); + } - return $mock; + $this->riskDataHandler->handle($handlingSubject, $response); } /** - * @return \PHPUnit_Framework_MockObject_MockObject + * Get list of variations to test fraud + * @return array */ - private function getPaymentMock() + public function riskDataProvider() { - $paymentMock = $this->getMockBuilder(Payment::class) - ->disableOriginalConstructor() - ->getMock(); - - $paymentMock->expects(self::at(0)) - ->method('setAdditionalInformation') - ->with(RiskDataHandler::RISK_DATA_ID, 'test-id'); - $paymentMock->expects(self::at(1)) - ->method('setAdditionalInformation') - ->with(RiskDataHandler::RISK_DATA_DECISION, 'test-decision'); - - return $paymentMock; + return [ + ['decision' => 'Not Evaluated', 'isFraud' => false], + ['decision' => 'Approve', 'isFraud' => false], + ['decision' => 'Review', 'isFraud' => true], + ]; } } diff --git a/app/code/Magento/Braintree/etc/config.xml b/app/code/Magento/Braintree/etc/config.xml index abe2eda5b4819..095a8419c8529 100644 --- a/app/code/Magento/Braintree/etc/config.xml +++ b/app/code/Magento/Braintree/etc/config.xml @@ -26,6 +26,8 @@ 1 1 1 + 1 + 1 AE,VI,MC,DI,JCB,CUP,DN,MI 1 diff --git a/app/code/Magento/Braintree/etc/di.xml b/app/code/Magento/Braintree/etc/di.xml index 141ae258b2ca7..849a3039fc361 100644 --- a/app/code/Magento/Braintree/etc/di.xml +++ b/app/code/Magento/Braintree/etc/di.xml @@ -133,6 +133,7 @@ BraintreeVoidCommand BraintreeRefundCommand BraintreeVoidCommand + BraintreeVoidCommand diff --git a/app/code/Magento/Sales/Model/Order/Payment/State/AuthorizeCommand.php b/app/code/Magento/Sales/Model/Order/Payment/State/AuthorizeCommand.php index 67291b9372421..5bef05e6f28e0 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/State/AuthorizeCommand.php +++ b/app/code/Magento/Sales/Model/Order/Payment/State/AuthorizeCommand.php @@ -10,6 +10,9 @@ use Magento\Sales\Model\Order; use Magento\Sales\Model\Order\Payment; +/** + * Class AuthorizeCommand + */ class AuthorizeCommand implements CommandInterface { /** @@ -23,29 +26,22 @@ public function execute(OrderPaymentInterface $payment, $amount, OrderInterface $state = Order::STATE_PROCESSING; $status = false; $formattedAmount = $order->getBaseCurrency()->formatTxt($amount); + if ($payment->getIsTransactionPending()) { $state = Order::STATE_PAYMENT_REVIEW; - $message = __( - 'We will authorize %1 after the payment is approved at the payment gateway.', - $formattedAmount - ); + $message = 'We will authorize %1 after the payment is approved at the payment gateway.'; } else { - if ($payment->getIsFraudDetected()) { - $state = Order::STATE_PROCESSING; - $message = __( - 'Order is suspended as its authorizing amount %1 is suspected to be fraudulent.', - $formattedAmount - ); - } else { - $message = __('Authorized amount of %1', $formattedAmount); - } + $message = 'Authorized amount of %1.'; } + if ($payment->getIsFraudDetected()) { + $state = Order::STATE_PAYMENT_REVIEW; $status = Order::STATUS_FRAUD; + $message .= ' Order is suspended as its authorizing amount %1 is suspected to be fraudulent.'; } $this->setOrderStateAndStatus($order, $status, $state); - return $message; + return __($message, $formattedAmount); } /** diff --git a/app/code/Magento/Sales/Model/Order/Payment/State/CaptureCommand.php b/app/code/Magento/Sales/Model/Order/Payment/State/CaptureCommand.php index 5639de4433f93..d2c7e2a7e71b3 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/State/CaptureCommand.php +++ b/app/code/Magento/Sales/Model/Order/Payment/State/CaptureCommand.php @@ -9,6 +9,9 @@ use Magento\Sales\Api\Data\OrderPaymentInterface; use Magento\Sales\Model\Order as SalesOrder; +/** + * Class CaptureCommand + */ class CaptureCommand implements CommandInterface { /** @@ -24,22 +27,23 @@ public function execute(OrderPaymentInterface $payment, $amount, OrderInterface $state = SalesOrder::STATE_PROCESSING; $status = false; $formattedAmount = $order->getBaseCurrency()->formatTxt($amount); + if ($payment->getIsTransactionPending()) { - $message = __( - 'An amount of %1 will be captured after being approved at the payment gateway.', - $formattedAmount - ); $state = SalesOrder::STATE_PAYMENT_REVIEW; - if ($payment->getIsFraudDetected()) { - $status = SalesOrder::STATUS_FRAUD; - } + $message = 'An amount of %1 will be captured after being approved at the payment gateway.'; } else { // normal online capture: invoice is marked as "paid" - $message = __('Captured amount of %1 online', $formattedAmount); + $message = 'Captured amount of %1 online.'; + } + + if ($payment->getIsFraudDetected()) { + $state = SalesOrder::STATE_PAYMENT_REVIEW; + $status = SalesOrder::STATUS_FRAUD; + $message .= ' Order is suspended as its capturing amount %1 is suspected to be fraudulent.'; } $this->setOrderStateAndStatus($order, $status, $state); - return $message; + return __($message, $formattedAmount); } /** diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/AuthorizeCommandTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/AuthorizeCommandTest.php new file mode 100644 index 0000000000000..a02b3498d2cc7 --- /dev/null +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/AuthorizeCommandTest.php @@ -0,0 +1,213 @@ +currency = $this->getMockBuilder(Currency::class) + ->disableOriginalConstructor() + ->setMethods(['formatTxt']) + ->getMock(); + + $this->config = $this->getMockBuilder(Config::class) + ->disableOriginalConstructor() + ->setMethods(['getStateDefaultStatus']) + ->getMock(); + + $this->payment = $this->getMockBuilder(Payment::class) + ->disableOriginalConstructor() + ->setMethods(['getIsTransactionPending', 'getIsFraudDetected']) + ->getMock(); + $this->order = $this->getMockBuilder(Order::class) + ->disableOriginalConstructor() + ->setMethods(['getBaseCurrency', 'getConfig', 'setState', 'setStatus', '__wakeup']) + ->getMock(); + + $this->order->expects(static::once()) + ->method('getBaseCurrency') + ->willReturn($this->currency); + $this->currency->expects(static::once()) + ->method('formatTxt') + ->with($this->amount) + ->willReturn($this->amount); + + $this->command = new AuthorizeCommand(); + } + + /** + * @covers \Magento\Sales\Model\Order\Payment\State\AuthorizeCommand::execute + */ + public function testExecute() + { + $message = __('Authorized amount of %1.', $this->amount); + + $this->payment->expects(static::once()) + ->method('getIsTransactionPending') + ->willReturn(false); + $this->payment->expects(static::once()) + ->method('getIsFraudDetected') + ->willReturn(false); + + $this->order->expects(static::once()) + ->method('getConfig') + ->willReturn($this->config); + $this->config->expects(static::once()) + ->method('getStateDefaultStatus') + ->with(Order::STATE_PROCESSING) + ->willReturn(Order::STATE_PROCESSING); + + $this->order->expects(static::once()) + ->method('setState') + ->with(Order::STATE_PROCESSING) + ->willReturnSelf(); + $this->order->expects(static::once()) + ->method('setStatus') + ->with(Order::STATE_PROCESSING); + + $actual = $this->command->execute($this->payment, $this->amount, $this->order); + static::assertEquals($message, $actual); + } + + /** + * @covers \Magento\Sales\Model\Order\Payment\State\AuthorizeCommand::execute + */ + public function testExecutePendingTransaction() + { + $message = __('We will authorize %1 after the payment is approved at the payment gateway.', $this->amount); + + $this->payment->expects(static::once()) + ->method('getIsTransactionPending') + ->willReturn(true); + $this->payment->expects(static::once()) + ->method('getIsFraudDetected') + ->willReturn(false); + + $this->order->expects(static::once()) + ->method('getConfig') + ->willReturn($this->config); + $this->config->expects(static::once()) + ->method('getStateDefaultStatus') + ->with(Order::STATE_PAYMENT_REVIEW) + ->willReturn(Order::STATE_PAYMENT_REVIEW); + + $this->order->expects(static::once()) + ->method('setState') + ->with(Order::STATE_PAYMENT_REVIEW) + ->willReturnSelf(); + $this->order->expects(static::once()) + ->method('setStatus') + ->with(Order::STATE_PAYMENT_REVIEW); + + $actual = $this->command->execute($this->payment, $this->amount, $this->order); + static::assertEquals($message, $actual); + } + + /** + * @covers \Magento\Sales\Model\Order\Payment\State\AuthorizeCommand::execute + */ + public function testExecutePendingTransactionFraud() + { + $expectedMessage = 'We will authorize %1 after the payment is approved at the payment gateway. '; + $expectedMessage .= 'Order is suspended as its authorizing amount %1 is suspected to be fraudulent.'; + $message = __($expectedMessage, $this->amount); + + $this->payment->expects(static::once()) + ->method('getIsTransactionPending') + ->willReturn(true); + $this->payment->expects(static::once()) + ->method('getIsFraudDetected') + ->willReturn(true); + + $this->order->expects(static::never()) + ->method('getConfig'); + + $this->order->expects(static::once()) + ->method('setState') + ->with(Order::STATE_PAYMENT_REVIEW) + ->willReturnSelf(); + $this->order->expects(static::once()) + ->method('setStatus') + ->with(Order::STATUS_FRAUD); + + $actual = $this->command->execute($this->payment, $this->amount, $this->order); + static::assertEquals($message, $actual); + } + + /** + * @covers \Magento\Sales\Model\Order\Payment\State\AuthorizeCommand::execute + */ + public function testExecuteFraud() + { + $message = __( + 'Authorized amount of %1. Order is suspended as its authorizing amount %1 is suspected to be fraudulent.', + $this->amount + ); + + $this->payment->expects(static::once()) + ->method('getIsTransactionPending') + ->willReturn(false); + $this->payment->expects(static::once()) + ->method('getIsFraudDetected') + ->willReturn(true); + + $this->order->expects(static::never()) + ->method('getConfig'); + + $this->order->expects(static::once()) + ->method('setState') + ->with(Order::STATE_PAYMENT_REVIEW) + ->willReturnSelf(); + $this->order->expects(static::once()) + ->method('setStatus') + ->with(Order::STATUS_FRAUD); + + $actual = $this->command->execute($this->payment, $this->amount, $this->order); + static::assertEquals($message, $actual); + } +} diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/CaptureCommandTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/CaptureCommandTest.php new file mode 100644 index 0000000000000..9982eeab27a14 --- /dev/null +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/CaptureCommandTest.php @@ -0,0 +1,211 @@ +currency = $this->getMockBuilder(Currency::class) + ->disableOriginalConstructor() + ->setMethods(['formatTxt']) + ->getMock(); + + $this->config = $this->getMockBuilder(Config::class) + ->disableOriginalConstructor() + ->setMethods(['getStateDefaultStatus']) + ->getMock(); + + $this->payment = $this->getMockBuilder(Payment::class) + ->disableOriginalConstructor() + ->setMethods(['getIsTransactionPending', 'getIsFraudDetected']) + ->getMock(); + $this->order = $this->getMockBuilder(Order::class) + ->disableOriginalConstructor() + ->setMethods(['getBaseCurrency', 'getConfig', 'setState', 'setStatus', '__wakeup']) + ->getMock(); + + $this->order->expects(static::once()) + ->method('getBaseCurrency') + ->willReturn($this->currency); + $this->currency->expects(static::once()) + ->method('formatTxt') + ->with($this->amount) + ->willReturn($this->amount); + + $this->command = new CaptureCommand(); + } + + /** + * @covers \Magento\Sales\Model\Order\Payment\State\CaptureCommand::execute + */ + public function testExecute() + { + $message = __('Captured amount of %1 online.', $this->amount); + + $this->payment->expects(static::once()) + ->method('getIsTransactionPending') + ->willReturn(false); + $this->payment->expects(static::once()) + ->method('getIsFraudDetected') + ->willReturn(false); + + $this->order->expects(static::once()) + ->method('getConfig') + ->willReturn($this->config); + $this->config->expects(static::once()) + ->method('getStateDefaultStatus') + ->with(Order::STATE_PROCESSING) + ->willReturn(Order::STATE_PROCESSING); + + $this->order->expects(static::once()) + ->method('setState') + ->with(Order::STATE_PROCESSING) + ->willReturnSelf(); + $this->order->expects(static::once()) + ->method('setStatus') + ->with(Order::STATE_PROCESSING); + + $actual = $this->command->execute($this->payment, $this->amount, $this->order); + static::assertEquals($message, $actual); + } + + /** + * @covers \Magento\Sales\Model\Order\Payment\State\CaptureCommand::execute + */ + public function testExecutePendingTransaction() + { + $message = __('An amount of %1 will be captured after being approved at the payment gateway.', $this->amount); + + $this->payment->expects(static::once()) + ->method('getIsTransactionPending') + ->willReturn(true); + $this->payment->expects(static::once()) + ->method('getIsFraudDetected') + ->willReturn(false); + + $this->order->expects(static::once()) + ->method('getConfig') + ->willReturn($this->config); + $this->config->expects(static::once()) + ->method('getStateDefaultStatus') + ->with(Order::STATE_PAYMENT_REVIEW) + ->willReturn(Order::STATE_PAYMENT_REVIEW); + + $this->order->expects(static::once()) + ->method('setState') + ->with(Order::STATE_PAYMENT_REVIEW) + ->willReturnSelf(); + $this->order->expects(static::once()) + ->method('setStatus') + ->with(Order::STATE_PAYMENT_REVIEW); + + $actual = $this->command->execute($this->payment, $this->amount, $this->order); + static::assertEquals($message, $actual); + } + + /** + * @covers \Magento\Sales\Model\Order\Payment\State\CaptureCommand::execute + */ + public function testExecutePendingTransactionFraud() + { + $expectedMessage = 'An amount of %1 will be captured after being approved at the payment gateway. '; + $expectedMessage .= 'Order is suspended as its capturing amount %1 is suspected to be fraudulent.'; + $message = __($expectedMessage, $this->amount); + + $this->payment->expects(static::once()) + ->method('getIsTransactionPending') + ->willReturn(true); + $this->payment->expects(static::once()) + ->method('getIsFraudDetected') + ->willReturn(true); + + $this->order->expects(static::never()) + ->method('getConfig'); + + $this->order->expects(static::once()) + ->method('setState') + ->with(Order::STATE_PAYMENT_REVIEW) + ->willReturnSelf(); + $this->order->expects(static::once()) + ->method('setStatus') + ->with(Order::STATUS_FRAUD); + + $actual = $this->command->execute($this->payment, $this->amount, $this->order); + static::assertEquals($message, $actual); + } + + /** + * @covers \Magento\Sales\Model\Order\Payment\State\CaptureCommand::execute + */ + public function testExecuteFraud() + { + $expectedMessage = 'Captured amount of %1 online. '; + $expectedMessage .= 'Order is suspended as its capturing amount %1 is suspected to be fraudulent.'; + $message = __($expectedMessage, $this->amount); + + $this->payment->expects(static::once()) + ->method('getIsTransactionPending') + ->willReturn(false); + $this->payment->expects(static::once()) + ->method('getIsFraudDetected') + ->willReturn(true); + + $this->order->expects(static::never()) + ->method('getConfig'); + + $this->order->expects(static::once()) + ->method('setState') + ->with(Order::STATE_PAYMENT_REVIEW) + ->willReturnSelf(); + $this->order->expects(static::once()) + ->method('setStatus') + ->with(Order::STATUS_FRAUD); + + $actual = $this->command->execute($this->payment, $this->amount, $this->order); + static::assertEquals($message, $actual); + } +} diff --git a/app/code/Magento/Sales/i18n/en_US.csv b/app/code/Magento/Sales/i18n/en_US.csv index 9eb38b8488025..b285a2fa33202 100644 --- a/app/code/Magento/Sales/i18n/en_US.csv +++ b/app/code/Magento/Sales/i18n/en_US.csv @@ -352,10 +352,14 @@ Mixed,Mixed "The payment disallows storing objects.","The payment disallows storing objects." "The transaction ""%1"" cannot be captured yet.","The transaction ""%1"" cannot be captured yet." "We will authorize %1 after the payment is approved at the payment gateway.","We will authorize %1 after the payment is approved at the payment gateway." +"We will authorize %1 after the payment is approved at the payment gateway. Order is suspended as its authorizing amount %1 is suspected to be fraudulent.","We will authorize %1 after the payment is approved at the payment gateway. Order is suspended as its authorizing amount %1 is suspected to be fraudulent." "Order is suspended as its authorizing amount %1 is suspected to be fraudulent.","Order is suspended as its authorizing amount %1 is suspected to be fraudulent." -"Authorized amount of %1","Authorized amount of %1" +"Authorized amount of %1.","Authorized amount of %1." +"Authorized amount of %1. Order is suspended as its authorizing amount %1 is suspected to be fraudulent.","Authorized amount of %1. Order is suspended as its authorizing amount %1 is suspected to be fraudulent." "An amount of %1 will be captured after being approved at the payment gateway.","An amount of %1 will be captured after being approved at the payment gateway." -"Captured amount of %1 online","Captured amount of %1 online" +"An amount of %1 will be captured after being approved at the payment gateway. Order is suspended as its authorizing amount %1 is suspected to be fraudulent.","An amount of %1 will be captured after being approved at the payment gateway. Order is suspended as its authorizing amount %1 is suspected to be fraudulent." +"Captured amount of %1 online.","Captured amount of %1 online." +"Captured amount of %1 online. Order is suspended as its authorizing amount %1 is suspected to be fraudulent.","Captured amount of %1 online. Order is suspended as its authorizing amount %1 is suspected to be fraudulent." "The order amount of %1 is pending approval on the payment gateway.","The order amount of %1 is pending approval on the payment gateway." "Ordered amount of %1","Ordered amount of %1" "Registered notification about captured amount of %1.","Registered notification about captured amount of %1." diff --git a/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php b/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php new file mode 100644 index 0000000000000..e361216bd1967 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php @@ -0,0 +1,119 @@ +resource = ReviewPayment::ADMIN_RESOURCE; + $this->uri = 'backend/sales/order/reviewpayment'; + $this->_getBootstrap()->loadArea(Area::AREA_ADMINHTML); + parent::setUp(); + + /** @var FilterBuilder $filterBuilder */ + $filterBuilder = $this->_objectManager->get(FilterBuilder::class); + $filters = [ + $filterBuilder->setField(OrderInterface::INCREMENT_ID) + ->setValue('100000002') + ->create() + ]; + + /** @var SearchCriteriaBuilder $searchCriteriaBuilder */ + $searchCriteriaBuilder = $this->_objectManager->get(SearchCriteriaBuilder::class); + $searchCriteria = $searchCriteriaBuilder->addFilters($filters) + ->create(); + + $this->orderRepository = $this->_objectManager->get(OrderRepositoryInterface::class); + $orders = $this->orderRepository->getList($searchCriteria) + ->getItems(); + /** @var OrderInterface $order */ + $this->order = array_pop($orders); + } + + /** + * @covers \Magento\Sales\Controller\Adminhtml\Order\ReviewPayment::execute + * @magentoDataFixture Magento/Braintree/_files/fraud_order.php + */ + public function testExecuteAccept() + { + $orderId = $this->order->getEntityId(); + $this->dispatch('admin/sales/order/reviewPayment/action/accept/order_id/' . $orderId); + + static::assertTrue($this->getResponse()->isRedirect()); + static::assertRedirect(static::stringContains('sales/order/view/order_id/' . $orderId)); + static::assertSessionMessages( + static::equalTo(['The payment has been accepted.']), + MessageInterface::TYPE_SUCCESS + ); + + $order = $this->orderRepository->get($orderId); + static::assertEquals(Order::STATE_PROCESSING, $order->getState()); + static::assertEquals(Order::STATE_PROCESSING, $order->getStatus()); + } + + /** + * @covers \Magento\Sales\Controller\Adminhtml\Order\ReviewPayment::execute + * @magentoDataFixture Magento/Braintree/_files/fraud_order.php + */ + public function testExecuteDeny() + { + $orderId = $this->order->getEntityId(); + $payment = $this->order->getPayment(); + + $adapter = $this->getMockBuilder(Adapter::class) + ->disableOriginalConstructor() + ->setMethods(['denyPayment']) + ->getMock(); + // uses the mock instead a real adapter to avoid api calls to Braintree gateway + $payment->setMethodInstance($adapter); + $this->orderRepository->save($this->order); + + $adapter->expects(static::once()) + ->method('denyPayment') + ->with($payment) + ->willReturn(true); + + $this->dispatch('admin/sales/order/reviewPayment/action/deny/order_id/' . $orderId); + + static::assertTrue($this->getResponse()->isRedirect()); + static::assertRedirect(static::stringContains('sales/order/view/order_id/' . $orderId)); + static::assertSessionMessages( + static::equalTo(['The payment has been denied.']), + MessageInterface::TYPE_SUCCESS + ); + + $order = $this->orderRepository->get($orderId); + static::assertEquals(Order::STATE_CANCELED, $order->getState()); + static::assertEquals(Order::STATE_CANCELED, $order->getStatus()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Braintree/_files/fraud_order.php b/dev/tests/integration/testsuite/Magento/Braintree/_files/fraud_order.php new file mode 100644 index 0000000000000..2e6cc3de6f9b7 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Braintree/_files/fraud_order.php @@ -0,0 +1,38 @@ +get(Config::class); +$config->setDataByPath('payment/' . ConfigProvider::CODE . '/active', 1); +$config->save(); + +/** @var Payment $payment */ +$payment = $objectManager->create(Payment::class); +$payment->setMethod(ConfigProvider::CODE) + ->setLastTransId('000001'); + +$amount = 100; + +/** @var Order $order */ +$order = $objectManager->create(Order::class); +$order->setIncrementId('100000002') + ->setState(Order::STATE_PAYMENT_REVIEW) + ->setStatus(Order::STATUS_FRAUD) + ->setBaseGrandTotal($amount) + ->setPayment($payment); + +/** @var OrderRepositoryInterface $orderRepository */ +$orderRepository = $objectManager->get(OrderRepositoryInterface::class); +$orderRepository->save($order); \ No newline at end of file From 3d58c50b37d6ee9b8a7dd633d4790f4d82a53850 Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Fri, 22 Jul 2016 19:55:00 +0300 Subject: [PATCH 02/21] MAGETWO-55671: Order status should be changed related to Kount Status - Fixed failed tests --- .../Controller/Adminhtml/Order/PaymentReviewTest.php | 8 ++------ .../testsuite/Magento/Braintree/_files/fraud_order.php | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php b/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php index e361216bd1967..22d42ce1d9aa3 100644 --- a/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php +++ b/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php @@ -8,15 +8,13 @@ use Magento\Framework\Api\FilterBuilder; use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\App\Area; +use Magento\Framework\Message\MessageInterface; +use Magento\Payment\Model\Method\Adapter; use Magento\Sales\Api\Data\OrderInterface; use Magento\Sales\Api\OrderRepositoryInterface; use Magento\Sales\Controller\Adminhtml\Order\ReviewPayment; use Magento\Sales\Model\Order; use Magento\TestFramework\TestCase\AbstractBackendController; -use Magento\Framework\Message\MessageInterface; -use Braintree\Configuration; -use Magento\Payment\Model\Method\Adapter; -use Magento\Payment\Gateway\Command\CommandPoolInterface; /** * Class PaymentReviewTest @@ -69,7 +67,6 @@ public function testExecuteAccept() $orderId = $this->order->getEntityId(); $this->dispatch('admin/sales/order/reviewPayment/action/accept/order_id/' . $orderId); - static::assertTrue($this->getResponse()->isRedirect()); static::assertRedirect(static::stringContains('sales/order/view/order_id/' . $orderId)); static::assertSessionMessages( static::equalTo(['The payment has been accepted.']), @@ -105,7 +102,6 @@ public function testExecuteDeny() $this->dispatch('admin/sales/order/reviewPayment/action/deny/order_id/' . $orderId); - static::assertTrue($this->getResponse()->isRedirect()); static::assertRedirect(static::stringContains('sales/order/view/order_id/' . $orderId)); static::assertSessionMessages( static::equalTo(['The payment has been denied.']), diff --git a/dev/tests/integration/testsuite/Magento/Braintree/_files/fraud_order.php b/dev/tests/integration/testsuite/Magento/Braintree/_files/fraud_order.php index 2e6cc3de6f9b7..ebbce2682ce45 100644 --- a/dev/tests/integration/testsuite/Magento/Braintree/_files/fraud_order.php +++ b/dev/tests/integration/testsuite/Magento/Braintree/_files/fraud_order.php @@ -35,4 +35,4 @@ /** @var OrderRepositoryInterface $orderRepository */ $orderRepository = $objectManager->get(OrderRepositoryInterface::class); -$orderRepository->save($order); \ No newline at end of file +$orderRepository->save($order); From 329813d3d780155a5360d112a0d6c664daa71267 Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Tue, 26 Jul 2016 18:12:41 +0300 Subject: [PATCH 03/21] MAGETWO-55671: Order status should be changed related to Kount Status - Fixed incorrect path for URLs --- .../Controller/Adminhtml/Order/PaymentReviewTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php b/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php index 22d42ce1d9aa3..d274784c1c8f7 100644 --- a/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php +++ b/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php @@ -65,7 +65,7 @@ protected function setUp() public function testExecuteAccept() { $orderId = $this->order->getEntityId(); - $this->dispatch('admin/sales/order/reviewPayment/action/accept/order_id/' . $orderId); + $this->dispatch('backend/sales/order/reviewPayment/action/accept/order_id/' . $orderId); static::assertRedirect(static::stringContains('sales/order/view/order_id/' . $orderId)); static::assertSessionMessages( @@ -100,7 +100,7 @@ public function testExecuteDeny() ->with($payment) ->willReturn(true); - $this->dispatch('admin/sales/order/reviewPayment/action/deny/order_id/' . $orderId); + $this->dispatch('backend/sales/order/reviewPayment/action/deny/order_id/' . $orderId); static::assertRedirect(static::stringContains('sales/order/view/order_id/' . $orderId)); static::assertSessionMessages( From e0893e74763223298b108346f7d6309b7e44f643 Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Wed, 27 Jul 2016 15:10:46 +0300 Subject: [PATCH 04/21] MAGETWO-55671: Order status should be changed related to Kount Status - Removed unnecessary __wakeup method --- app/code/Magento/Braintree/Gateway/Response/RiskDataHandler.php | 1 + .../Unit/Model/Order/Payment/State/AuthorizeCommandTest.php | 2 +- .../Test/Unit/Model/Order/Payment/State/CaptureCommandTest.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Braintree/Gateway/Response/RiskDataHandler.php b/app/code/Magento/Braintree/Gateway/Response/RiskDataHandler.php index 9f4d1cd455e3a..6cadf252e7a3b 100644 --- a/app/code/Magento/Braintree/Gateway/Response/RiskDataHandler.php +++ b/app/code/Magento/Braintree/Gateway/Response/RiskDataHandler.php @@ -68,6 +68,7 @@ public function handle(array $handlingSubject, array $response) $payment->setAdditionalInformation(self::RISK_DATA_ID, $transaction->riskData->id); $payment->setAdditionalInformation(self::RISK_DATA_DECISION, $transaction->riskData->decision); + // mark payment as fraud if ($transaction->riskData->decision === self::$statusReview) { $payment->setIsFraudDetected(true); } diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/AuthorizeCommandTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/AuthorizeCommandTest.php index a02b3498d2cc7..ae75fcb8ee2b0 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/AuthorizeCommandTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/AuthorizeCommandTest.php @@ -66,7 +66,7 @@ protected function setUp() ->getMock(); $this->order = $this->getMockBuilder(Order::class) ->disableOriginalConstructor() - ->setMethods(['getBaseCurrency', 'getConfig', 'setState', 'setStatus', '__wakeup']) + ->setMethods(['getBaseCurrency', 'getConfig', 'setState', 'setStatus']) ->getMock(); $this->order->expects(static::once()) diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/CaptureCommandTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/CaptureCommandTest.php index 9982eeab27a14..50ddfe7132564 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/CaptureCommandTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/State/CaptureCommandTest.php @@ -65,7 +65,7 @@ protected function setUp() ->getMock(); $this->order = $this->getMockBuilder(Order::class) ->disableOriginalConstructor() - ->setMethods(['getBaseCurrency', 'getConfig', 'setState', 'setStatus', '__wakeup']) + ->setMethods(['getBaseCurrency', 'getConfig', 'setState', 'setStatus']) ->getMock(); $this->order->expects(static::once()) From 832e91d8a51f0026bfc527aff5a51d4ced2eaf72 Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Wed, 27 Jul 2016 17:01:51 +0300 Subject: [PATCH 05/21] MAGETWO-55674: Create functional tests for Review Kount status - Added functional tests to cover `Accept`/`Deny` actions for Braintree payment --- .../Braintree/Test/Repository/ConfigData.xml | 8 ++ .../OnePageCheckoutAcceptPaymentTest.php | 29 +++++++ .../OnePageCheckoutAcceptPaymentTest.xml | 28 +++++++ .../OnePageCheckoutDenyPaymentTest.php | 29 +++++++ .../OnePageCheckoutDenyPaymentTest.xml | 28 +++++++ .../Test/TestStep/AcceptPaymentStep.php | 49 +++++++++++ .../ChangeOrderStatusToPaymentReviewStep.php | 81 +++++++++++++++++++ .../CreateBraintreeCreditMemoStep.php | 4 +- .../Test/TestStep/DenyPaymentStep.php | 49 +++++++++++ .../Magento/Braintree/Test/etc/testcase.xml | 30 +++++++ .../Test/Block/Adminhtml/Order/Actions.php | 39 +++++++++ ...tAcceptPaymentMessageInCommentsHistory.php | 44 ++++++++++ ...sertAcceptPaymentSuccessMessagePresent.php | 42 ++++++++++ ...ertDenyPaymentMessageInCommentsHistory.php | 43 ++++++++++ ...AssertDenyPaymentSuccessMessagePresent.php | 42 ++++++++++ 15 files changed, 542 insertions(+), 3 deletions(-) create mode 100644 dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.php create mode 100644 dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml create mode 100644 dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.php create mode 100644 dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml create mode 100644 dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/AcceptPaymentStep.php create mode 100644 dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/ChangeOrderStatusToPaymentReviewStep.php create mode 100644 dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/DenyPaymentStep.php create mode 100644 dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentMessageInCommentsHistory.php create mode 100644 dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentSuccessMessagePresent.php create mode 100644 dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentMessageInCommentsHistory.php create mode 100644 dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentSuccessMessagePresent.php diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/Repository/ConfigData.xml index fc54b91cfeed8..49b33f796dea4 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/Repository/ConfigData.xml +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/Repository/ConfigData.xml @@ -221,5 +221,13 @@ 0 + + + payment + 1 + Yes + 1 + + diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.php new file mode 100644 index 0000000000000..8e1ca26a1f4ea --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.php @@ -0,0 +1,29 @@ +executeScenario(); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml new file mode 100644 index 0000000000000..87a00cd166e4e --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml @@ -0,0 +1,28 @@ + + + + + + catalogProductSimple::product_10_dollar + default + US_address_1_without_email + login + Flat Rate + Fixed + braintree + credit_card_braintree + visa_braintree + braintree,braintree_fraudprotection + Processing + test_type:3rd_party_test + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.php new file mode 100644 index 0000000000000..b32f12fb6ca55 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.php @@ -0,0 +1,29 @@ +executeScenario(); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml new file mode 100644 index 0000000000000..c35f7c1bfdf9f --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml @@ -0,0 +1,28 @@ + + + + + + catalogProductSimple::product_10_dollar + default + US_address_1_without_email + login + Flat Rate + Fixed + braintree + credit_card_braintree + visa_braintree + braintree,braintree_fraudprotection + Canceled + test_type:3rd_party_test + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/AcceptPaymentStep.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/AcceptPaymentStep.php new file mode 100644 index 0000000000000..6565652f604cb --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/AcceptPaymentStep.php @@ -0,0 +1,49 @@ +orderIndex = $orderIndex; + $this->salesOrderView = $salesOrderView; + $this->order = $order; + } + + /** + * @inheritdoc + */ + public function run() + { + $this->orderIndex->open(); + $this->orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $this->order->getId()]); + $this->salesOrderView->getPageActions()->accept(); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/ChangeOrderStatusToPaymentReviewStep.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/ChangeOrderStatusToPaymentReviewStep.php new file mode 100644 index 0000000000000..c7d8d7ff37623 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/ChangeOrderStatusToPaymentReviewStep.php @@ -0,0 +1,81 @@ +orderId = $orderId; + $this->webApi = $webApi; + } + + /** + * @inheritdoc + */ + public function run() + { + $order = $this->getOrder($this->orderId); + $order['state'] = 'payment_review'; + $order['status'] = 'fraud'; + $this->saveOrder($order); + } + + /** + * Get order by increment id + * @param string $incrementId + * @return array + */ + private function getOrder($incrementId) + { + $url = $_ENV['app_frontend_url'] . 'rest/V1/orders/'; + $url .= '?searchCriteria[filterGroups][0][filters][0][field]=increment_id'; + $url .= '&searchCriteria[filterGroups][0][filters][0][value]=' . $incrementId; + $this->webApi->write($url, [], WebapiDecorator::GET); + $response = json_decode($this->webApi->read(), true); + $this->webApi->close(); + return $response['items'][0]; + } + + /** + * Update order entity + * @param array $order + * @throws \Exception + */ + private function saveOrder(array $order) + { + $url = $_ENV['app_frontend_url'] . 'rest/V1/orders'; + // web api doesn't allow to save payment additional information + unset($order['payment']['additional_information']); + $this->webApi->write($url, ['entity' => $order], WebapiDecorator::POST); + $response = json_decode($this->webApi->read(), true); + $this->webApi->close(); + if (empty($response['entity_id'])) { + throw new \Exception('Couldn\'t update order details'); + } + } +} diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CreateBraintreeCreditMemoStep.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CreateBraintreeCreditMemoStep.php index 61455ceaac4fd..085fc142a3373 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CreateBraintreeCreditMemoStep.php +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CreateBraintreeCreditMemoStep.php @@ -6,15 +6,13 @@ namespace Magento\Braintree\Test\TestStep; -use Magento\Config\Test\Fixture\ConfigData; use Magento\Mtf\ObjectManager; +use Magento\Mtf\TestStep\TestStepInterface; use Magento\Sales\Test\Fixture\OrderInjectable; use Magento\Sales\Test\Page\Adminhtml\OrderCreditMemoNew; use Magento\Sales\Test\Page\Adminhtml\OrderIndex; use Magento\Sales\Test\Page\Adminhtml\OrderInvoiceView; use Magento\Sales\Test\Page\Adminhtml\SalesOrderView; -use Magento\Mtf\TestStep\TestStepInterface; -use Braintree\Gateway; /** * Create credit memo for order placed via Braintree credit card payment method. diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/DenyPaymentStep.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/DenyPaymentStep.php new file mode 100644 index 0000000000000..13dc942be95d3 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/DenyPaymentStep.php @@ -0,0 +1,49 @@ +orderIndex = $orderIndex; + $this->salesOrderView = $salesOrderView; + $this->order = $order; + } + + /** + * @inheritdoc + */ + public function run() + { + $this->orderIndex->open(); + $this->orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $this->order->getId()]); + $this->salesOrderView->getPageActions()->deny(); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml index c74204270ee65..33be28b2630ac 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml @@ -130,4 +130,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php index e8a912080d5a5..d9640bffe24ae 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php @@ -8,6 +8,7 @@ use Magento\Mtf\Block\Block; use Magento\Mtf\Client\Locator; +use Magento\Ui\Test\Block\Adminhtml\Modal; /** * Order actions block. @@ -119,6 +120,18 @@ class Actions extends Block */ protected $confirmModal = '.confirm._show[data-role=modal]'; + /** + * 'Accept' payment button + * @var string + */ + private $acceptPayment = '#accept_payment'; + + /** + * 'Deny' payment button + * @var string + */ + private $denyPayment = '#deny_payment'; + /** * Ship order. * @@ -263,4 +276,30 @@ public function isActionButtonVisible($buttonName) { return $this->_rootElement->find(sprintf($this->button, $buttonName), Locator::SELECTOR_XPATH)->isVisible(); } + + /** + * Accept order + * @return void + */ + public function accept() + { + $this->_rootElement->find($this->acceptPayment)->click(); + $element = $this->browser->find($this->confirmModal); + /** @var Modal $modal */ + $modal = $this->blockFactory->create(Modal::class, ['element' => $element]); + $modal->acceptAlert(); + } + + /** + * Deny order + * @return void + */ + public function deny() + { + $this->_rootElement->find($this->denyPayment)->click(); + $element = $this->browser->find($this->confirmModal); + /** @var Modal $modal */ + $modal = $this->blockFactory->create(Modal::class, ['element' => $element]); + $modal->acceptAlert(); + } } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentMessageInCommentsHistory.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentMessageInCommentsHistory.php new file mode 100644 index 0000000000000..918764a242570 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentMessageInCommentsHistory.php @@ -0,0 +1,44 @@ +open(); + $orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $orderId]); + $history = $orderView->getOrderHistoryBlock()->getCommentsHistory(); + + \PHPUnit_Framework_Assert::assertContains(self::$message, $history); + } + + /** + * @inheritdoc + */ + public function toString() + { + return 'Message about approved payment is available in Comments History section.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentSuccessMessagePresent.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentSuccessMessagePresent.php new file mode 100644 index 0000000000000..40f4e3051af0c --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentSuccessMessagePresent.php @@ -0,0 +1,42 @@ +getMessagesBlock()->getSuccessMessage() + ); + } + + /** + * @inheritdoc + */ + public function toString() + { + return 'Success accept payment message is present.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentMessageInCommentsHistory.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentMessageInCommentsHistory.php new file mode 100644 index 0000000000000..a4f724d17cb56 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentMessageInCommentsHistory.php @@ -0,0 +1,43 @@ +open(); + $orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $orderId]); + $history = $orderView->getOrderHistoryBlock()->getCommentsHistory(); + + \PHPUnit_Framework_Assert::assertContains(self::$message, $history); + } + + /** + * @inheritdoc + */ + public function toString() + { + return 'Message about denied payment is available in Comments History section.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentSuccessMessagePresent.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentSuccessMessagePresent.php new file mode 100644 index 0000000000000..4776970fd9d32 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentSuccessMessagePresent.php @@ -0,0 +1,42 @@ +getMessagesBlock()->getSuccessMessage() + ); + } + + /** + * @inheritdoc + */ + public function toString() + { + return 'Success deny payment message is present.'; + } +} From 0abe857067a0bcc4ea52639c335f3304008cea86 Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Wed, 27 Jul 2016 17:19:20 +0300 Subject: [PATCH 06/21] MAGETWO-55674: Create functional tests for Review Kount status - Reduced count of class properties --- .../Test/Block/Adminhtml/Order/Actions.php | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php index d9640bffe24ae..b1f4fb2220066 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php @@ -120,18 +120,6 @@ class Actions extends Block */ protected $confirmModal = '.confirm._show[data-role=modal]'; - /** - * 'Accept' payment button - * @var string - */ - private $acceptPayment = '#accept_payment'; - - /** - * 'Deny' payment button - * @var string - */ - private $denyPayment = '#deny_payment'; - /** * Ship order. * @@ -283,7 +271,8 @@ public function isActionButtonVisible($buttonName) */ public function accept() { - $this->_rootElement->find($this->acceptPayment)->click(); + $acceptPayment = '#accept_payment'; + $this->_rootElement->find($acceptPayment)->click(); $element = $this->browser->find($this->confirmModal); /** @var Modal $modal */ $modal = $this->blockFactory->create(Modal::class, ['element' => $element]); @@ -296,7 +285,8 @@ public function accept() */ public function deny() { - $this->_rootElement->find($this->denyPayment)->click(); + $denyPayment = '#deny_payment'; + $this->_rootElement->find($denyPayment)->click(); $element = $this->browser->find($this->confirmModal); /** @var Modal $modal */ $modal = $this->blockFactory->create(Modal::class, ['element' => $element]); From 29c962b8eadba476f1b80052cadc078deefe09b0 Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Thu, 28 Jul 2016 10:33:02 +0300 Subject: [PATCH 07/21] MAGETWO-55674: Create functional tests for Review Kount status - Added configuration rollback fixture --- .../app/Magento/Braintree/Test/Repository/ConfigData.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/Repository/ConfigData.xml index 49b33f796dea4..7f01e4f46106c 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/Repository/ConfigData.xml +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/Repository/ConfigData.xml @@ -229,5 +229,13 @@ 1 + + + payment + 1 + No + 0 + + From 29860c467ca6df0003dac997e2c738588e60f30a Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Thu, 28 Jul 2016 14:37:10 +0300 Subject: [PATCH 08/21] MAGETWO-55674: Create functional tests for Review Kount status - Updated class descriptions - Updated variations config data --- .../Test/TestCase/OnePageCheckoutAcceptPaymentTest.php | 5 ++++- .../Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml | 4 ++-- .../Test/TestCase/OnePageCheckoutDenyPaymentTest.php | 4 +++- .../Test/TestCase/OnePageCheckoutDenyPaymentTest.xml | 4 ++-- .../Test/TestStep/ChangeOrderStatusToPaymentReviewStep.php | 3 +++ .../AssertAcceptPaymentMessageInCommentsHistory.php | 2 ++ .../Constraint/AssertAcceptPaymentSuccessMessagePresent.php | 3 +++ .../Constraint/AssertDenyPaymentMessageInCommentsHistory.php | 2 ++ .../Constraint/AssertDenyPaymentSuccessMessagePresent.php | 3 +++ 9 files changed, 24 insertions(+), 6 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.php index 8e1ca26a1f4ea..41f637d52941d 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.php +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.php @@ -9,6 +9,10 @@ /** * Class OnePageCheckoutAcceptPaymentTest + * + * This scenario places order via Braintree payment with + * enabled Advanced Fraud protection and accept payment for placed order + * to future processing */ class OnePageCheckoutAcceptPaymentTest extends Scenario { @@ -19,7 +23,6 @@ class OnePageCheckoutAcceptPaymentTest extends Scenario /** * Runs one page checkout test. - * * @return void */ public function test() diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml index 87a00cd166e4e..9b3e1d318bce1 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml @@ -10,8 +10,8 @@ catalogProductSimple::product_10_dollar default - US_address_1_without_email - login + US_address_1 + guest Flat Rate Fixed braintree diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.php index b32f12fb6ca55..69fd4a8323eca 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.php +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.php @@ -9,6 +9,9 @@ /** * Class OnePageCheckoutDenyPaymentTest + * + * This scenario places order via Braintree payment with + * enabled Advanced Fraud protection and deny payment for placed order */ class OnePageCheckoutDenyPaymentTest extends Scenario { @@ -19,7 +22,6 @@ class OnePageCheckoutDenyPaymentTest extends Scenario /** * Runs one page checkout test. - * * @return void */ public function test() diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml index c35f7c1bfdf9f..dd6b360cc604a 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml @@ -10,8 +10,8 @@ catalogProductSimple::product_10_dollar default - US_address_1_without_email - login + US_address_1 + guest Flat Rate Fixed braintree diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/ChangeOrderStatusToPaymentReviewStep.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/ChangeOrderStatusToPaymentReviewStep.php index c7d8d7ff37623..346a7e8e7e4f4 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/ChangeOrderStatusToPaymentReviewStep.php +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/ChangeOrderStatusToPaymentReviewStep.php @@ -10,6 +10,9 @@ /** * Class ChangeOrderStatusToPaymentReviewStep + * + * This step changes order status via WEB API to "Payment Review", because Kount service always + * return "Review" status for sandbox transactions. */ class ChangeOrderStatusToPaymentReviewStep implements TestStepInterface { diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentMessageInCommentsHistory.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentMessageInCommentsHistory.php index 918764a242570..1871a12ee2ce4 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentMessageInCommentsHistory.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentMessageInCommentsHistory.php @@ -11,6 +11,8 @@ /** * Class AssertAcceptPaymentMessageInCommentsHistory + * + * Constraint checks accept payment message in order comments history */ class AssertAcceptPaymentMessageInCommentsHistory extends AbstractConstraint { diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentSuccessMessagePresent.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentSuccessMessagePresent.php index 40f4e3051af0c..fefc148b8bd03 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentSuccessMessagePresent.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertAcceptPaymentSuccessMessagePresent.php @@ -10,6 +10,9 @@ /** * Class AssertAcceptPaymentSuccessMessagePresent + * + * Constraint checks success message on the order page + * after accepting order payment */ class AssertAcceptPaymentSuccessMessagePresent extends AbstractConstraint { diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentMessageInCommentsHistory.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentMessageInCommentsHistory.php index a4f724d17cb56..87cac1c38232b 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentMessageInCommentsHistory.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentMessageInCommentsHistory.php @@ -11,6 +11,8 @@ /** * Class AssertDenyPaymentMessageInCommentsHistory + * + * Constraint checks deny payment message in order comments history */ class AssertDenyPaymentMessageInCommentsHistory extends AbstractConstraint { diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentSuccessMessagePresent.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentSuccessMessagePresent.php index 4776970fd9d32..b6dbfdf1a6702 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentSuccessMessagePresent.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertDenyPaymentSuccessMessagePresent.php @@ -10,6 +10,9 @@ /** * Class AssertDenyPaymentSuccessMessagePresent + * + * Constraint checks success message on the order page + * after denying order payment */ class AssertDenyPaymentSuccessMessagePresent extends AbstractConstraint { From 369ad85dd779f44f3a98f47da9e726d763a524ce Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Fri, 29 Jul 2016 13:20:20 +0300 Subject: [PATCH 09/21] MAGETWO-55674: Create functional tests for Review Kount status - Updated fixtures --- .../Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml | 2 +- .../Test/TestCase/OnePageCheckoutDenyPaymentTest.xml | 2 +- .../tests/app/Magento/Braintree/Test/etc/testcase.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml index 9b3e1d318bce1..a982dd7313120 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml @@ -8,7 +8,7 @@ - catalogProductSimple::product_10_dollar + catalogProductSimple::product_10_dollar default US_address_1 guest diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml index dd6b360cc604a..8f8706a447c82 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml @@ -8,7 +8,7 @@ - catalogProductSimple::product_10_dollar + catalogProductSimple::product_10_dollar default US_address_1 guest diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml index 33be28b2630ac..5b1283c1fda28 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml @@ -132,7 +132,7 @@ - + @@ -147,7 +147,7 @@ - + From 2333c368c49de6dfe788420826d580cc00f3f6a4 Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Fri, 29 Jul 2016 13:26:42 +0300 Subject: [PATCH 10/21] MAGETWO-55674: Create functional tests for Review Kount status - Updated steps --- .../tests/app/Magento/Braintree/Test/etc/testcase.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml index 5b1283c1fda28..36c763b77b3de 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml @@ -131,7 +131,7 @@ - + @@ -146,7 +146,7 @@ - + From e408d480fd21aea946b03ca19a47ac3897fabba8 Mon Sep 17 00:00:00 2001 From: Roman Liukshyn Date: Fri, 29 Jul 2016 18:55:36 +0300 Subject: [PATCH 11/21] MAGETWO-55674: Create functional tests for Review Kount status - Fixes for functional tests --- .../OnePageCheckoutAcceptPaymentTest.xml | 4 +- .../OnePageCheckoutDenyPaymentTest.xml | 4 +- .../Magento/Braintree/Test/etc/testcase.xml | 50 +++++++++---------- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml index a982dd7313120..f42054b4a0732 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutAcceptPaymentTest.xml @@ -8,7 +8,9 @@ - catalogProductSimple::product_10_dollar + + catalogProductSimple::product_10_dollar + default US_address_1 guest diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml index 8f8706a447c82..45476abfdfd12 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutDenyPaymentTest.xml @@ -8,7 +8,9 @@ - catalogProductSimple::product_10_dollar + + catalogProductSimple::product_10_dollar + default US_address_1 guest diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml index 36c763b77b3de..34f4be6493838 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml @@ -131,33 +131,31 @@ - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + From 14b0d3084cada9117ed03251818a49596c9e4a5d Mon Sep 17 00:00:00 2001 From: Dmytro Yushkin Date: Mon, 1 Aug 2016 18:21:06 +0300 Subject: [PATCH 12/21] MAGETWO-55676: PayPal Payments Configuration UX/links update --- .../Braintree/etc/adminhtml/system.xml | 21 +- .../Braintree/view/adminhtml/web/styles.css | 5 +- .../Adminhtml/System/Config/Fieldset/Hint.php | 36 ++- .../System/Config/Fieldset/Payment.php | 29 +++ .../Paypal/Model/Config/StructurePlugin.php | 92 +++++-- .../System/Config/Fieldset/HintTest.php | 74 ++++++ .../Unit/Model/Config/StructurePluginTest.php | 26 +- .../Magento/Paypal/etc/adminhtml/system.xml | 244 ++++++++++-------- .../etc/adminhtml/system/express_checkout.xml | 7 +- .../etc/adminhtml/system/payflow_advanced.xml | 11 +- .../etc/adminhtml/system/payflow_link.xml | 11 +- .../system/payments_pro_hosted_solution.xml | 8 +- ..._hosted_solution_with_express_checkout.xml | 4 +- .../adminhtml/system/paypal_payflowpro.xml | 9 +- ...aypal_payflowpro_with_express_checkout.xml | 2 +- app/code/Magento/Paypal/etc/system_file.xsd | 24 ++ .../system/config/fieldset/hint.phtml | 20 -- .../adminhtml/web/images/AM_mc_vs_dc_ae.jpg | Bin 0 -> 13435 bytes .../adminhtml/web/images/pp-logo-200px.png | Bin 0 -> 6454 bytes .../adminhtml/web/images/pp-payflow-mark.png | Bin 0 -> 26788 bytes .../Paypal/view/adminhtml/web/styles.css | 17 ++ .../Reader/_files/expected/config.xml | 52 ++-- 22 files changed, 482 insertions(+), 210 deletions(-) create mode 100644 app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/HintTest.php create mode 100644 app/code/Magento/Paypal/etc/system_file.xsd create mode 100644 app/code/Magento/Paypal/view/adminhtml/web/images/AM_mc_vs_dc_ae.jpg create mode 100644 app/code/Magento/Paypal/view/adminhtml/web/images/pp-logo-200px.png create mode 100644 app/code/Magento/Paypal/view/adminhtml/web/images/pp-payflow-mark.png diff --git a/app/code/Magento/Braintree/etc/adminhtml/system.xml b/app/code/Magento/Braintree/etc/adminhtml/system.xml index 28f4455b0d28c..4c5d339df9629 100644 --- a/app/code/Magento/Braintree/etc/adminhtml/system.xml +++ b/app/code/Magento/Braintree/etc/adminhtml/system.xml @@ -5,20 +5,16 @@ * See COPYING.txt for license details. */ --> - +
- - - - 1 - complex braintree-section - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - - + + + + No setup or monthly fees and your customers never leave your store to complete the purchase.]]> + complex braintree-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment payment/braintree/active - https://articles.braintreepayments.com/guides/magento/configuration Magento\Config\Model\Config\Source\Yesno @@ -43,8 +39,11 @@ + + http://docs.magento.com/m2/ce/user_guide/payment/braintree.html + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint + - Click here to login to your existing Braintree account. Or to setup a new account and accept payments on your website, click here to signup for a Braintree account.

Powered by Braintree v.zero with Hosted Fields latest technology. Hosted Fields are small, transparent iframes that replace the sensitive credit card inputs in your checkout flow - helping you meet the latest data security requirements while ensuring your customization doesn't suffer. Find out more.]]>
1 Magento\Config\Block\System\Config\Form\Fieldset diff --git a/app/code/Magento/Braintree/view/adminhtml/web/styles.css b/app/code/Magento/Braintree/view/adminhtml/web/styles.css index c0d8822e779d4..31f48cd0b28df 100644 --- a/app/code/Magento/Braintree/view/adminhtml/web/styles.css +++ b/app/code/Magento/Braintree/view/adminhtml/web/styles.css @@ -3,5 +3,6 @@ * See COPYING.txt for license details. */ -.braintree-section .entry-edit-head > .config-heading .heading strong {padding-left:150px;background:url(images/braintree_logo.png) no-repeat 0 0 / 145px auto;line-height:36px;} -.braintree-section .entry-edit-head > .config-heading:before {background: url("images/braintree_allinone.png") no-repeat 0 0 / 100% auto;content: "";display: inline;float: right;height: 35px;width: 280px;} +.braintree-section .heading {display: inline-block; background: url("images/braintree_logo.png") no-repeat 0 50% / 18rem auto; padding-left: 20rem;} +.braintree-section .button-container {display: inline-block; float: right;} +.braintree-section .config-alt {background: url("images/braintree_allinone.png") no-repeat scroll 0 0 / 100% auto; height: 28px; margin: 0.5rem 0 0; width: 230px;} \ No newline at end of file diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php index 0a3de4115b24a..d1fb33e902f85 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php @@ -3,34 +3,42 @@ * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - namespace Magento\Paypal\Block\Adminhtml\System\Config\Fieldset; +use Magento\Backend\Block\Template; +use Magento\Framework\Data\Form\Element\AbstractElement; +use Magento\Framework\Data\Form\Element\Renderer\RendererInterface; + /** - * Renderer for PayPal banner in System Configuration - * @author Magento Core Team + * Class Hint adds "Configuration Details" link to payment configuration. + * `` node must be defined in `` node and contain some link. */ -class Hint extends \Magento\Backend\Block\Template implements \Magento\Framework\Data\Form\Element\Renderer\RendererInterface +class Hint extends Template implements RendererInterface { /** * @var string + * @deprecated */ protected $_template = 'Magento_Paypal::system/config/fieldset/hint.phtml'; /** - * Render fieldset html - * - * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * @param AbstractElement $element * @return string */ - public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) + public function render(AbstractElement $element) { - $elementOriginalData = $element->getOriginalData(); - if (isset($elementOriginalData['help_link'])) { - $this->setHelpLink($elementOriginalData['help_link']); + $html = ''; + + if ($element->getComment()) { + $html .= sprintf('', $element->getHtmlId()); + $html .= '

'; + $html .= sprintf( + 'Configuration Details', + $element->getComment() + ); + $html .= '

'; } - return $this->toHtml(); + + return $html; } } diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php index d49403f94ebe1..4c423dbae528e 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php @@ -87,6 +87,7 @@ protected function _getHeaderTitleHtml($element) if ($element->getComment()) { $html .= '' . $element->getComment() . ''; } + $html .= '
'; $html .= ''; $disabledAttributeString = $this->_isPaymentEnabled($element) ? '' : ' disabled="disabled"'; @@ -149,4 +150,32 @@ protected function _isCollapseState($element) { return false; } + + /** + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * @return string + */ + protected function _getExtraJs($element) + { + $script = "require(['jquery', 'prototype'], function(jQuery){ + window.paypalToggleSolution = function (id, url) { + var doScroll = false; + Fieldset.toggleCollapse(id, url); + if ($(this).hasClassName(\"open\")) { + $$(\".with-button button.button\").each(function(anotherButton) { + if (anotherButton != this && $(anotherButton).hasClassName(\"open\")) { + $(anotherButton).click(); + doScroll = true; + } + }.bind(this)); + } + if (doScroll) { + var pos = Element.cumulativeOffset($(this)); + window.scrollTo(pos[0], pos[1] - 45); + } + } + });"; + + return $this->_jsHelper->getScript($script); + } } diff --git a/app/code/Magento/Paypal/Model/Config/StructurePlugin.php b/app/code/Magento/Paypal/Model/Config/StructurePlugin.php index 2767e438d50c0..ad451de7f9b95 100644 --- a/app/code/Magento/Paypal/Model/Config/StructurePlugin.php +++ b/app/code/Magento/Paypal/Model/Config/StructurePlugin.php @@ -5,6 +5,12 @@ */ namespace Magento\Paypal\Model\Config; +use Magento\Config\Model\Config\ScopeDefiner; +use Magento\Config\Model\Config\Structure; +use Magento\Config\Model\Config\Structure\Element\Section; +use Magento\Config\Model\Config\Structure\ElementInterface; +use Magento\Paypal\Helper\Backend as BackendHelper; + class StructurePlugin { /** @@ -13,12 +19,12 @@ class StructurePlugin const REQUEST_PARAM_COUNTRY = 'paypal_country'; /** - * @var \Magento\Paypal\Helper\Backend + * @var BackendHelper */ protected $_helper; /** - * @var \Magento\Config\Model\Config\ScopeDefiner + * @var ScopeDefiner */ protected $_scopeDefiner; @@ -40,12 +46,12 @@ class StructurePlugin ]; /** - * @param \Magento\Config\Model\Config\ScopeDefiner $scopeDefiner - * @param \Magento\Paypal\Helper\Backend $helper + * @param ScopeDefiner $scopeDefiner + * @param BackendHelper $helper */ public function __construct( - \Magento\Config\Model\Config\ScopeDefiner $scopeDefiner, - \Magento\Paypal\Helper\Backend $helper + ScopeDefiner $scopeDefiner, + BackendHelper $helper ) { $this->_scopeDefiner = $scopeDefiner; $this->_helper = $helper; @@ -69,14 +75,14 @@ public static function getPaypalConfigCountries($addOther = false) /** * Substitute payment section with PayPal configs * - * @param \Magento\Config\Model\Config\Structure $subject + * @param Structure $subject * @param \Closure $proceed * @param array $pathParts - * @return \Magento\Config\Model\Config\Structure\ElementInterface + * @return ElementInterface * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundGetElementByPathParts( - \Magento\Config\Model\Config\Structure $subject, + Structure $subject, \Closure $proceed, array $pathParts ) { @@ -89,16 +95,72 @@ public function aroundGetElementByPathParts( $pathParts[0] = 'payment_other'; } } - /** @var \Magento\Config\Model\Config\Structure\ElementInterface $result */ + /** @var ElementInterface $result */ $result = $proceed($pathParts); if ($isSectionChanged && isset($result)) { - if ($result instanceof \Magento\Config\Model\Config\Structure\Element\Section) { - $result->setData(array_merge( - $result->getData(), - ['showInDefault' => true, 'showInWebsite' => true, 'showInStore' => true] - ), $this->_scopeDefiner->getScope()); + if ($result instanceof Section) { + $this->restructurePayments($result); + $result->setData( + array_merge( + $result->getData(), + ['showInDefault' => true, 'showInWebsite' => true, 'showInStore' => true] + ), $this->_scopeDefiner->getScope() + ); } } return $result; } + + /** + * @param Section $result + * @return void + */ + private function restructurePayments(Section $result) + { + $sectionMap = [ + 'account' => [], + 'recommended_solutions' => [], + 'other_paypal_payment_solutions' => [], + 'other_payment_methods' => [] + ]; + + $configuration = $result->getData(); + + foreach ($configuration['children'] as $section => $data) { + if (array_key_exists($section, $sectionMap)) { + $sectionMap[$section] = $data; + } elseif ($displayIn = $this->getDisplayInSection($section, $data)) { + $sectionMap[$displayIn['parent']]['children'][$displayIn['section']] = $displayIn['data']; + } else { + $sectionMap['other_payment_methods']['children'][$section] = $data; + } + } + + $configuration['children'] = $sectionMap; + $result->setData($configuration, $this->_scopeDefiner->getScope()); + } + + /** + * @param string $section + * @param array $data + * @return array|null + */ + private function getDisplayInSection($section, $data) + { + if (is_array($data) && array_key_exists('displayIn', $data)) { + return [ + 'parent' => $data['displayIn'], + 'section' => $section, + 'data' => $data + ]; + } + + if (array_key_exists('children', $data)) { + foreach ($data['children'] as $childSection => $childData) { + return $this->getDisplayInSection($childSection, $childData); + } + } + + return null; + } } diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/HintTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/HintTest.php new file mode 100644 index 0000000000000..944a134f088e4 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/HintTest.php @@ -0,0 +1,74 @@ +element = $this->getMockBuilder(AbstractElement::class) + ->setMethods(['getComment', 'getHtmlId']) + ->disableOriginalConstructor() + ->getMockForAbstractClass(); + + $this->block = $om->getObject(Hint::class); + } + + /** + * @covers Hint::render + */ + public function testRender() + { + $expected = '

'; + $expected .= 'Configuration Details'; + $expected .= '

'; + + $this->element->expects(static::exactly(2)) + ->method('getComment') + ->willReturn('http://test.com'); + + $this->element->expects(static::once()) + ->method('getHtmlId') + ->willReturn('payment'); + + static::assertSame($expected, $this->block->render($this->element)); + } + + /** + * @covers Hint::render + */ + public function testRenderEmptyComment() + { + $this->element->expects(static::once()) + ->method('getComment') + ->willReturn(''); + + $this->element->expects(static::never()) + ->method('getHtmlId'); + + static::assertSame('', $this->block->render($this->element)); + } +} diff --git a/app/code/Magento/Paypal/Test/Unit/Model/Config/StructurePluginTest.php b/app/code/Magento/Paypal/Test/Unit/Model/Config/StructurePluginTest.php index 4e1c6c8955ba8..4479f0a123351 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/Config/StructurePluginTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/Config/StructurePluginTest.php @@ -136,15 +136,31 @@ public function testAroundGetSectionByPathParts($pathParts, $countryCode, $expec $getElementByPathParts = function ($pathParts) use ($self, $expectedPathParts, $result) { $self->assertEquals($expectedPathParts, $pathParts); $scope = 'any scope'; - $self->_scopeDefiner->expects($self->once()) + $sectionMap = [ + 'account' => [], + 'recommended_solutions' => [], + 'other_paypal_payment_solutions' => [], + 'other_payment_methods' => [] + ]; + $self->_scopeDefiner->expects($self->any()) ->method('getScope') ->will($self->returnValue($scope)); - $result->expects($self->once()) + $result->expects($self->at(0)) ->method('getData') - ->will($self->returnValue([])); - $result->expects($self->once()) + ->will($self->returnValue(['children' => []])); + $result->expects($self->at(2)) + ->method('getData') + ->will($self->returnValue(['children' => $sectionMap])); + $result->expects($self->at(1)) + ->method('setData') + ->with(['children' => $sectionMap], $scope) + ->will($self->returnSelf()); + $result->expects($self->at(3)) ->method('setData') - ->with(['showInDefault' => true, 'showInWebsite' => true, 'showInStore' => true], $scope) + ->with(['children' => $sectionMap, + 'showInDefault' => true, + 'showInWebsite' => true, + 'showInStore' => true], $scope) ->will($self->returnSelf()); return $result; }; diff --git a/app/code/Magento/Paypal/etc/adminhtml/system.xml b/app/code/Magento/Paypal/etc/adminhtml/system.xml index 4fdee80a457bc..9b085ac2b0ca9 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system.xml @@ -5,13 +5,9 @@ * See COPYING.txt for license details. */ --> - +
- - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint - https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded @@ -24,6 +20,21 @@ paypal/general/merchant_country + + + paypal-top-section paypal-recommended-header + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + + + + paypal-top-section paypal-other-header + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + + + + paypal-top-section payments-other-header + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded +
@@ -38,21 +49,31 @@
-
- - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group +
+ + + + complex paypal-express-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment + Add another payment method to your existing solution or as a stand-alone option. + https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content + 0 + payment/paypal_express/active + payment/payflow_express/active + + + + + complex paypal-other-section paypal-all-in-one-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded Choose a secure bundled payment solution for your business. - https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup - + payment/paypal_payment_pro/active - https://www.paypal.com/us/webapps/mpp/paypal-payments-pro?partner_id=NB9WWHYEMVUMS + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-pro.html + 0 @@ -70,6 +91,9 @@ Accept credit card and PayPal payments securely. payment/wps_express/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-standard.html + @@ -88,42 +112,37 @@ - - - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - Process payments using your own internet merchant account. - https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content + + + complex paypal-other-section paypal-gateways-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded - - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - Add another payment method to your existing solution or as a stand-alone option. - https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content - - 0 - payment/paypal_express/active - payment/payflow_express/active - -
- - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group + + + + complex paypal-express-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment + Add another payment method to your existing solution or as a stand-alone option. + https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content + + + + + + + + + complex paypal-other-section paypal-all-in-one-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded Choose a secure bundled payment solution for your business. https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup pp-general-uk - https://www.paypal-business.co.uk/process-online-payments-with-paypal/index.htm http://www.youtube.com/watch?v=LBe-TW87eGI&list=PLF18B1094ABCD7CE8&index=1&feature=plpp_video Accept payments with a completely customizable checkout page. @@ -137,6 +156,9 @@ Accept credit card and PayPal payments securely. payment/wps_express/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-standard.html + @@ -155,31 +177,15 @@ - - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - Add another payment method to your existing solution or as a stand-alone option. - https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content - - - - - - -
- - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - Add another payment method to your existing solution or as a stand-alone option. - https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup - + + + + complex paypal-express-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment + Add another payment method to your existing solution or as a stand-alone option. + https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup @@ -194,17 +200,33 @@
- - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group + + + complex paypal-express-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment Add another payment method to your existing solution or as a stand-alone option. https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup - + + + + + + + + complex paypal-other-section paypal-all-in-one-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + Choose a secure bundled payment solution for your business. + https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + + complex + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment Accept credit card and PayPal payments securely. payment/wps_express/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-standard.html + @@ -222,21 +244,33 @@ - - - - - - + + + + complex paypal-other-section paypal-gateways-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + Process payments using your own internet merchant account. + https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content
- + + payment/paypal_express/active + payment/payflow_express/active + + - + + + complex paypal-other-section paypal-gateways-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + + payment/paypal_payment_pro/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-pro.html + @@ -254,76 +288,76 @@ - - + + - - payment/paypal_express/active - payment/payflow_express/active -
- - - + + + + + + -
- + + -
- + + -
- + + -
- + + -
- + + -
- - - - + + + + + +
diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml b/app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml index 8972bcbc5def5..c7da1959ec257 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml @@ -9,10 +9,13 @@ Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment - pp-method-express + paypal-other-section Add PayPal as an additional payment method to your checkout page. payment/paypal_express/active - https://www.paypal.com/webapps/mpp/referral/paypal-express-checkout?partner_id=NB9WWHYEMVUMS + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-express-checkout.html + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/payflow_advanced.xml b/app/code/Magento/Paypal/etc/adminhtml/system/payflow_advanced.xml index fdb3d0e08df73..a99ce1df4521c 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/payflow_advanced.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/payflow_advanced.xml @@ -7,12 +7,15 @@ --> - - pp-method-general + + paypal-other-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment - https://www.paypal.com/webapps/mpp/referral/paypal-payments-advanced?partner_id=NB9WWHYEMVUMS - Accept payments with a PCI-compliant checkout that keeps customers on your site. + Includes Express Checkout)]]> payment/payflow_advanced/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-advanced.html + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/payflow_link.xml b/app/code/Magento/Paypal/etc/adminhtml/system/payflow_link.xml index f6f2829b11424..45d7d1c488273 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/payflow_link.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/payflow_link.xml @@ -7,12 +7,15 @@ --> - + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment - pp-method-payflow - Connect your merchant account with a PCI-compliant gateway that lets customers pay without leaving your site. + paypal-other-section + Includes Express Checkout)]]> payment/payflow_link/active - https://www.paypal.com/webapps/mpp/referral/paypal-payflow-link?partner_id=NB9WWHYEMVUMS + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payflow-link.html + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution.xml b/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution.xml index 2f92c17c142aa..b4768736e17c3 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution.xml @@ -8,11 +8,15 @@ - pp-method-general + paypal-other-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment payment/hosted_pro/active - Accept payments with a PCI compliant checkout that keeps customers on your site. + Includes Express Checkout)]]> 1 + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-pro.html + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution_with_express_checkout.xml b/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution_with_express_checkout.xml index 570d09201ff1e..d86212ed34e8c 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution_with_express_checkout.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution_with_express_checkout.xml @@ -7,9 +7,7 @@ --> - - pp-general-uk - https://cms.paypal.com/cms_content/GB/en_GB/files/developer/HostedSolution.pdf + 0 diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro.xml b/app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro.xml index 2150d5dcb392b..85640d113cf70 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro.xml @@ -9,11 +9,14 @@ Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment - pp-method-payflow - Connect your merchant account with a fully customizable gateway that lets customers pay without leaving your site. + paypal-other-section + Includes Express Checkout)]]> payment/payflowpro/active - https://www.paypal.com/webapps/mpp/payflow-payment-gateway?partner_id=NB9WWHYEMVUMS 1 + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payflow-pro.html + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro_with_express_checkout.xml b/app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro_with_express_checkout.xml index d347ecd9c532a..3e8b6d0ef47ca 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro_with_express_checkout.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro_with_express_checkout.xml @@ -7,7 +7,7 @@ --> - + 0 diff --git a/app/code/Magento/Paypal/etc/system_file.xsd b/app/code/Magento/Paypal/etc/system_file.xsd new file mode 100644 index 0000000000000..f1eb8799b8fd0 --- /dev/null +++ b/app/code/Magento/Paypal/etc/system_file.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/fieldset/hint.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/fieldset/hint.phtml index 0258bcc0f4e2d..148d8f8a4c3fc 100644 --- a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/fieldset/hint.phtml +++ b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/fieldset/hint.phtml @@ -23,23 +23,3 @@ if ($helpLink): - diff --git a/app/code/Magento/Paypal/view/adminhtml/web/images/AM_mc_vs_dc_ae.jpg b/app/code/Magento/Paypal/view/adminhtml/web/images/AM_mc_vs_dc_ae.jpg new file mode 100644 index 0000000000000000000000000000000000000000..962e7d36b6c16ac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dlg$=6gz8Hp}~h%y9PUZN&F38&bC^xU!*4H@wqmyRkQAt zU)>bf;Ez{|yNRbs^X)Tp=KDhJalDQ8^nKCLQiX^52*oAor-XfeZ9U<46xp7*qI#_M ztUhFp5Pzm(YbxWtTV0GiIk7iAYHX#t0H9uzQ(vZ{BVu*w(f5$gmr>l7Wme>Dc)gfb zAG}6*i;KB5hk7pJL^Ub##QkbDB3-j)oep+?I)rR4_L+b2yDf0beiw#n=JWx`F!!*e zOtdHOw1o%gT^HB;hG=7o%+G<&U+1!U=YqY_3?(o|^PbljCh$lZo@x_=TAy`eOR1`4 zH-F`#n&eKJ)Sw!4Se*9SKZ^( z+Ut@%=7Rx$YstPP75Hrbp}x7&^|Z&P2vp&vf)GU8_pf;&NtcpHMLrSS25C`Ae8J%E zD~}b0V+|lHWTvNjR~g{~4%-XuyF{lNIs`g>M?QM-XK&vM>5P*-yQdb~SU#~?Vvfj~ z|3R8OxUwYaZF%x3+r4k;IE}YsQ~q3Fe?4^e@g?>vY{_>6)MA$X)vtk5Inr8(XXI!+p039P!x;TgM~qOxuTUjT-%&!5_G?AG;;(v+|DGpZ=c9h~Z~sE+vv zIQ*;Dy8`;(4rUg-+-?zott$X;5=VHdR{GwlYCOywFWG5v_TE%@WznF6`|57HnEW5P CE?n{e literal 0 HcmV?d00001 diff --git a/app/code/Magento/Paypal/view/adminhtml/web/images/pp-logo-200px.png b/app/code/Magento/Paypal/view/adminhtml/web/images/pp-logo-200px.png new file mode 100644 index 0000000000000000000000000000000000000000..780c84f6c563dc322932985cd46e363b90b7fe5e GIT binary patch literal 6454 zcmb7J2{@E%*f#bpLPV5l&Tz7fnXwGUI*dg2rKFNEJ7#HSFsN*uW6c`pP$H>xQm5=$ zN-A2A{-`XWq7oq#Dg2+Ybkte?e=f}Tz3=nf@AE$IbKmcCUE*DwY}biz66fRNTW7Ze z>jr$^1%CBJg@M2Sv(6UF$0wme_3+|&IXa;644Mv(!0;pLaA{0no{!Jeg3H9=1Be{3 zACX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_X`T{d-h%bLb1f1&vIYMUm3Nz6h1mXOT$WzP264-Fi7)%OJ3N*SpFLl2;{!w>vp}XKZ=Z4bVUS|MV<{rna^AE ztrcE5ab0s>brxVz_*ns03Acqx9{#nXY5aj$_n+p+ue!Lgx)SNXZT5A9Ao&pc+?c63 z?cZ1+weqWfKL)b9pIUEbrI}{>zJi2J{y)WmK*y=SR>YtCwzoQ&KtOg;T_op3%zwXh z+6SBr+3q_Jfkmz=S0c%?L;+H#de7|G=XAMotI5N#B z2z^W-!E^5?)hzx1A=r%kigMD_FW$a#X6#1-N-e+h5E3U3aOnZUw!GStB3YAn{}0?{ BsptRz literal 0 HcmV?d00001 diff --git a/app/code/Magento/Paypal/view/adminhtml/web/styles.css b/app/code/Magento/Paypal/view/adminhtml/web/styles.css index d97033bd388d2..511623e1f596c 100644 --- a/app/code/Magento/Paypal/view/adminhtml/web/styles.css +++ b/app/code/Magento/Paypal/view/adminhtml/web/styles.css @@ -14,3 +14,20 @@ .payflow-settings-notice { border:1px solid #d1d0ce;padding:0 10px;margin: 0;} .payflow-settings-notice .important-label {color:#f00;} .payflow-settings-notice ul.options-list {list-style:disc;padding:0 2em;} +.paypal-express-section .heading {display: inline-block; background: url("images/pp-logo-200px.png") no-repeat 0 50% / 18rem auto; padding-left: 20rem;} +.paypal-express-section .button-container {display: inline-block; float: right;} +.paypal-express-section .config-alt {background: url("images/pp-alt.png") no-repeat; height: 26px; margin: 0.5rem 0 0; width: 158px;} +.paypal-express-section .link-more {margin-left: 5px;} +.paypal-other-section .heading {display: inline-block;} +.paypal-other-section .button-container {display: inline-block; float: right; margin: 1rem 0 0 !important;} +.paypal-other-section > .entry-edit-head > a::before {left: auto !important; right: 1.3rem !important;} +.paypal-all-in-one-section > .entry-edit-head {background: url("images/AM_mc_vs_dc_ae.jpg") no-repeat scroll 0 50% / 18rem auto; padding-left: 18rem;} +.paypal-gateways-section > .entry-edit-head {background: url("images/pp-payflow-mark.png") no-repeat scroll 0 50% / 18rem auto; padding-left: 18rem;} +.paypal-top-section > .entry-edit-head.admin__collapsible-block {border-bottom: 0;} +.paypal-top-section.active > .entry-edit-head.admin__collapsible-block {border-bottom: 1px solid #ccc;} +.paypal-top-section > .admin__collapsible-block > a {font-size: 1.4rem; font-weight: normal; text-transform: uppercase;} +.paypal-recommended-header > .admin__collapsible-block > a::before {content: "" !important;} +.paypal-other-header > .admin__collapsible-block > a.open::before {content: "\25B2" !important;} +.paypal-other-header > .admin__collapsible-block > a::before {color: #000; content: "\25BC" !important; font-size: 1rem; top: 2.2rem;} +.paypal-other-header > .admin__collapsible-block > a {color: #007bdb !important; text-align: right;} +.payments-other-header > .admin__collapsible-block > a::before {content: "" !important;} \ No newline at end of file diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/expected/config.xml b/dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/expected/config.xml index 61d9f6f2a475c..e4187754b44da 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/expected/config.xml +++ b/dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/expected/config.xml @@ -29,11 +29,14 @@ Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment - pp-method-payflow - Connect your merchant account with a fully customizable gateway that lets customers pay without leaving your site. + paypal-other-section + Includes Express Checkout)]]> payment/payflowpro/active - https://www.paypal.com/webapps/mpp/payflow-payment-gateway?partner_id=NB9WWHYEMVUMS 1 + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payflow-pro.html + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded @@ -234,12 +237,15 @@ - + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment - pp-method-payflow - Connect your merchant account with a PCI-compliant gateway that lets customers pay without leaving your site. + paypal-other-section + Includes Express Checkout)]]> payment/payflow_link/active - https://www.paypal.com/webapps/mpp/referral/paypal-payflow-link?partner_id=NB9WWHYEMVUMS + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payflow-link.html + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded @@ -562,10 +568,13 @@ Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment - pp-method-express + paypal-other-section Add PayPal as an additional payment method to your checkout page. payment/paypal_express/active - https://www.paypal.com/webapps/mpp/referral/paypal-express-checkout?partner_id=NB9WWHYEMVUMS + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-express-checkout.html + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded @@ -1200,11 +1209,15 @@ - pp-method-general + paypal-other-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment payment/hosted_pro/active - Accept payments with a PCI compliant checkout that keeps customers on your site. + Includes Express Checkout)]]> 1 + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-pro.html + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded @@ -1421,12 +1434,15 @@ Choose a secure bundled payment solution for your business. https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup - - pp-method-general + + paypal-other-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment - https://www.paypal.com/webapps/mpp/referral/paypal-payments-advanced?partner_id=NB9WWHYEMVUMS - Accept payments with a PCI-compliant checkout that keeps customers on your site. + Includes Express Checkout)]]> payment/payflow_advanced/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-advanced.html + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded @@ -1777,7 +1793,7 @@ Process payments using your own internet merchant account. https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content - + 0 @@ -2039,9 +2055,7 @@ - - pp-general-uk - https://cms.paypal.com/cms_content/GB/en_GB/files/developer/HostedSolution.pdf + 0 From e44cf989222094d8b44b06c95ea5658ff0914ae7 Mon Sep 17 00:00:00 2001 From: Dmytro Yushkin Date: Tue, 2 Aug 2016 16:19:56 +0300 Subject: [PATCH 13/21] MAGETWO-55676: PayPal Payments Configuration UX/links update - Use 'attribute' element instead of attribute - Fixed by code style test --- .../Braintree/etc/adminhtml/system.xml | 5 ++-- .../System/Config/Fieldset/Payment.php | 1 + .../Paypal/Model/Config/StructurePlugin.php | 10 +++---- .../Magento/Paypal/etc/adminhtml/system.xml | 29 ++++++++++++------- app/code/Magento/Paypal/etc/system_file.xsd | 24 --------------- 5 files changed, 27 insertions(+), 42 deletions(-) delete mode 100644 app/code/Magento/Paypal/etc/system_file.xsd diff --git a/app/code/Magento/Braintree/etc/adminhtml/system.xml b/app/code/Magento/Braintree/etc/adminhtml/system.xml index 4c5d339df9629..9c11a4a06e971 100644 --- a/app/code/Magento/Braintree/etc/adminhtml/system.xml +++ b/app/code/Magento/Braintree/etc/adminhtml/system.xml @@ -5,16 +5,17 @@ * See COPYING.txt for license details. */ --> - +

- + No setup or monthly fees and your customers never leave your store to complete the purchase.]]> complex braintree-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment payment/braintree/active + recommended_solutions Magento\Config\Model\Config\Source\Yesno diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php index 4c423dbae528e..4abe12cbc3715 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php @@ -154,6 +154,7 @@ protected function _isCollapseState($element) /** * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _getExtraJs($element) { diff --git a/app/code/Magento/Paypal/Model/Config/StructurePlugin.php b/app/code/Magento/Paypal/Model/Config/StructurePlugin.php index ad451de7f9b95..768802fa1b0b6 100644 --- a/app/code/Magento/Paypal/Model/Config/StructurePlugin.php +++ b/app/code/Magento/Paypal/Model/Config/StructurePlugin.php @@ -100,12 +100,10 @@ public function aroundGetElementByPathParts( if ($isSectionChanged && isset($result)) { if ($result instanceof Section) { $this->restructurePayments($result); - $result->setData( - array_merge( - $result->getData(), - ['showInDefault' => true, 'showInWebsite' => true, 'showInStore' => true] - ), $this->_scopeDefiner->getScope() - ); + $result->setData(array_merge( + $result->getData(), + ['showInDefault' => true, 'showInWebsite' => true, 'showInStore' => true] + ), $this->_scopeDefiner->getScope()); } } return $result; diff --git a/app/code/Magento/Paypal/etc/adminhtml/system.xml b/app/code/Magento/Paypal/etc/adminhtml/system.xml index 9b085ac2b0ca9..666c7064c735a 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - +
@@ -51,7 +51,7 @@
- + complex paypal-express-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment @@ -60,13 +60,15 @@ 0 payment/paypal_express/active payment/payflow_express/active + recommended_solutions - + ]]> complex paypal-other-section paypal-all-in-one-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded Choose a secure bundled payment solution for your business. + other_paypal_payment_solutions @@ -112,22 +114,24 @@ - + complex paypal-other-section paypal-gateways-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + other_paypal_payment_solutions
- + complex paypal-express-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment Add another payment method to your existing solution or as a stand-alone option. https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content + recommended_solutions @@ -135,12 +139,13 @@ - + complex paypal-other-section paypal-all-in-one-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded Choose a secure bundled payment solution for your business. https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + other_paypal_payment_solutions pp-general-uk http://www.youtube.com/watch?v=LBe-TW87eGI&list=PLF18B1094ABCD7CE8&index=1&feature=plpp_video @@ -180,12 +185,13 @@
- + complex paypal-express-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment Add another payment method to your existing solution or as a stand-alone option. https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + recommended_solutions @@ -200,24 +206,26 @@
- + complex paypal-express-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment Add another payment method to your existing solution or as a stand-alone option. https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + recommended_solutions - + complex paypal-other-section paypal-all-in-one-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded Choose a secure bundled payment solution for your business. https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + other_paypal_payment_solutions complex @@ -245,12 +253,13 @@ - + complex paypal-other-section paypal-gateways-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded Process payments using your own internet merchant account. https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content + other_paypal_payment_solutions
diff --git a/app/code/Magento/Paypal/etc/system_file.xsd b/app/code/Magento/Paypal/etc/system_file.xsd deleted file mode 100644 index f1eb8799b8fd0..0000000000000 --- a/app/code/Magento/Paypal/etc/system_file.xsd +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file From c01f70b28883723e7c2405351e8198508a248db4 Mon Sep 17 00:00:00 2001 From: Dmytro Yushkin Date: Tue, 2 Aug 2016 17:35:07 +0300 Subject: [PATCH 14/21] MAGETWO-55676: PayPal Payments Configuration UX/links update - Fixed unit test annotation --- .../Unit/Block/Adminhtml/System/Config/Fieldset/HintTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/HintTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/HintTest.php index 944a134f088e4..5d639afb9c346 100644 --- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/HintTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/HintTest.php @@ -38,7 +38,7 @@ protected function setUp() } /** - * @covers Hint::render + * @covers \Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint::render */ public function testRender() { @@ -58,7 +58,7 @@ public function testRender() } /** - * @covers Hint::render + * @covers \Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint::render */ public function testRenderEmptyComment() { From 9a9b821dccb8eb5939bd71bef5fd6fff2b8d8f08 Mon Sep 17 00:00:00 2001 From: Dmytro Yushkin Date: Wed, 3 Aug 2016 12:32:25 +0300 Subject: [PATCH 15/21] MAGETWO-55676: PayPal Payments Configuration UX/links update - Added methods annotation --- app/code/Magento/Paypal/Model/Config/StructurePlugin.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/code/Magento/Paypal/Model/Config/StructurePlugin.php b/app/code/Magento/Paypal/Model/Config/StructurePlugin.php index 768802fa1b0b6..52f46a8411c02 100644 --- a/app/code/Magento/Paypal/Model/Config/StructurePlugin.php +++ b/app/code/Magento/Paypal/Model/Config/StructurePlugin.php @@ -110,6 +110,10 @@ public function aroundGetElementByPathParts( } /** + * Changes payment config structure. + * Groups which have `displayIn` element, transfer to appropriate group. + * Groups without `displayIn` transfer to other payment methods group. + * * @param Section $result * @return void */ @@ -139,6 +143,8 @@ private function restructurePayments(Section $result) } /** + * Recursive search of `displayIn` element in node children + * * @param string $section * @param array $data * @return array|null From eafc1856dafa08de11289bcd38219a80c998054a Mon Sep 17 00:00:00 2001 From: Roman Liukshyn Date: Wed, 3 Aug 2016 13:37:42 +0300 Subject: [PATCH 16/21] MAGETWO-55680: Create functional tests --- .../Test/Block/System/Config/Payments.php | 124 ++++++++++++++ .../SystemConfigEditSectionPayment.xml | 16 ++ .../Test/Block/System/Config/Braintree.php | 107 ++++++++++++ .../BraintreeSettlementReport.xml | 0 .../SalesOrderView.xml | 0 .../SystemConfigEditSectionPayment.xml | 12 ++ .../TestStep/CheckBraintreeConfigStep.php | 133 +++++++++++++++ .../Test/Constraint/AssertFieldsAreActive.php | 44 +++++ .../Constraint/AssertFieldsAreDisabled.php | 44 +++++ .../Constraint/AssertFieldsAreEnabled.php | 44 +++++ .../Constraint/AssertFieldsArePresent.php | 44 +++++ .../Test/TestCase/ConflictResolutionTest.php | 26 +++ .../Test/TestCase/ConflictResolutionTest.xml | 46 ++++++ .../Block/System/Config/ExpressCheckout.php | 130 +++++++++++++++ .../Test/Block/System/Config/PayflowLink.php | 122 ++++++++++++++ .../Test/Block/System/Config/PayflowPro.php | 122 ++++++++++++++ .../Block/System/Config/PaymentsAdvanced.php | 116 +++++++++++++ .../Test/Block/System/Config/PaymentsPro.php | 122 ++++++++++++++ .../SystemConfigEditSectionPayment.xml | 16 ++ .../Test/TestStep/CheckExpressConfigStep.php | 147 +++++++++++++++++ .../TestStep/CheckPayflowLinkConfigStep.php | 154 ++++++++++++++++++ .../TestStep/CheckPayflowProConfigStep.php | 153 +++++++++++++++++ .../CheckPaymentsAdvancedConfigStep.php | 143 ++++++++++++++++ .../TestStep/CheckPaymentsProConfigStep.php | 154 ++++++++++++++++++ .../app/Magento/Paypal/Test/etc/testcase.xml | 10 +- 25 files changed, 2028 insertions(+), 1 deletion(-) create mode 100644 dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Payments.php create mode 100644 dev/tests/functional/tests/app/Magento/Backend/Test/Page/Adminhtml/SystemConfigEditSectionPayment.xml create mode 100644 dev/tests/functional/tests/app/Magento/Braintree/Test/Block/System/Config/Braintree.php rename dev/tests/functional/tests/app/Magento/Braintree/Test/Page/{adminhtml => Adminhtml}/BraintreeSettlementReport.xml (100%) rename dev/tests/functional/tests/app/Magento/Braintree/Test/Page/{adminhtml => Adminhtml}/SalesOrderView.xml (100%) create mode 100644 dev/tests/functional/tests/app/Magento/Braintree/Test/Page/Adminhtml/SystemConfigEditSectionPayment.xml create mode 100644 dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php create mode 100644 dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreActive.php create mode 100644 dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreDisabled.php create mode 100644 dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreEnabled.php create mode 100644 dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsArePresent.php create mode 100644 dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.php create mode 100644 dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.xml create mode 100644 dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/ExpressCheckout.php create mode 100644 dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowLink.php create mode 100644 dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowPro.php create mode 100644 dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsAdvanced.php create mode 100644 dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsPro.php create mode 100644 dev/tests/functional/tests/app/Magento/Paypal/Test/Page/Adminhtml/SystemConfigEditSectionPayment.xml create mode 100644 dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php create mode 100644 dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php create mode 100644 dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php create mode 100644 dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php create mode 100644 dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Payments.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Payments.php new file mode 100644 index 0000000000000..dc831e8bad3ad --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Payments.php @@ -0,0 +1,124 @@ + option[value='%s']"; + + /** + * @var string + */ + protected $solutionTitle = './strong[contains(text(), "%s")]'; + + /** + * 'Save Config' button. + * + * @var string + */ + protected $save = "#save"; + + /** + * @param string $countryCode + */ + public function switchMerchantCountry($countryCode) + { + $this->_rootElement->find(sprintf($this->merchantCountrySelector, $countryCode))->click(); + } + + /** + * Expand payment methods sections. + * + * @param $sectionId + */ + private function expandSection($sectionId) + { + $sectionName = "a[id*={$sectionId}]"; + $section = $this->_rootElement->find($sectionName . '.open'); + if(!$section->isVisible()) { + $this->_rootElement->find($sectionName)->click(); + } + } + + /** + * Find solution in section. + * + * @param $solution + * @return bool + */ + public function findSolution($solution) + { + if($this->_rootElement->find(sprintf($this->solutionTitle, $solution))) { + return true; + } + return false; + } + + /** + * Check if field is disabled. + * + * @param $fieldId + * @return bool + */ + public function isFieldDisabled($fieldId) + { + $field = $this->_rootElement->find($fieldId); + return $field->isDisabled(); + } + + /** + * Check if field is visible. + * + * @param $fieldId + * @return bool + */ + public function isFieldPresent($fieldId) + { + $field = $this->_rootElement->find($fieldId); + return $field->isVisible(); + } + + /** + * Check if field value is Yes. + * + * @param $fieldId + * @return bool + */ + public function isFieldEnabled($fieldId) + { + return (bool)$this->_rootElement->find($fieldId)->getValue(); + } + + /** + * Expand payment methods sections. + * + * @param array $sections + */ + public function expandPaymentSections(array $sections) + { + foreach ($sections as $key => $section) { + $this->expandSection($key); + foreach ($section as $id => $value) { + if (is_array($value)) { + $this->expandSection($id); + } + } + } + } +} diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Page/Adminhtml/SystemConfigEditSectionPayment.xml b/dev/tests/functional/tests/app/Magento/Backend/Test/Page/Adminhtml/SystemConfigEditSectionPayment.xml new file mode 100644 index 0000000000000..24c2ce030f7f0 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Page/Adminhtml/SystemConfigEditSectionPayment.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/System/Config/Braintree.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/System/Config/Braintree.php new file mode 100644 index 0000000000000..6d6209a63b91f --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/System/Config/Braintree.php @@ -0,0 +1,107 @@ + '#payment_us_braintree_section_braintree_braintree_required_merchant_id', + 'Public Key' => '#payment_us_braintree_section_braintree_braintree_required_public_key', + 'Private Key' => '#payment_us_braintree_section_braintree_braintree_required_private_key', + ]; + + /** + * @return string + */ + public function getFields() + { + return $this->fields; + } + + /** + * @var array + */ + private $enablers = [ + 'Enable this Solution' => "#payment_us_braintree_section_braintree_active", + 'Enable PayPal through Braintree' => '#payment_us_braintree_section_braintree_active_braintree_paypal', + 'Vault enabled' => '#payment_us_braintree_section_braintree_braintree_cc_vault_active' + ]; + + /** + * @var string + */ + private $configureBraintreeButton = '#payment_us_braintree_section_braintree-head'; + + /** + * Specify credentials in Braintree configuration. + */ + public function specifyCredentials() + { + $this->_rootElement->find($this->fields['Merchant ID'])->setValue('1'); + $this->_rootElement->find($this->fields['Public Key'])->setValue('1'); + $this->_rootElement->find($this->fields['Private Key'])->setValue('1'); + } + + /** + * Clear credentials in Braintree configuration. + */ + public function clearCredentials() + { + $this->_rootElement->find($this->fields['Merchant ID'])->setValue(''); + $this->_rootElement->find($this->fields['Public Key'])->setValue(''); + $this->_rootElement->find($this->fields['Private Key'])->setValue(' '); + } + + /** + * @return array + */ + public function getEnablerFields() + { + return $this->enablers; + } + + /** + * Click 'Configure' button to expand Braintree configuration. + */ + public function clickConfigureButton() + { + $this->_rootElement->find($this->configureBraintreeButton)->click(); + } + + /** + * Set 'Enable this Solution' = Yes. + */ + public function enableBraintree() + { + $this->_rootElement->find( + $this->enablers['Enable this Solution'], + Locator::SELECTOR_CSS, + 'select' + )->setValue('Yes'); + } + + /** + * Set 'Enable this Solution' = No. + */ + public function disableBraintree() + { + $this->_rootElement->find( + $this->enablers['Enable this Solution'], + Locator::SELECTOR_CSS, + 'select' + )->setValue('No'); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/Page/adminhtml/BraintreeSettlementReport.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/Page/Adminhtml/BraintreeSettlementReport.xml similarity index 100% rename from dev/tests/functional/tests/app/Magento/Braintree/Test/Page/adminhtml/BraintreeSettlementReport.xml rename to dev/tests/functional/tests/app/Magento/Braintree/Test/Page/Adminhtml/BraintreeSettlementReport.xml diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/Page/adminhtml/SalesOrderView.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/Page/Adminhtml/SalesOrderView.xml similarity index 100% rename from dev/tests/functional/tests/app/Magento/Braintree/Test/Page/adminhtml/SalesOrderView.xml rename to dev/tests/functional/tests/app/Magento/Braintree/Test/Page/Adminhtml/SalesOrderView.xml diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/Page/Adminhtml/SystemConfigEditSectionPayment.xml b/dev/tests/functional/tests/app/Magento/Braintree/Test/Page/Adminhtml/SystemConfigEditSectionPayment.xml new file mode 100644 index 0000000000000..836525e05f78e --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/Page/Adminhtml/SystemConfigEditSectionPayment.xml @@ -0,0 +1,12 @@ + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php new file mode 100644 index 0000000000000..140594f50c870 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php @@ -0,0 +1,133 @@ +systemConfigEditSectionPayment = $systemConfigEditSectionPayment; + $this->assertFieldsAreDisabled = $assertFieldsAreDisabled; + $this->assertFieldsArePresent = $assertFieldsArePresent; + $this->assertFieldsAreActive = $assertFieldsAreActive; + $this->assertFieldsAreEnabled = $assertFieldsAreEnabled; + $this->countryCode = $countryCode; + $this->sections = $sections; + $this->braintreeConfigBlock = $this->systemConfigEditSectionPayment->getBraintreeConfigBlock(); + } + + /** + * . + * + * @return void + */ + public function run() + { + $this->systemConfigEditSectionPayment->getPaymentsConfigBlock()->expandPaymentSections($this->sections); + $this->enableBraintree(); + $this->disableBraintree(); + } + + /** + * Enables Braintree and makes assertions for fields. + */ + private function enableBraintree() + { + $this->braintreeConfigBlock->clickConfigureButton(); + $this->braintreeConfigBlock->clearCredentials(); + $enablers = $this->braintreeConfigBlock->getEnablerFields(); + $this->assertFieldsAreDisabled->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->braintreeConfigBlock->specifyCredentials(); + $this->assertFieldsAreActive->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->braintreeConfigBlock->enableBraintree(); + $this->assertFieldsAreActive->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->systemConfigEditSectionPayment->getPageActions()->save(); + $this->systemConfigEditSectionPayment->getMessagesBlock()->waitSuccessMessage(); + } + + /** + * Disables Express Checkout and makes assertions for fields. + */ + private function disableBraintree() + { + $enablers = $this->braintreeConfigBlock->getEnablerFields(); + $this->braintreeConfigBlock->clickConfigureButton(); + $this->assertFieldsAreActive->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->assertFieldsAreEnabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution']] + ); + $this->braintreeConfigBlock->disableBraintree(); + $this->assertFieldsAreActive->processAssert($this->systemConfigEditSectionPayment, $enablers); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreActive.php b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreActive.php new file mode 100644 index 0000000000000..100913f4d4ad0 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreActive.php @@ -0,0 +1,44 @@ +getPaymentsConfigBlock()->isFieldDisabled($fieldId), + 'Field is disabled.' + ); + } + } + + /** + * Returns string representation of successful assertion. + * + * @return string + */ + public function toString() + { + return 'Field is active.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreDisabled.php b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreDisabled.php new file mode 100644 index 0000000000000..9e9feb19d1430 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreDisabled.php @@ -0,0 +1,44 @@ +getPaymentsConfigBlock()->isFieldDisabled($fieldId), + 'Field is active.' + ); + } + } + + /** + * Returns string representation of successful assertion. + * + * @return string + */ + public function toString() + { + return 'Field is disabled.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreEnabled.php b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreEnabled.php new file mode 100644 index 0000000000000..b62b3e1849615 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreEnabled.php @@ -0,0 +1,44 @@ +getPaymentsConfigBlock()->isFieldEnabled($fieldId), + 'Field is active.' + ); + } + } + + /** + * Returns string representation of successful assertion. + * + * @return string + */ + public function toString() + { + return 'Field is disabled.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsArePresent.php b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsArePresent.php new file mode 100644 index 0000000000000..e686308681654 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsArePresent.php @@ -0,0 +1,44 @@ +getPaymentsConfigBlock()->isFieldPresent($fieldId), + 'Field is active.' + ); + } + } + + /** + * Returns string representation of successful assertion. + * + * @return string + */ + public function toString() + { + return 'Field is disabled.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.php b/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.php new file mode 100644 index 0000000000000..1e40682d21e1e --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.php @@ -0,0 +1,26 @@ +executeScenario(); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.xml b/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.xml new file mode 100644 index 0000000000000..3c18acc37ca57 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.xml @@ -0,0 +1,46 @@ + + + + + + US + + + PayPal Express Checkout + Braintree + + + + Payments Advanced + (Includes Express Checkout) + + Payments Pro (Includes + Express Checkout) + + Payments Standard + + + + + + + + + + + + + + + + test_type:3rd_party_test + + + diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/ExpressCheckout.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/ExpressCheckout.php new file mode 100644 index 0000000000000..70ca1031d9c57 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/ExpressCheckout.php @@ -0,0 +1,130 @@ + '#payment_us_paypal_alternative_payment_methods_express_' . + 'checkout_us_express_checkout_required_express_checkout_required_express_checkout_business_account', + 'API Username' => '#payment_us_paypal_alternative_payment_methods_express_checkout_us_express_checkout_' . + 'required_express_checkout_required_express_checkout_api_username', + 'API Password' => '#payment_us_paypal_alternative_payment_methods_express_checkout_us_express_checkout_' . + 'required_express_checkout_required_express_checkout_api_password', + 'API Signature' => '#payment_us_paypal_alternative_payment_methods_express_checkout_us_express_checkout_' . + 'required_express_checkout_required_express_checkout_api_signature', + 'Merchant Account ID' => '#payment_us_paypal_alternative_payment_methods_express_checkout_us_express_' . + 'checkout_required_merchant_id', + 'Sort Order PayPal Credit' => '#payment_us_paypal_alternative_payment_methods_express_checkout_us_express_' . + 'checkout_required_express_checkout_bml_sort_order', + ]; + + /** + * @return string + */ + public function getFields() + { + return $this->fields; + } + + /** + * @var array + */ + private $enablers = [ + 'Enable this Solution' => '#payment_us_paypal_alternative_payment_methods_express_checkout_us_express_' . + 'checkout_required_enable_express_checkout', + 'Enable In-Context Checkout Experience' => '#payment_us_paypal_alternative_payment_methods_express_checkout_' . + 'us_express_checkout_required_enable_in_context_checkout', + 'Enable PayPal Credit' => '#payment_us_paypal_alternative_payment_methods_express_checkout_us_express_' . + 'checkout_required_enable_express_checkout_bml' + ]; + + /** + * @var string + */ + private $configureExpressButton = '#payment_us_paypal_alternative_payment_methods_express_checkout_us-head'; + + /** + * Specify credentials in PayPal Express Checkout configuration. + */ + public function specifyCredentials() + { + $this->_rootElement->find($this->fields['Email Associated with PayPal Merchant Account']) + ->setValue('test@test.com'); + $this->_rootElement->find($this->fields['API Username'])->setValue('1'); + $this->_rootElement->find($this->fields['API Password'])->setValue('1'); + $this->_rootElement->find($this->fields['API Signature'])->setValue('1'); + } + + /** + * Set fields for credentials empty in PayPal Express Checkout configuration. + */ + public function clearCredentials() + { + $this->_rootElement->find($this->fields['Email Associated with PayPal Merchant Account'])->setValue(''); + $this->_rootElement->find($this->fields['API Username'])->setValue(''); + $this->_rootElement->find($this->fields['API Password'])->setValue(''); + $this->_rootElement->find($this->fields['API Signature'])->setValue(''); + } + + /** + * Specify Merchant Account ID in PayPal Express Checkout configuration. + */ + public function specifyMerchantAccountId() + { + $this->_rootElement->find($this->fields['Merchant Account ID'])->setValue('1'); + } + + /** + * @return array + */ + public function getEnablerFields() + { + return $this->enablers; + } + + /** + * Click 'Configure' button to expand PayPal Express Checkout configuration. + */ + public function clickConfigureButton() + { + $this->_rootElement->find($this->configureExpressButton)->click(); + } + + /** + * Set 'Enable this Solution' = Yes. + */ + public function enableExpressCheckout() + { + $this->_rootElement->find( + $this->enablers['Enable this Solution'], + Locator::SELECTOR_CSS, + 'select' + )->setValue('Yes'); + } + + /** + * Set 'Enable this Solution' = No. + */ + public function disableExpressCheckout() + { + $this->_rootElement->find( + $this->enablers['Enable this Solution'], + Locator::SELECTOR_CSS, + 'select' + )->setValue('No'); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowLink.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowLink.php new file mode 100644 index 0000000000000..88d11e438a05d --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowLink.php @@ -0,0 +1,122 @@ + '#payment_us_paypal_payment_gateways_payflow_link_us_' . + 'payflow_link_required_payflow_link_payflow_link_business_account', + 'Partner' => '#payment_us_paypal_payment_gateways_payflow_link_us_payflow_link_required_payflow_link_payflow_' . + 'link_partner', + 'Vendor' => '#payment_us_paypal_payment_gateways_payflow_link_us_payflow_link_required_payflow_link_payflow_' . + 'link_vendor', + 'User' => '#payment_us_paypal_payment_gateways_payflow_link_us_payflow_link_required_payflow_link_payflow_' . + 'link_user', + 'Password' => '#payment_us_paypal_payment_gateways_payflow_link_us_payflow_link_required_payflow_link_payflow' . + '_link_pwd' + ]; + + /** + * @return string + */ + public function getFields() + { + return $this->fields; + } + + /** + * @var array + */ + private $enablers = [ + 'Enable Payflow Link' => '#payment_us_paypal_payment_gateways_payflow_link_us_payflow_link_required_enable_' . + 'payflow_link', + 'Enable Express Checkout' => '#payment_us_paypal_payment_gateways_payflow_link_us_payflow_link_required_' . + 'enable_express_checkout', + 'Enable PayPal Credit' => '#payment_us_paypal_payment_gateways_payflow_link_us_payflow_link_required_enable_' . + 'express_checkout_bml' + ]; + + /** + * @var string + */ + private $configurePayflowLinkButton = '#payment_us_paypal_payment_gateways_payflow_link_us-head'; + + /** + * Specify credentials in PayPal Payflow Link configuration. + */ + public function specifyCredentials() + { + $this->_rootElement->find($this->fields['Email Associated with PayPal Merchant Account']) + ->setValue('test@test.com'); + $this->_rootElement->find($this->fields['Partner'])->setValue('1'); + $this->_rootElement->find($this->fields['Vendor'])->setValue('1'); + $this->_rootElement->find($this->fields['User'])->setValue('1'); + $this->_rootElement->find($this->fields['Password'])->setValue('1'); + } + + /** + * Set fields for credentials empty in PayPal Payflow Link configuration. + */ + public function clearCredentials() + { + $this->_rootElement->find($this->fields['Email Associated with PayPal Merchant Account'])->setValue(''); + $this->_rootElement->find($this->fields['Partner'])->setValue(''); + $this->_rootElement->find($this->fields['Vendor'])->setValue(''); + $this->_rootElement->find($this->fields['User'])->setValue(''); + $this->_rootElement->find($this->fields['Password'])->setValue(''); + } + + /** + * @return array + */ + public function getEnablerFields() + { + return $this->enablers; + } + + /** + * Click 'Configure' button to expand PayPal Payflow Link configuration. + */ + public function clickConfigureButton() + { + $this->_rootElement->find($this->configurePayflowLinkButton)->click(); + } + + /** + * Set 'Enable this Solution' = Yes. + */ + public function enablePayflowLink() + { + $this->_rootElement->find( + $this->enablers['Enable Payflow Link'], + Locator::SELECTOR_CSS, + 'select' + )->setValue('Yes'); + } + + /** + * Set 'Enable this Solution' = No. + */ + public function disablePayflowLink() + { + $this->_rootElement->find( + $this->enablers['Enable Payflow Link'], + Locator::SELECTOR_CSS, + 'select' + )->setValue('No'); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowPro.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowPro.php new file mode 100644 index 0000000000000..ab0181b373d2e --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowPro.php @@ -0,0 +1,122 @@ + '#payment_us_paypal_payment_gateways_paypal_payflowpro_' . + 'with_express_checkout_paypal_payflow_required_paypal_payflow_api_settings_business_account', + 'Partner' => '#payment_us_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_' . + 'required_paypal_payflow_api_settings_partner', + 'Vendor' => '#payment_us_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_' . + 'required_paypal_payflow_api_settings_vendor', + 'User' => '#payment_us_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_' . + 'required_paypal_payflow_api_settings_user', + 'Password' => '#payment_us_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_payflow_' . + 'required_paypal_payflow_api_settings_pwd' + ]; + + /** + * @return string + */ + public function getFields() + { + return $this->fields; + } + + /** + * @var array + */ + private $enablers = [ + 'Enable this Solution' => '#payment_us_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal' . + '_payflow_required_enable_paypal_payflow', + 'Enable PayPal Credit' => '#payment_us_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal' . + '_payflow_required_enable_express_checkout_bml_payflow', + 'Vault enabled' => '#payment_us_paypal_payment_gateways_paypal_payflowpro_with_express_checkout_paypal_' . + 'payflow_required_payflowpro_cc_vault_active' + ]; + + /** + * @var string + */ + private $configureProButton = '#payment_us_paypal_payment_gateways_paypal_payflowpro_with_express_checkout-head'; + + /** + * Specify credentials in PayPal Payflow Pro configuration. + */ + public function specifyCredentials() + { + $this->_rootElement->find($this->fields['Email Associated with PayPal Merchant Account']) + ->setValue('test@test.com'); + $this->_rootElement->find($this->fields['Partner'])->setValue('1'); + $this->_rootElement->find($this->fields['Vendor'])->setValue('1'); + $this->_rootElement->find($this->fields['User'])->setValue('1'); + $this->_rootElement->find($this->fields['Password'])->setValue('1'); + } + + /** + * Set fields for credentials empty in PayPal Payflow Pro configuration. + */ + public function clearCredentials() + { + $this->_rootElement->find($this->fields['Email Associated with PayPal Merchant Account'])->setValue(''); + $this->_rootElement->find($this->fields['Partner'])->setValue(''); + $this->_rootElement->find($this->fields['Vendor'])->setValue(''); + $this->_rootElement->find($this->fields['User'])->setValue(''); + $this->_rootElement->find($this->fields['Password'])->setValue(''); + } + + /** + * @return array + */ + public function getEnablerFields() + { + return $this->enablers; + } + + /** + * Click 'Configure' button to expand PayPal Payflow Pro configuration. + */ + public function clickConfigureButton() + { + $this->_rootElement->find($this->configureProButton)->click(); + } + + /** + * Set 'Enable this Solution' = Yes. + */ + public function enablePayflowPro() + { + $this->_rootElement->find( + $this->enablers['Enable this Solution'], + Locator::SELECTOR_CSS, + 'select' + )->setValue('Yes'); + } + + /** + * Set 'Enable this Solution' = No. + */ + public function disablePayflowPro() + { + $this->_rootElement->find( + $this->enablers['Enable this Solution'], + Locator::SELECTOR_CSS, + 'select' + )->setValue('No'); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsAdvanced.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsAdvanced.php new file mode 100644 index 0000000000000..232282b2bedb2 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsAdvanced.php @@ -0,0 +1,116 @@ + '#payment_us_paypal_group_all_in_one_payflow_advanced_' . + 'required_settings_payments_advanced_business_account', + 'Partner' => '#payment_us_paypal_group_all_in_one_payflow_advanced_required_settings_payments_advanced_partner', + 'Vendor' => '#payment_us_paypal_group_all_in_one_payflow_advanced_required_settings_payments_advanced_vendor', + 'User' => '#payment_us_paypal_group_all_in_one_payflow_advanced_required_settings_payments_advanced_user', + 'Password' => '#payment_us_paypal_group_all_in_one_payflow_advanced_required_settings_payments_advanced_pwd' + ]; + + /** + * @return string + */ + public function getFields() + { + return $this->fields; + } + + /** + * @var array + */ + private $enablers = [ + 'Enable this Solution' => '#payment_us_paypal_group_all_in_one_payflow_advanced_required_settings_enable_' . + 'payflow_advanced', + 'Enable PayPal Credit' => '#payment_us_paypal_group_all_in_one_payflow_advanced_required_settings_enable_' . + 'express_checkout_bml' + ]; + + /** + * @var string + */ + private $configureAdvancedButton = '#payment_us_paypal_group_all_in_one_payflow_advanced-head'; + + /** + * Specify credentials in PayPal Payments Advanced configuration. + */ + public function specifyCredentials() + { + $this->_rootElement->find($this->fields['Email Associated with PayPal Merchant Account']) + ->setValue('test@test.com'); + $this->_rootElement->find($this->fields['Partner'])->setValue('1'); + $this->_rootElement->find($this->fields['Vendor'])->setValue('1'); + $this->_rootElement->find($this->fields['User'])->setValue('1'); + $this->_rootElement->find($this->fields['Password'])->setValue('1'); + } + + /** + * Set fields for credentials empty in PayPal Payments Advanced configuration. + */ + public function clearCredentials() + { + $this->_rootElement->find($this->fields['Email Associated with PayPal Merchant Account'])->setValue(''); + $this->_rootElement->find($this->fields['Partner'])->setValue(''); + $this->_rootElement->find($this->fields['Vendor'])->setValue(''); + $this->_rootElement->find($this->fields['User'])->setValue(''); + $this->_rootElement->find($this->fields['Password'])->setValue(''); + } + + /** + * @return array + */ + public function getEnablerFields() + { + return $this->enablers; + } + + /** + * Click 'Configure' button to expand PayPal Payments Advanced configuration. + */ + public function clickConfigureButton() + { + $this->_rootElement->find($this->configureAdvancedButton)->click(); + } + + /** + * Set 'Enable this Solution' = Yes. + */ + public function enablePaymentsAdvanced() + { + $this->_rootElement->find( + $this->enablers['Enable this Solution'], + Locator::SELECTOR_CSS, + 'select' + )->setValue('Yes'); + } + + /** + * Set 'Enable this Solution' = No. + */ + public function disablePaymentsAdvanced() + { + $this->_rootElement->find( + $this->enablers['Enable this Solution'], + Locator::SELECTOR_CSS, + 'select' + )->setValue('No'); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsPro.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsPro.php new file mode 100644 index 0000000000000..8197f52c3b78d --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsPro.php @@ -0,0 +1,122 @@ + '#payment_us_paypal_group_all_in_one_wpp_usuk_paypal_' . + 'payflow_required_paypal_payflow_api_settings_business_account', + 'Partner' => '#payment_us_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_' . + 'settings_partner', + 'Vendor' => '#payment_us_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_' . + 'settings_vendor', + 'User' => '#payment_us_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_settings' . + '_user', + 'Password' => '#payment_us_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_' . + 'settings_pwd' + ]; + + /** + * @return string + */ + public function getFields() + { + return $this->fields; + } + + /** + * @var array + */ + private $enablers = [ + 'Enable this Solution' => '#payment_us_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_enable_paypal' . + '_payflow', + 'Enable PayPal Credit' => '#payment_us_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_enable_' . + 'express_checkout_bml_payflow', + 'Vault enabled' => '#payment_us_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_payflowpro_cc_vault' . + '_active' + ]; + + /** + * @var string + */ + private $configureProButton = '#payment_us_paypal_group_all_in_one_wpp_usuk-head'; + + /** + * Specify credentials in PayPal Payments Pro configuration. + */ + public function specifyCredentials() + { + $this->_rootElement->find($this->fields['Email Associated with PayPal Merchant Account']) + ->setValue('test@test.com'); + $this->_rootElement->find($this->fields['Partner'])->setValue('1'); + $this->_rootElement->find($this->fields['Vendor'])->setValue('1'); + $this->_rootElement->find($this->fields['User'])->setValue('1'); + $this->_rootElement->find($this->fields['Password'])->setValue('1'); + } + + /** + * Set fields for credentials empty in PayPal Payments Pro configuration. + */ + public function clearCredentials() + { + $this->_rootElement->find($this->fields['Email Associated with PayPal Merchant Account'])->setValue(''); + $this->_rootElement->find($this->fields['Partner'])->setValue(''); + $this->_rootElement->find($this->fields['Vendor'])->setValue(''); + $this->_rootElement->find($this->fields['User'])->setValue(''); + $this->_rootElement->find($this->fields['Password'])->setValue(''); + } + + /** + * @return array + */ + public function getEnablerFields() + { + return $this->enablers; + } + + /** + * Click 'Configure' button to expand PayPal Payments Pro configuration. + */ + public function clickConfigureButton() + { + $this->_rootElement->find($this->configureProButton)->click(); + } + + /** + * Set 'Enable this Solution' = Yes. + */ + public function enablePaymentsPro() + { + $this->_rootElement->find( + $this->enablers['Enable this Solution'], + Locator::SELECTOR_CSS, + 'select' + )->setValue('Yes'); + } + + /** + * Set 'Enable this Solution' = No. + */ + public function disablePaymentsPro() + { + $this->_rootElement->find( + $this->enablers['Enable this Solution'], + Locator::SELECTOR_CSS, + 'select' + )->setValue('No'); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Page/Adminhtml/SystemConfigEditSectionPayment.xml b/dev/tests/functional/tests/app/Magento/Paypal/Test/Page/Adminhtml/SystemConfigEditSectionPayment.xml new file mode 100644 index 0000000000000..c2461cf39ae6c --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Page/Adminhtml/SystemConfigEditSectionPayment.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php new file mode 100644 index 0000000000000..d1534e36cc4d6 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php @@ -0,0 +1,147 @@ +systemConfigEditSectionPayment = $systemConfigEditSectionPayment; + $this->assertFieldsAreDisabled = $assertFieldsAreDisabled; + $this->assertFieldsArePresent = $assertFieldsArePresent; + $this->assertFieldsAreActive = $assertFieldsAreActive; + $this->assertFieldsAreEnabled = $assertFieldsAreEnabled; + $this->countryCode = $countryCode; + $this->sections = $sections; + $this->expressCheckoutConfigBlock = $this->systemConfigEditSectionPayment->getExpressCheckoutConfigBlock(); + } + + /** + * . + * + * @return void + */ + public function run() + { + $this->systemConfigEditSectionPayment->open(); + $this->systemConfigEditSectionPayment->getPaymentsConfigBlock()->switchMerchantCountry($this->countryCode); + $this->systemConfigEditSectionPayment->getPaymentsConfigBlock()->expandPaymentSections($this->sections); + $this->enableExpressCheckout(); + $this->disableExpressCheckout(); + } + + /** + * Enables Express Checkout and makes assertions for fields. + */ + private function enableExpressCheckout() + { + $this->expressCheckoutConfigBlock->clickConfigureButton(); + $this->expressCheckoutConfigBlock->clearCredentials(); + $enablers = $this->expressCheckoutConfigBlock->getEnablerFields(); + $this->assertFieldsAreDisabled->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->expressCheckoutConfigBlock->specifyCredentials(); + $this->expressCheckoutConfigBlock->enableExpressCheckout(); + $expressFields = $this->expressCheckoutConfigBlock->getFields(); + $this->assertFieldsArePresent->processAssert( + $this->systemConfigEditSectionPayment, + [$expressFields['Merchant Account ID'], $expressFields['Sort Order PayPal Credit']] + ); + $this->assertFieldsAreActive->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable In-Context Checkout Experience'], $enablers['Enable PayPal Credit']] + ); + $this->assertFieldsAreEnabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable In-Context Checkout Experience'], $enablers['Enable PayPal Credit']] + ); + $this->expressCheckoutConfigBlock->specifyMerchantAccountId(); + $this->systemConfigEditSectionPayment->getPageActions()->save(); + $this->systemConfigEditSectionPayment->getMessagesBlock()->waitSuccessMessage(); + } + + /** + * Disables Express Checkout and makes assertions for fields. + */ + private function disableExpressCheckout() + { + $enablers = $this->expressCheckoutConfigBlock->getEnablerFields(); + $this->expressCheckoutConfigBlock->clickConfigureButton(); + $this->assertFieldsAreActive->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->assertFieldsAreEnabled->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->expressCheckoutConfigBlock->disableExpressCheckout(); + $this->assertFieldsAreDisabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable In-Context Checkout Experience'], $enablers['Enable PayPal Credit']] + ); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php new file mode 100644 index 0000000000000..8fb4d4734e2ba --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php @@ -0,0 +1,154 @@ +systemConfigEditSectionPayment = $systemConfigEditSectionPayment; + $this->assertFieldsAreDisabled = $assertFieldsAreDisabled; + $this->assertFieldsArePresent = $assertFieldsArePresent; + $this->assertFieldsAreActive = $assertFieldsAreActive; + $this->assertFieldsAreEnabled = $assertFieldsAreEnabled; + $this->countryCode = $countryCode; + $this->sections = $sections; + $this->payflowLinkConfigBlock = $this->systemConfigEditSectionPayment->getPayflowLinkConfigBlock(); + } + + /** + * . + * + * @return void + */ + public function run() + { + $this->systemConfigEditSectionPayment->getPaymentsConfigBlock()->expandPaymentSections($this->sections); + $this->enablePayflowLink(); + $this->disablePayflowLink(); + } + + /** + * Enables Payflow Link and makes assertions for fields. + */ + private function enablePayflowLink() + { + $this->payflowLinkConfigBlock->clickConfigureButton(); + $this->payflowLinkConfigBlock->clearCredentials(); + $enablers = $this->payflowLinkConfigBlock->getEnablerFields(); + $this->assertFieldsAreDisabled->processAssert( + $this->systemConfigEditSectionPayment, + $enablers + ); + $this->payflowLinkConfigBlock->specifyCredentials(); + $this->assertFieldsAreActive->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable Payflow Link']] + ); + $this->assertFieldsAreDisabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable Express Checkout'], $enablers['Enable PayPal Credit']] + ); + $this->payflowLinkConfigBlock->enablePayflowLink(); + $this->assertFieldsAreActive->processAssert( + $this->systemConfigEditSectionPayment, + $enablers + ); + $this->assertFieldsAreEnabled->processAssert( + $this->systemConfigEditSectionPayment, + $enablers + ); + $this->systemConfigEditSectionPayment->getPageActions()->save(); + $this->systemConfigEditSectionPayment->getMessagesBlock()->waitSuccessMessage(); + } + + /** + * Disables Payflow Link and makes assertions for fields. + */ + private function disablePayflowLink() + { + $enablers = $this->payflowLinkConfigBlock->getEnablerFields(); + $this->payflowLinkConfigBlock->clickConfigureButton(); + $this->assertFieldsAreActive->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->assertFieldsAreEnabled->processAssert( + $this->systemConfigEditSectionPayment, + $enablers + ); + $this->payflowLinkConfigBlock->disablePayflowLink(); + $this->assertFieldsAreDisabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable Express Checkout'], $enablers['Enable PayPal Credit']] + ); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php new file mode 100644 index 0000000000000..01675de5f6c0b --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php @@ -0,0 +1,153 @@ +systemConfigEditSectionPayment = $systemConfigEditSectionPayment; + $this->assertFieldsAreDisabled = $assertFieldsAreDisabled; + $this->assertFieldsArePresent = $assertFieldsArePresent; + $this->assertFieldsAreActive = $assertFieldsAreActive; + $this->assertFieldsAreEnabled = $assertFieldsAreEnabled; + $this->countryCode = $countryCode; + $this->sections = $sections; + $this->payflowProConfigBlock = $this->systemConfigEditSectionPayment->getPayflowProConfigBlock(); + } + + /** + * . + * + * @return void + */ + public function run() + { + $this->systemConfigEditSectionPayment->getPaymentsConfigBlock()->expandPaymentSections($this->sections); + $this->enablePayflowPro(); + $this->disablePayflowPro(); + } + + /** + * Enables Payflow Pro and makes assertions for fields. + */ + private function enablePayflowPro() + { + $this->payflowProConfigBlock->clickConfigureButton(); + $this->payflowProConfigBlock->clearCredentials(); + $enablers = $this->payflowProConfigBlock->getEnablerFields(); + $this->assertFieldsAreDisabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution'], $enablers['Enable PayPal Credit']] + ); + $this->payflowProConfigBlock->specifyCredentials(); + $this->assertFieldsAreActive->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution']] + ); + $this->assertFieldsAreDisabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable PayPal Credit']] + ); + $this->payflowProConfigBlock->enablePayflowPro(); + $this->assertFieldsAreActive->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution'], $enablers['Enable PayPal Credit'], $enablers['Vault enabled']] + ); + $this->assertFieldsAreEnabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution'], $enablers['Enable PayPal Credit']] + ); + $this->systemConfigEditSectionPayment->getPageActions()->save(); + $this->systemConfigEditSectionPayment->getMessagesBlock()->waitSuccessMessage(); + } + + /** + * Disables Payflow Pro and makes assertions for fields. + */ + private function disablePayflowPro() + { + $enablers = $this->payflowProConfigBlock->getEnablerFields(); + $this->payflowProConfigBlock->clickConfigureButton(); + $this->assertFieldsAreActive->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->assertFieldsAreEnabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution'], $enablers['Enable PayPal Credit']] + ); + $this->payflowProConfigBlock->disablePayflowPro(); + $this->assertFieldsAreDisabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable PayPal Credit']] + ); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php new file mode 100644 index 0000000000000..51e9b1eb908be --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php @@ -0,0 +1,143 @@ +systemConfigEditSectionPayment = $systemConfigEditSectionPayment; + $this->assertFieldsAreDisabled = $assertFieldsAreDisabled; + $this->assertFieldsArePresent = $assertFieldsArePresent; + $this->assertFieldsAreActive = $assertFieldsAreActive; + $this->assertFieldsAreEnabled = $assertFieldsAreEnabled; + $this->countryCode = $countryCode; + $this->sections = $sections; + $this->paymentsAdvancedConfigBlock = $this->systemConfigEditSectionPayment->getPaymentsAdvancedConfigBlock(); + } + + /** + * . + * + * @return void + */ + public function run() + { + $this->systemConfigEditSectionPayment->getPaymentsConfigBlock()->expandPaymentSections($this->sections); + $this->enablePaymentsAdvanced(); + $this->disablePaymentsAdvanced(); + } + + /** + * Enables Payments Advanced and makes assertions for fields. + */ + private function enablePaymentsAdvanced() + { + $this->paymentsAdvancedConfigBlock->clickConfigureButton(); + $this->paymentsAdvancedConfigBlock->clearCredentials(); + $enablers = $this->paymentsAdvancedConfigBlock->getEnablerFields(); + $this->assertFieldsAreDisabled->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->paymentsAdvancedConfigBlock->specifyCredentials(); + $this->assertFieldsAreActive->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution']] + ); + $this->paymentsAdvancedConfigBlock->enablePaymentsAdvanced(); + $this->assertFieldsAreActive->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution'], $enablers['Enable PayPal Credit']] + ); + $this->assertFieldsAreEnabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution'], $enablers['Enable PayPal Credit']] + ); + $this->systemConfigEditSectionPayment->getPageActions()->save(); + $this->systemConfigEditSectionPayment->getMessagesBlock()->waitSuccessMessage(); + } + + /** + * Disables Payments Advanced and makes assertions for fields. + */ + private function disablePaymentsAdvanced() + { + $enablers = $this->paymentsAdvancedConfigBlock->getEnablerFields(); + $this->paymentsAdvancedConfigBlock->clickConfigureButton(); + $this->assertFieldsAreActive->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->assertFieldsAreEnabled->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->paymentsAdvancedConfigBlock->disablePaymentsAdvanced(); + $this->assertFieldsAreDisabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable PayPal Credit']] + ); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php new file mode 100644 index 0000000000000..dc0102c8d1630 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php @@ -0,0 +1,154 @@ +systemConfigEditSectionPayment = $systemConfigEditSectionPayment; + $this->assertSolutionsAvailableInSection = $assertSolutionsAvailableInSection; + $this->assertFieldsAreDisabled = $assertFieldsAreDisabled; + $this->assertFieldsArePresent = $assertFieldsArePresent; + $this->assertFieldsAreActive = $assertFieldsAreActive; + $this->assertFieldsAreEnabled = $assertFieldsAreEnabled; + $this->countryCode = $countryCode; + $this->sections = $sections; + $this->paymentsProConfigBlock = $this->systemConfigEditSectionPayment->getPaymentsProConfigBlock(); + } + + /** + * . + * + * @return void + */ + public function run() + { + $this->systemConfigEditSectionPayment->getPaymentsConfigBlock()->expandPaymentSections($this->sections); + $this->enablePaymentsPro(); + $this->disablePaymentsPro(); + } + + /** + * Enables Payments Pro and makes assertions for fields. + */ + private function enablePaymentsPro() + { + $this->paymentsProConfigBlock->clickConfigureButton(); + $this->paymentsProConfigBlock->clearCredentials(); + $enablers = $this->paymentsProConfigBlock->getEnablerFields(); + $this->assertFieldsAreDisabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution'], $enablers['Enable PayPal Credit']] + ); + $this->paymentsProConfigBlock->specifyCredentials(); + $this->assertFieldsAreActive->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution']] + ); + $this->assertFieldsAreDisabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable PayPal Credit']] + ); + $this->paymentsProConfigBlock->enablePaymentsPro(); + $this->assertFieldsAreActive->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution'], $enablers['Enable PayPal Credit'], $enablers['Vault enabled']] + ); + $this->assertFieldsAreEnabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution'], $enablers['Enable PayPal Credit']] + ); + $this->systemConfigEditSectionPayment->getPageActions()->save(); + $this->systemConfigEditSectionPayment->getMessagesBlock()->waitSuccessMessage(); + } + + /** + * Disables Payments Pro and makes assertions for fields. + */ + private function disablePaymentsPro() + { + $enablers = $this->paymentsProConfigBlock->getEnablerFields(); + $this->paymentsProConfigBlock->clickConfigureButton(); + $this->assertFieldsAreActive->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->assertFieldsAreEnabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable this Solution'], $enablers['Enable PayPal Credit']] + ); + $this->paymentsProConfigBlock->disablePaymentsPro(); + $this->assertFieldsAreDisabled->processAssert( + $this->systemConfigEditSectionPayment, + [$enablers['Enable PayPal Credit']] + ); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/etc/testcase.xml b/dev/tests/functional/tests/app/Magento/Paypal/Test/etc/testcase.xml index 288824c7e595d..f361530def861 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/etc/testcase.xml +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/etc/testcase.xml @@ -53,7 +53,7 @@ - + @@ -61,4 +61,12 @@ + + + + + + + + From f5273189502ced21dedaa07876c848ccd536a48c Mon Sep 17 00:00:00 2001 From: Roman Liukshyn Date: Wed, 3 Aug 2016 14:33:10 +0300 Subject: [PATCH 17/21] MAGETWO-55680: Create functional tests - Missing return statements, small code style fixes --- .../Test/Block/System/Config/Payments.php | 14 +++---- .../Test/Block/System/Config/Braintree.php | 38 +++++++++++++------ .../TestStep/CheckBraintreeConfigStep.php | 6 ++- .../Test/Constraint/AssertFieldsAreActive.php | 2 +- .../Constraint/AssertFieldsAreDisabled.php | 2 +- .../Constraint/AssertFieldsAreEnabled.php | 2 +- .../Constraint/AssertFieldsArePresent.php | 2 +- .../Test/TestCase/ConflictResolutionTest.php | 4 ++ .../Block/System/Config/ExpressCheckout.php | 34 ++++++++++++----- .../Test/Block/System/Config/PayflowLink.php | 32 +++++++++++----- .../Test/Block/System/Config/PayflowPro.php | 32 +++++++++++----- .../Block/System/Config/PaymentsAdvanced.php | 32 +++++++++++----- .../Test/Block/System/Config/PaymentsPro.php | 32 +++++++++++----- .../Test/TestStep/CheckExpressConfigStep.php | 6 ++- .../TestStep/CheckPayflowLinkConfigStep.php | 7 +++- .../TestStep/CheckPayflowProConfigStep.php | 6 ++- .../CheckPaymentsAdvancedConfigStep.php | 6 ++- .../TestStep/CheckPaymentsProConfigStep.php | 7 +++- 18 files changed, 186 insertions(+), 78 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Payments.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Payments.php index dc831e8bad3ad..5534ab00fedbc 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Payments.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Payments.php @@ -1,19 +1,12 @@ _rootElement->find($sectionName . '.open'); - if(!$section->isVisible()) { + if (!$section->isVisible()) { $this->_rootElement->find($sectionName)->click(); } } @@ -64,7 +59,7 @@ private function expandSection($sectionId) */ public function findSolution($solution) { - if($this->_rootElement->find(sprintf($this->solutionTitle, $solution))) { + if ($this->_rootElement->find(sprintf($this->solutionTitle, $solution))) { return true; } return false; @@ -109,6 +104,7 @@ public function isFieldEnabled($fieldId) * Expand payment methods sections. * * @param array $sections + * @return void */ public function expandPaymentSections(array $sections) { diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/System/Config/Braintree.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/System/Config/Braintree.php index 6d6209a63b91f..0f8fa8b41b6c4 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/System/Config/Braintree.php +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/System/Config/Braintree.php @@ -15,7 +15,7 @@ class Braintree extends Block { /** - * @var string + * @var array */ private $fields = [ 'Merchant ID' => '#payment_us_braintree_section_braintree_braintree_required_merchant_id', @@ -23,14 +23,6 @@ class Braintree extends Block 'Private Key' => '#payment_us_braintree_section_braintree_braintree_required_private_key', ]; - /** - * @return string - */ - public function getFields() - { - return $this->fields; - } - /** * @var array */ @@ -46,7 +38,19 @@ public function getFields() private $configureBraintreeButton = '#payment_us_braintree_section_braintree-head'; /** - * Specify credentials in Braintree configuration. + * Return credentials fields selectors. + * + * @return array + */ + public function getFields() + { + return $this->fields; + } + + /** + * Specify credentials in Braintree configuration. + * + * @return void */ public function specifyCredentials() { @@ -56,16 +60,20 @@ public function specifyCredentials() } /** - * Clear credentials in Braintree configuration. + * Clear credentials in Braintree configuration. + * + * @return void */ public function clearCredentials() { $this->_rootElement->find($this->fields['Merchant ID'])->setValue(''); $this->_rootElement->find($this->fields['Public Key'])->setValue(''); - $this->_rootElement->find($this->fields['Private Key'])->setValue(' '); + $this->_rootElement->find($this->fields['Private Key'])->setValue(''); } /** + * Return enabler fields selectors. + * * @return array */ public function getEnablerFields() @@ -75,6 +83,8 @@ public function getEnablerFields() /** * Click 'Configure' button to expand Braintree configuration. + * + * @return void */ public function clickConfigureButton() { @@ -83,6 +93,8 @@ public function clickConfigureButton() /** * Set 'Enable this Solution' = Yes. + * + * @return void */ public function enableBraintree() { @@ -95,6 +107,8 @@ public function enableBraintree() /** * Set 'Enable this Solution' = No. + * + * @return void */ public function disableBraintree() { diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php index 140594f50c870..a1485cf802ee0 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php @@ -87,7 +87,7 @@ public function __construct( } /** - * . + * Run step for checking Braintree configuration. * * @return void */ @@ -100,6 +100,8 @@ public function run() /** * Enables Braintree and makes assertions for fields. + * + * @return void */ private function enableBraintree() { @@ -117,6 +119,8 @@ private function enableBraintree() /** * Disables Express Checkout and makes assertions for fields. + * + * @return void */ private function disableBraintree() { diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreActive.php b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreActive.php index 100913f4d4ad0..c1bcb2991dd1e 100644 --- a/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreActive.php +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreActive.php @@ -16,11 +16,11 @@ */ class AssertFieldsAreActive extends AbstractConstraint { - /** * Assert that fields are active. * * @param array $fieldIds + * @return void */ public function processAssert(SystemConfigEditSectionPayment $configEditSectionPayment, array $fieldIds) { diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreDisabled.php b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreDisabled.php index 9e9feb19d1430..59cb12d580c7d 100644 --- a/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreDisabled.php +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreDisabled.php @@ -16,11 +16,11 @@ */ class AssertFieldsAreDisabled extends AbstractConstraint { - /** * Assert that field are disabled. * * @param array $fieldIds + * @return void */ public function processAssert(SystemConfigEditSectionPayment $configEditSectionPayment, array $fieldIds) { diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreEnabled.php b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreEnabled.php index b62b3e1849615..31e9cd6924a8a 100644 --- a/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreEnabled.php +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsAreEnabled.php @@ -16,11 +16,11 @@ */ class AssertFieldsAreEnabled extends AbstractConstraint { - /** * Assert that field is present. * * @param array $fieldIds + * @return void */ public function processAssert(SystemConfigEditSectionPayment $configEditSectionPayment, array $fieldIds) { diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsArePresent.php b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsArePresent.php index e686308681654..0491b2df124d1 100644 --- a/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsArePresent.php +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/Constraint/AssertFieldsArePresent.php @@ -16,11 +16,11 @@ */ class AssertFieldsArePresent extends AbstractConstraint { - /** * Assert that field is present. * * @param array $fieldIds + * @return void */ public function processAssert(SystemConfigEditSectionPayment $configEditSectionPayment, array $fieldIds) { diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.php b/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.php index 1e40682d21e1e..b1c2d71a43bdd 100644 --- a/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.php +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.php @@ -7,6 +7,10 @@ use Magento\Mtf\TestCase\Scenario; +/** + * Tests conflict resolution for payments configuration. + * Class ConflictResolutionTest + */ class ConflictResolutionTest extends Scenario { /* tags */ diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/ExpressCheckout.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/ExpressCheckout.php index 70ca1031d9c57..aefe03b1e9b54 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/ExpressCheckout.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/ExpressCheckout.php @@ -15,7 +15,7 @@ class ExpressCheckout extends Block { /** - * @var string + * @var array */ private $fields = [ 'Email Associated with PayPal Merchant Account' => '#payment_us_paypal_alternative_payment_methods_express_' . @@ -32,14 +32,6 @@ class ExpressCheckout extends Block 'checkout_required_express_checkout_bml_sort_order', ]; - /** - * @return string - */ - public function getFields() - { - return $this->fields; - } - /** * @var array */ @@ -57,8 +49,20 @@ public function getFields() */ private $configureExpressButton = '#payment_us_paypal_alternative_payment_methods_express_checkout_us-head'; + /** + * Return credentials fields selectors. + * + * @return array + */ + public function getFields() + { + return $this->fields; + } + /** * Specify credentials in PayPal Express Checkout configuration. + * + * @return void */ public function specifyCredentials() { @@ -71,6 +75,8 @@ public function specifyCredentials() /** * Set fields for credentials empty in PayPal Express Checkout configuration. + * + * @return void */ public function clearCredentials() { @@ -82,6 +88,8 @@ public function clearCredentials() /** * Specify Merchant Account ID in PayPal Express Checkout configuration. + * + * @return void */ public function specifyMerchantAccountId() { @@ -89,6 +97,8 @@ public function specifyMerchantAccountId() } /** + * Return enabler fields selectors. + * * @return array */ public function getEnablerFields() @@ -98,6 +108,8 @@ public function getEnablerFields() /** * Click 'Configure' button to expand PayPal Express Checkout configuration. + * + * @return void */ public function clickConfigureButton() { @@ -106,6 +118,8 @@ public function clickConfigureButton() /** * Set 'Enable this Solution' = Yes. + * + * @return void */ public function enableExpressCheckout() { @@ -118,6 +132,8 @@ public function enableExpressCheckout() /** * Set 'Enable this Solution' = No. + * + * @return void */ public function disableExpressCheckout() { diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowLink.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowLink.php index 88d11e438a05d..226a62f7633de 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowLink.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowLink.php @@ -15,7 +15,7 @@ class PayflowLink extends Block { /** - * @var string + * @var array */ private $fields = [ 'Email Associated with PayPal Merchant Account' => '#payment_us_paypal_payment_gateways_payflow_link_us_' . @@ -30,14 +30,6 @@ class PayflowLink extends Block '_link_pwd' ]; - /** - * @return string - */ - public function getFields() - { - return $this->fields; - } - /** * @var array */ @@ -57,6 +49,8 @@ public function getFields() /** * Specify credentials in PayPal Payflow Link configuration. + * + * @return void */ public function specifyCredentials() { @@ -70,6 +64,8 @@ public function specifyCredentials() /** * Set fields for credentials empty in PayPal Payflow Link configuration. + * + * @return void */ public function clearCredentials() { @@ -81,6 +77,18 @@ public function clearCredentials() } /** + * Return credentials fields selectors. + * + * @return array + */ + public function getFields() + { + return $this->fields; + } + + /** + * Return enabler fields selectors. + * * @return array */ public function getEnablerFields() @@ -90,6 +98,8 @@ public function getEnablerFields() /** * Click 'Configure' button to expand PayPal Payflow Link configuration. + * + * @return void */ public function clickConfigureButton() { @@ -98,6 +108,8 @@ public function clickConfigureButton() /** * Set 'Enable this Solution' = Yes. + * + * @return void */ public function enablePayflowLink() { @@ -110,6 +122,8 @@ public function enablePayflowLink() /** * Set 'Enable this Solution' = No. + * + * @return void */ public function disablePayflowLink() { diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowPro.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowPro.php index ab0181b373d2e..92db87785f3e7 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowPro.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowPro.php @@ -15,7 +15,7 @@ class PayflowPro extends Block { /** - * @var string + * @var array */ private $fields = [ 'Email Associated with PayPal Merchant Account' => '#payment_us_paypal_payment_gateways_paypal_payflowpro_' . @@ -30,14 +30,6 @@ class PayflowPro extends Block 'required_paypal_payflow_api_settings_pwd' ]; - /** - * @return string - */ - public function getFields() - { - return $this->fields; - } - /** * @var array */ @@ -57,6 +49,8 @@ public function getFields() /** * Specify credentials in PayPal Payflow Pro configuration. + * + * @return void */ public function specifyCredentials() { @@ -70,6 +64,8 @@ public function specifyCredentials() /** * Set fields for credentials empty in PayPal Payflow Pro configuration. + * + * @return void */ public function clearCredentials() { @@ -81,6 +77,18 @@ public function clearCredentials() } /** + * Return credentials fields selectors. + * + * @return array + */ + public function getFields() + { + return $this->fields; + } + + /** + * Return enabler fields selectors. + * * @return array */ public function getEnablerFields() @@ -90,6 +98,8 @@ public function getEnablerFields() /** * Click 'Configure' button to expand PayPal Payflow Pro configuration. + * + * @return void */ public function clickConfigureButton() { @@ -98,6 +108,8 @@ public function clickConfigureButton() /** * Set 'Enable this Solution' = Yes. + * + * @return void */ public function enablePayflowPro() { @@ -110,6 +122,8 @@ public function enablePayflowPro() /** * Set 'Enable this Solution' = No. + * + * @return void */ public function disablePayflowPro() { diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsAdvanced.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsAdvanced.php index 232282b2bedb2..6e380b603e066 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsAdvanced.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsAdvanced.php @@ -15,7 +15,7 @@ class PaymentsAdvanced extends Block { /** - * @var string + * @var array */ private $fields = [ 'Email Associated with PayPal Merchant Account' => '#payment_us_paypal_group_all_in_one_payflow_advanced_' . @@ -26,14 +26,6 @@ class PaymentsAdvanced extends Block 'Password' => '#payment_us_paypal_group_all_in_one_payflow_advanced_required_settings_payments_advanced_pwd' ]; - /** - * @return string - */ - public function getFields() - { - return $this->fields; - } - /** * @var array */ @@ -51,6 +43,8 @@ public function getFields() /** * Specify credentials in PayPal Payments Advanced configuration. + * + * @return void */ public function specifyCredentials() { @@ -64,6 +58,8 @@ public function specifyCredentials() /** * Set fields for credentials empty in PayPal Payments Advanced configuration. + * + * @return void */ public function clearCredentials() { @@ -75,6 +71,18 @@ public function clearCredentials() } /** + * Return credentials fields selectors. + * + * @return array + */ + public function getFields() + { + return $this->fields; + } + + /** + * Return enabler fields selectors. + * * @return array */ public function getEnablerFields() @@ -84,6 +92,8 @@ public function getEnablerFields() /** * Click 'Configure' button to expand PayPal Payments Advanced configuration. + * + * @return void */ public function clickConfigureButton() { @@ -92,6 +102,8 @@ public function clickConfigureButton() /** * Set 'Enable this Solution' = Yes. + * + * @return void */ public function enablePaymentsAdvanced() { @@ -104,6 +116,8 @@ public function enablePaymentsAdvanced() /** * Set 'Enable this Solution' = No. + * + * @return void */ public function disablePaymentsAdvanced() { diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsPro.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsPro.php index 8197f52c3b78d..a6adf4dd4d8d3 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsPro.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsPro.php @@ -15,7 +15,7 @@ class PaymentsPro extends Block { /** - * @var string + * @var array */ private $fields = [ 'Email Associated with PayPal Merchant Account' => '#payment_us_paypal_group_all_in_one_wpp_usuk_paypal_' . @@ -30,14 +30,6 @@ class PaymentsPro extends Block 'settings_pwd' ]; - /** - * @return string - */ - public function getFields() - { - return $this->fields; - } - /** * @var array */ @@ -57,6 +49,8 @@ public function getFields() /** * Specify credentials in PayPal Payments Pro configuration. + * + * @return void */ public function specifyCredentials() { @@ -70,6 +64,8 @@ public function specifyCredentials() /** * Set fields for credentials empty in PayPal Payments Pro configuration. + * + * @return void */ public function clearCredentials() { @@ -81,6 +77,18 @@ public function clearCredentials() } /** + * Return credentials fields selectors. + * + * @return array + */ + public function getFields() + { + return $this->fields; + } + + /** + * Return enabler fields selectors. + * * @return array */ public function getEnablerFields() @@ -90,6 +98,8 @@ public function getEnablerFields() /** * Click 'Configure' button to expand PayPal Payments Pro configuration. + * + * @return void */ public function clickConfigureButton() { @@ -98,6 +108,8 @@ public function clickConfigureButton() /** * Set 'Enable this Solution' = Yes. + * + * @return void */ public function enablePaymentsPro() { @@ -110,6 +122,8 @@ public function enablePaymentsPro() /** * Set 'Enable this Solution' = No. + * + * @return void */ public function disablePaymentsPro() { diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php index d1534e36cc4d6..fa0f4859e2c1d 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php @@ -87,7 +87,7 @@ public function __construct( } /** - * . + * Run step for checking PayPal Express Checkout configuration. * * @return void */ @@ -102,6 +102,8 @@ public function run() /** * Enables Express Checkout and makes assertions for fields. + * + * @return void */ private function enableExpressCheckout() { @@ -131,6 +133,8 @@ private function enableExpressCheckout() /** * Disables Express Checkout and makes assertions for fields. + * + * @return void */ private function disableExpressCheckout() { diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php index 8fb4d4734e2ba..73d1a3777fbf5 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php @@ -23,7 +23,6 @@ class CheckPayflowLinkConfigStep implements TestStepInterface */ private $systemConfigEditSectionPayment; - /** * @var AssertFieldsAreDisabled */ @@ -88,7 +87,7 @@ public function __construct( } /** - * . + * Run step for checking Payflow Link configuration. * * @return void */ @@ -101,6 +100,8 @@ public function run() /** * Enables Payflow Link and makes assertions for fields. + * + * @return void */ private function enablePayflowLink() { @@ -135,6 +136,8 @@ private function enablePayflowLink() /** * Disables Payflow Link and makes assertions for fields. + * + * @return void */ private function disablePayflowLink() { diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php index 01675de5f6c0b..5155e01db3a53 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php @@ -87,7 +87,7 @@ public function __construct( } /** - * . + * Run step for checking Payflow Pro configuration. * * @return void */ @@ -100,6 +100,8 @@ public function run() /** * Enables Payflow Pro and makes assertions for fields. + * + * @return void */ private function enablePayflowPro() { @@ -134,6 +136,8 @@ private function enablePayflowPro() /** * Disables Payflow Pro and makes assertions for fields. + * + * @return void */ private function disablePayflowPro() { diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php index 51e9b1eb908be..2cd01e425aa4c 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php @@ -87,7 +87,7 @@ public function __construct( } /** - * . + * Run step for checking Payments Advanced configuration. * * @return void */ @@ -100,6 +100,8 @@ public function run() /** * Enables Payments Advanced and makes assertions for fields. + * + * @return void */ private function enablePaymentsAdvanced() { @@ -127,6 +129,8 @@ private function enablePaymentsAdvanced() /** * Disables Payments Advanced and makes assertions for fields. + * + * @return void */ private function disablePaymentsAdvanced() { diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php index dc0102c8d1630..6ac13c679a192 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php @@ -77,7 +77,6 @@ public function __construct( $sections ) { $this->systemConfigEditSectionPayment = $systemConfigEditSectionPayment; - $this->assertSolutionsAvailableInSection = $assertSolutionsAvailableInSection; $this->assertFieldsAreDisabled = $assertFieldsAreDisabled; $this->assertFieldsArePresent = $assertFieldsArePresent; $this->assertFieldsAreActive = $assertFieldsAreActive; @@ -88,7 +87,7 @@ public function __construct( } /** - * . + * Run step for checking Payments Pro configuration. * * @return void */ @@ -101,6 +100,8 @@ public function run() /** * Enables Payments Pro and makes assertions for fields. + * + * @return void */ private function enablePaymentsPro() { @@ -135,6 +136,8 @@ private function enablePaymentsPro() /** * Disables Payments Pro and makes assertions for fields. + * + * @return void */ private function disablePaymentsPro() { From afe356ffb82821b82968fac0629a3d0388b5cd60 Mon Sep 17 00:00:00 2001 From: Roman Liukshyn Date: Wed, 3 Aug 2016 17:17:36 +0300 Subject: [PATCH 18/21] MAGETWO-55680: Create functional tests - Added save config after disable payment method --- .../Braintree/Test/TestStep/CheckBraintreeConfigStep.php | 2 ++ .../Magento/Payment/Test/TestCase/ConflictResolutionTest.xml | 4 ++-- .../Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php | 2 ++ .../Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php | 2 ++ .../Paypal/Test/TestStep/CheckPayflowProConfigStep.php | 2 ++ .../Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php | 2 ++ .../Paypal/Test/TestStep/CheckPaymentsProConfigStep.php | 2 ++ 7 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php index a1485cf802ee0..e9cf62c14a8c1 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php @@ -133,5 +133,7 @@ private function disableBraintree() ); $this->braintreeConfigBlock->disableBraintree(); $this->assertFieldsAreActive->processAssert($this->systemConfigEditSectionPayment, $enablers); + $this->systemConfigEditSectionPayment->getPageActions()->save(); + $this->systemConfigEditSectionPayment->getMessagesBlock()->waitSuccessMessage(); } } diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.xml b/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.xml index 3c18acc37ca57..f344b94fcf221 100644 --- a/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.xml +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.xml @@ -7,8 +7,8 @@ --> - + US diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php index fa0f4859e2c1d..bc6666583ae6e 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php @@ -147,5 +147,7 @@ private function disableExpressCheckout() $this->systemConfigEditSectionPayment, [$enablers['Enable In-Context Checkout Experience'], $enablers['Enable PayPal Credit']] ); + $this->systemConfigEditSectionPayment->getPageActions()->save(); + $this->systemConfigEditSectionPayment->getMessagesBlock()->waitSuccessMessage(); } } diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php index 73d1a3777fbf5..6d4cef12ba048 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php @@ -153,5 +153,7 @@ private function disablePayflowLink() $this->systemConfigEditSectionPayment, [$enablers['Enable Express Checkout'], $enablers['Enable PayPal Credit']] ); + $this->systemConfigEditSectionPayment->getPageActions()->save(); + $this->systemConfigEditSectionPayment->getMessagesBlock()->waitSuccessMessage(); } } diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php index 5155e01db3a53..07e495bac8abf 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php @@ -153,5 +153,7 @@ private function disablePayflowPro() $this->systemConfigEditSectionPayment, [$enablers['Enable PayPal Credit']] ); + $this->systemConfigEditSectionPayment->getPageActions()->save(); + $this->systemConfigEditSectionPayment->getMessagesBlock()->waitSuccessMessage(); } } diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php index 2cd01e425aa4c..2859235e920ed 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php @@ -143,5 +143,7 @@ private function disablePaymentsAdvanced() $this->systemConfigEditSectionPayment, [$enablers['Enable PayPal Credit']] ); + $this->systemConfigEditSectionPayment->getPageActions()->save(); + $this->systemConfigEditSectionPayment->getMessagesBlock()->waitSuccessMessage(); } } diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php index 6ac13c679a192..ff57d0fea4a03 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php @@ -153,5 +153,7 @@ private function disablePaymentsPro() $this->systemConfigEditSectionPayment, [$enablers['Enable PayPal Credit']] ); + $this->systemConfigEditSectionPayment->getPageActions()->save(); + $this->systemConfigEditSectionPayment->getMessagesBlock()->waitSuccessMessage(); } } From d2a3416563f56bbb6cf8839afa8072c2c8f86fb7 Mon Sep 17 00:00:00 2001 From: Dmytro Yushkin Date: Thu, 4 Aug 2016 12:51:46 +0300 Subject: [PATCH 19/21] MAGETWO-55676: PayPal Payments Configuration UX/links update - Translate labels added --- .../Braintree/etc/adminhtml/system.xml | 4 +- app/code/Magento/Braintree/i18n/en_US.csv | 3 +- .../Magento/Paypal/etc/adminhtml/system.xml | 14 +- .../etc/adminhtml/system/express_checkout.xml | 2 +- .../etc/adminhtml/system/payflow_advanced.xml | 2 +- .../etc/adminhtml/system/payflow_link.xml | 2 +- .../system/payments_pro_hosted_solution.xml | 2 +- ..._hosted_solution_with_express_checkout.xml | 2 +- .../adminhtml/system/paypal_payflowpro.xml | 2 +- app/code/Magento/Paypal/i18n/en_US.csv | 4 +- .../Structure/Reader/_files/actual/config.xml | 268 +++++++++++------- .../Reader/_files/expected/config.xml | 256 ++++++++++------- 12 files changed, 342 insertions(+), 219 deletions(-) diff --git a/app/code/Magento/Braintree/etc/adminhtml/system.xml b/app/code/Magento/Braintree/etc/adminhtml/system.xml index 9c11a4a06e971..5f62a9d7cf192 100644 --- a/app/code/Magento/Braintree/etc/adminhtml/system.xml +++ b/app/code/Magento/Braintree/etc/adminhtml/system.xml @@ -9,7 +9,7 @@
- + No setup or monthly fees and your customers never leave your store to complete the purchase.]]> complex braintree-section @@ -40,7 +40,7 @@ - + http://docs.magento.com/m2/ce/user_guide/payment/braintree.html Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint diff --git a/app/code/Magento/Braintree/i18n/en_US.csv b/app/code/Magento/Braintree/i18n/en_US.csv index 4cdb8538c3abf..f5e2d36e1e9bb 100644 --- a/app/code/Magento/Braintree/i18n/en_US.csv +++ b/app/code/Magento/Braintree/i18n/en_US.csv @@ -164,4 +164,5 @@ Debug,Debug "europe_bank_accout","Europe bank account" "credit_card","Credit card" "apple_pay_card","Apple pay card" -"android_pay_card","Android pay card" \ No newline at end of file +"android_pay_card","Android pay card" +"Accept credit/debit cards and PayPal in your Magento store.
No setup or monthly fees and your customers never leave your store to complete the purchase.","Accept credit/debit cards and PayPal in your Magento store.
No setup or monthly fees and your customers never leave your store to complete the purchase." \ No newline at end of file diff --git a/app/code/Magento/Paypal/etc/adminhtml/system.xml b/app/code/Magento/Paypal/etc/adminhtml/system.xml index 666c7064c735a..68fe46bc258b7 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system.xml @@ -51,7 +51,7 @@
- + complex paypal-express-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment @@ -70,7 +70,7 @@ Choose a secure bundled payment solution for your business. other_paypal_payment_solutions - + payment/paypal_payment_pro/active @@ -114,7 +114,7 @@ - + complex paypal-other-section paypal-gateways-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded @@ -125,7 +125,7 @@
- + complex paypal-express-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment @@ -185,7 +185,7 @@
- + complex paypal-express-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment @@ -206,7 +206,7 @@
- + complex paypal-express-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment @@ -274,7 +274,7 @@ complex paypal-other-section paypal-gateways-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded - + payment/paypal_payment_pro/active diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml b/app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml index c7da1959ec257..1876f07830ba7 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml @@ -12,7 +12,7 @@ paypal-other-section Add PayPal as an additional payment method to your checkout page. payment/paypal_express/active - + http://docs.magento.com/m2/ce/user_guide/payment/paypal-express-checkout.html Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/payflow_advanced.xml b/app/code/Magento/Paypal/etc/adminhtml/system/payflow_advanced.xml index a99ce1df4521c..c6b29b094f896 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/payflow_advanced.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/payflow_advanced.xml @@ -12,7 +12,7 @@ Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment Includes Express Checkout)]]> payment/payflow_advanced/active - + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-advanced.html Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/payflow_link.xml b/app/code/Magento/Paypal/etc/adminhtml/system/payflow_link.xml index 45d7d1c488273..4167ea92c1b46 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/payflow_link.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/payflow_link.xml @@ -12,7 +12,7 @@ paypal-other-section Includes Express Checkout)]]> payment/payflow_link/active - + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payflow-link.html Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution.xml b/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution.xml index b4768736e17c3..37141f40549c9 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution.xml @@ -13,7 +13,7 @@ payment/hosted_pro/active Includes Express Checkout)]]> 1 - + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-pro.html Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution_with_express_checkout.xml b/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution_with_express_checkout.xml index d86212ed34e8c..a70d8531f2165 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution_with_express_checkout.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/payments_pro_hosted_solution_with_express_checkout.xml @@ -6,7 +6,7 @@ */ --> - + 0 diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro.xml b/app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro.xml index 85640d113cf70..b567ac87c4fe2 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro.xml @@ -13,7 +13,7 @@ Includes Express Checkout)]]> payment/payflowpro/active 1 - + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payflow-pro.html Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint diff --git a/app/code/Magento/Paypal/i18n/en_US.csv b/app/code/Magento/Paypal/i18n/en_US.csv index ad97afb85e65e..5c3bf52d825b9 100644 --- a/app/code/Magento/Paypal/i18n/en_US.csv +++ b/app/code/Magento/Paypal/i18n/en_US.csv @@ -677,4 +677,6 @@ User,User The PayPal Advertising Program has been shown to generate additional purchases as well as increase consumer's average purchase sizes by 15% or more. See Details. " -"payflowpro","Payflow Pro" \ No newline at end of file +"payflowpro","Payflow Pro" +"Payments Pro","Payments Pro" +"Website Payments Pro","Website Payments Pro" \ No newline at end of file diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/actual/config.xml b/dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/actual/config.xml index 633434d307487..6a607e45b68fa 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/actual/config.xml +++ b/dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/actual/config.xml @@ -5,14 +5,10 @@ * See COPYING.txt for license details. */ --> - +
- - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint - https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup - - + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded @@ -24,6 +20,21 @@ paypal/general/merchant_country + + + paypal-top-section paypal-recommended-header + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + + + + paypal-top-section paypal-other-header + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + + + + paypal-top-section payments-other-header + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded +
@@ -33,24 +44,38 @@ +
-
- - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group +
+ + + + complex paypal-express-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment + Add another payment method to your existing solution or as a stand-alone option. + https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content + 0 + payment/paypal_express/active + payment/payflow_express/active + recommended_solutions + + + + + complex paypal-other-section paypal-all-in-one-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded Choose a secure bundled payment solution for your business. - https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + other_paypal_payment_solutions - - + + payment/paypal_payment_pro/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-pro.html + 0 @@ -68,10 +93,15 @@ Accept credit card and PayPal payments securely. payment/wps_express/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-standard.html + + + payment/wps_express/active @@ -84,46 +114,45 @@ - - - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - Process payments using your own internet merchant account. - https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content + + + complex paypal-other-section paypal-gateways-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + other_paypal_payment_solutions - - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - Add another payment method to your existing solution or as a stand-alone option. - https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content - - 0 - payment/paypal_express/active - payment/payflow_express/active - -
- - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group + + + + complex paypal-express-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment + Add another payment method to your existing solution or as a stand-alone option. + https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content + recommended_solutions + + + + + + + + + complex paypal-other-section paypal-all-in-one-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded Choose a secure bundled payment solution for your business. https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + other_paypal_payment_solutions pp-general-uk - https://www.paypal-business.co.uk/process-online-payments-with-paypal/index.htm http://www.youtube.com/watch?v=LBe-TW87eGI&list=PLF18B1094ABCD7CE8&index=1&feature=plpp_video Accept payments with a completely customizable checkout page. + @@ -132,10 +161,16 @@ Accept credit card and PayPal payments securely. payment/wps_express/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-standard.html + + + + payment/wps_express/active @@ -147,32 +182,19 @@ - - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - Add another payment method to your existing solution or as a stand-alone option. - https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content - - - - - -
- - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - Add another payment method to your existing solution or as a stand-alone option. - https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup - + + + + complex paypal-express-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment + Add another payment method to your existing solution or as a stand-alone option. + https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + recommended_solutions + @@ -184,49 +206,86 @@
- - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group + + + complex paypal-express-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment Add another payment method to your existing solution or as a stand-alone option. https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup - + recommended_solutions + + + + + + + + complex paypal-other-section paypal-all-in-one-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + Choose a secure bundled payment solution for your business. + https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + other_paypal_payment_solutions + + complex + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment Accept credit card and PayPal payments securely. payment/wps_express/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-standard.html + + + payment/wps_express/active + - - - - - + + + + complex paypal-other-section paypal-gateways-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + Process payments using your own internet merchant account. + https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content + other_paypal_payment_solutions
- + + payment/paypal_express/active + payment/payflow_express/active + + - + + + complex paypal-other-section paypal-gateways-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + + payment/paypal_payment_pro/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-pro.html + + + paypal-enabler paypal-ec-pe 0 @@ -238,75 +297,76 @@ - - + + + - - payment/paypal_express/active - payment/payflow_express/active -
- - - + + + + + + -
- + + -
- + + -
- + + -
- + + -
- + + -
- - - - + + + + + +
diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/expected/config.xml b/dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/expected/config.xml index e4187754b44da..9dc77b836656a 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/expected/config.xml +++ b/dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/expected/config.xml @@ -5,14 +5,10 @@ * See COPYING.txt for license details. */ --> - +
- - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint - https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup - - + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded @@ -24,6 +20,21 @@ paypal/general/merchant_country + + + paypal-top-section paypal-recommended-header + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + + + + paypal-top-section paypal-other-header + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + + + + paypal-top-section payments-other-header + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded +
@@ -33,7 +44,7 @@ Includes Express Checkout)]]> payment/payflowpro/active 1 - + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payflow-pro.html Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint @@ -242,7 +253,7 @@ paypal-other-section Includes Express Checkout)]]> payment/payflow_link/active - + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payflow-link.html Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint @@ -571,7 +582,7 @@ paypal-other-section Add PayPal as an additional payment method to your checkout page. payment/paypal_express/active - + http://docs.magento.com/m2/ce/user_guide/payment/paypal-express-checkout.html Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint @@ -1214,7 +1225,7 @@ payment/hosted_pro/active Includes Express Checkout)]]> 1 - + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-pro.html Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint @@ -1419,27 +1430,25 @@ +
- - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group + + + complex paypal-other-section paypal-all-in-one-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded Choose a secure bundled payment solution for your business. - https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + other_paypal_payment_solutions paypal-other-section Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment Includes Express Checkout)]]> payment/payflow_advanced/active - + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-advanced.html Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint @@ -1750,9 +1759,12 @@ - - + + payment/paypal_payment_pro/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-pro.html + 0 @@ -1770,7 +1782,12 @@ Accept credit card and PayPal payments securely. payment/wps_express/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-standard.html + + + @@ -1786,12 +1803,11 @@ - - - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - Process payments using your own internet merchant account. - https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content + + + complex paypal-other-section paypal-gateways-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + other_paypal_payment_solutions 0 @@ -2020,41 +2036,39 @@ - - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - Add another payment method to your existing solution or as a stand-alone option. - https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content - + + + + complex paypal-express-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment + Add another payment method to your existing solution or as a stand-alone option. + https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content 0 payment/paypal_express/active payment/payflow_express/active + recommended_solutions
- - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group + + + complex paypal-other-section paypal-all-in-one-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded Choose a secure bundled payment solution for your business. https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + other_paypal_payment_solutions pp-general-uk - https://www.paypal-business.co.uk/process-online-payments-with-paypal/index.htm http://www.youtube.com/watch?v=LBe-TW87eGI&list=PLF18B1094ABCD7CE8&index=1&feature=plpp_video Accept payments with a completely customizable checkout page. + - + 0 @@ -2128,6 +2142,9 @@ Accept credit card and PayPal payments securely. payment/wps_express/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-standard.html + @@ -2135,6 +2152,9 @@ payment/wps_express/active + + + @@ -2143,15 +2163,16 @@ - - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - Add another payment method to your existing solution or as a stand-alone option. - https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content - + + + + complex paypal-express-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment + Add another payment method to your existing solution or as a stand-alone option. + https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content + recommended_solutions + @@ -2159,16 +2180,17 @@
- - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group - Add another payment method to your existing solution or as a stand-alone option. - https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup - + + + + complex paypal-express-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment + Add another payment method to your existing solution or as a stand-alone option. + https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + recommended_solutions + @@ -2180,49 +2202,86 @@
- - - 1 - complex - Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group + + + complex paypal-express-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment Add another payment method to your existing solution or as a stand-alone option. https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup - + recommended_solutions + + + + + + + + complex paypal-other-section paypal-all-in-one-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + Choose a secure bundled payment solution for your business. + https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup + other_paypal_payment_solutions + + complex + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment Accept credit card and PayPal payments securely. payment/wps_express/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-standard.html + + + payment/wps_express/active + - - - - - + + + + complex paypal-other-section paypal-gateways-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + Process payments using your own internet merchant account. + https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content + other_paypal_payment_solutions
- + + payment/paypal_express/active + payment/payflow_express/active + + - + + + complex paypal-other-section paypal-gateways-section + Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Expanded + + payment/paypal_payment_pro/active + + http://docs.magento.com/m2/ce/user_guide/payment/paypal-payments-pro.html + + + paypal-enabler paypal-ec-pe 0 @@ -2234,75 +2293,76 @@ - - + + + - - payment/paypal_express/active - payment/payflow_express/active -
- - - + + + + + + -
- + + -
- + + -
- + + -
- + + -
- + + -
- - - - + + + + + +
From 85b7c41222bf39bb0adfef315e33b1282b11f690 Mon Sep 17 00:00:00 2001 From: Roman Liukshyn Date: Wed, 10 Aug 2016 18:50:04 +0300 Subject: [PATCH 20/21] MAGETWO-55671: Order status should be changed related to Kount Status - Fixed annotation in integration test --- .../Controller/Adminhtml/Order/PaymentReviewTest.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php b/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php index d274784c1c8f7..f319a52e42743 100644 --- a/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php +++ b/dev/tests/integration/testsuite/Magento/Braintree/Controller/Adminhtml/Order/PaymentReviewTest.php @@ -7,12 +7,10 @@ use Magento\Framework\Api\FilterBuilder; use Magento\Framework\Api\SearchCriteriaBuilder; -use Magento\Framework\App\Area; use Magento\Framework\Message\MessageInterface; use Magento\Payment\Model\Method\Adapter; use Magento\Sales\Api\Data\OrderInterface; use Magento\Sales\Api\OrderRepositoryInterface; -use Magento\Sales\Controller\Adminhtml\Order\ReviewPayment; use Magento\Sales\Model\Order; use Magento\TestFramework\TestCase\AbstractBackendController; @@ -33,9 +31,6 @@ class PaymentReviewTest extends AbstractBackendController protected function setUp() { - $this->resource = ReviewPayment::ADMIN_RESOURCE; - $this->uri = 'backend/sales/order/reviewpayment'; - $this->_getBootstrap()->loadArea(Area::AREA_ADMINHTML); parent::setUp(); /** @var FilterBuilder $filterBuilder */ @@ -61,6 +56,7 @@ protected function setUp() /** * @covers \Magento\Sales\Controller\Adminhtml\Order\ReviewPayment::execute * @magentoDataFixture Magento/Braintree/_files/fraud_order.php + * @magentoAppArea adminhtml */ public function testExecuteAccept() { @@ -81,6 +77,7 @@ public function testExecuteAccept() /** * @covers \Magento\Sales\Controller\Adminhtml\Order\ReviewPayment::execute * @magentoDataFixture Magento/Braintree/_files/fraud_order.php + * @magentoAppArea adminhtml */ public function testExecuteDeny() { From b9ec499193257cfba7a637d3f081f2e4286e2aef Mon Sep 17 00:00:00 2001 From: Roman Liukshyn Date: Thu, 11 Aug 2016 19:42:58 +0300 Subject: [PATCH 21/21] MAGETWO-54499: PayPal Payments Configuration UX Update - Fixed phpdocs in functional tests for conflict resolution --- .../Test/Block/System/Config/Payments.php | 8 ++++++++ .../Test/Block/System/Config/Braintree.php | 6 ++++++ .../Test/TestStep/CheckBraintreeConfigStep.php | 16 +++++++++++----- .../Test/TestCase/ConflictResolutionTest.xml | 2 +- .../Test/Block/System/Config/ExpressCheckout.php | 6 ++++++ .../Test/Block/System/Config/PayflowLink.php | 6 ++++++ .../Test/Block/System/Config/PayflowPro.php | 6 ++++++ .../Block/System/Config/PaymentsAdvanced.php | 6 ++++++ .../Test/Block/System/Config/PaymentsPro.php | 6 ++++++ .../Test/TestStep/CheckExpressConfigStep.php | 16 +++++++++++----- .../Test/TestStep/CheckPayflowLinkConfigStep.php | 16 +++++++++++----- .../Test/TestStep/CheckPayflowProConfigStep.php | 16 +++++++++++----- .../TestStep/CheckPaymentsAdvancedConfigStep.php | 16 +++++++++++----- .../Test/TestStep/CheckPaymentsProConfigStep.php | 16 +++++++++++----- 14 files changed, 111 insertions(+), 31 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Payments.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Payments.php index 5534ab00fedbc..dc081dc5d261e 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Payments.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/System/Config/Payments.php @@ -8,14 +8,22 @@ use Magento\Mtf\Block\Block; +/** + * Class Payments + * Payments configuration block on Stores > Configuration > Sales > Payment Methods page + */ class Payments extends Block { /** + * Merchant Country selector. + * * @var string */ protected $merchantCountrySelector = "select[id$='_account_merchant_country'] > option[value='%s']"; /** + * Solution title(e.g. PayPal Express Checkout, Payments Advanced, etc.) selector + * * @var string */ protected $solutionTitle = './strong[contains(text(), "%s")]'; diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/System/Config/Braintree.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/System/Config/Braintree.php index 0f8fa8b41b6c4..f46f070216c6e 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/System/Config/Braintree.php +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/Block/System/Config/Braintree.php @@ -15,6 +15,8 @@ class Braintree extends Block { /** + * Braintree credentials fields sectors array. + * * @var array */ private $fields = [ @@ -24,6 +26,8 @@ class Braintree extends Block ]; /** + * Braintree enablers fields sectors array. + * * @var array */ private $enablers = [ @@ -33,6 +37,8 @@ class Braintree extends Block ]; /** + * Braintree 'Configure' button. + * * @var string */ private $configureBraintreeButton = '#payment_us_braintree_section_braintree-head'; diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php index e9cf62c14a8c1..21d11bbfdf739 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/CheckBraintreeConfigStep.php @@ -19,6 +19,8 @@ class CheckBraintreeConfigStep implements TestStepInterface { /** + * Payments configuration page. + * * @var SystemConfigEditSectionPayment */ private $systemConfigEditSectionPayment; @@ -44,12 +46,16 @@ class CheckBraintreeConfigStep implements TestStepInterface private $assertFieldsAreEnabled; /** - * @var + * Country code. + * + * @var string */ private $countryCode; /** - * @var + * Payment sections on Payments configuration page. + * + * @var array */ private $sections; @@ -64,8 +70,8 @@ class CheckBraintreeConfigStep implements TestStepInterface * @param AssertFieldsArePresent $assertFieldsArePresent * @param AssertFieldsAreActive $assertFieldsAreActive * @param AssertFieldsAreEnabled $assertFieldsAreEnabled - * @param $countryCode - * @param $sections + * @param string $countryCode + * @param array $sections */ public function __construct( SystemConfigEditSectionPayment $systemConfigEditSectionPayment, @@ -74,7 +80,7 @@ public function __construct( AssertFieldsAreActive $assertFieldsAreActive, AssertFieldsAreEnabled $assertFieldsAreEnabled, $countryCode, - $sections + array $sections ) { $this->systemConfigEditSectionPayment = $systemConfigEditSectionPayment; $this->assertFieldsAreDisabled = $assertFieldsAreDisabled; diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.xml b/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.xml index f344b94fcf221..dc2ba760025fb 100644 --- a/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.xml +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/TestCase/ConflictResolutionTest.xml @@ -8,7 +8,7 @@ + ticketId="MAGETWO-55707, MAGETWO-38531"> US diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/ExpressCheckout.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/ExpressCheckout.php index aefe03b1e9b54..d83ae0c53ec0a 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/ExpressCheckout.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/ExpressCheckout.php @@ -15,6 +15,8 @@ class ExpressCheckout extends Block { /** + * PayPal Express Checkout credentials fields sectors array. + * * @var array */ private $fields = [ @@ -33,6 +35,8 @@ class ExpressCheckout extends Block ]; /** + * PayPal Express Checkout enablers fields sectors array. + * * @var array */ private $enablers = [ @@ -45,6 +49,8 @@ class ExpressCheckout extends Block ]; /** + * PayPal Express Checkout 'Configure' button selector. + * * @var string */ private $configureExpressButton = '#payment_us_paypal_alternative_payment_methods_express_checkout_us-head'; diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowLink.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowLink.php index 226a62f7633de..de6eb107c61ce 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowLink.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowLink.php @@ -15,6 +15,8 @@ class PayflowLink extends Block { /** + * Payflow Link credentials fields sectors array. + * * @var array */ private $fields = [ @@ -31,6 +33,8 @@ class PayflowLink extends Block ]; /** + * Payflow Link enablers fields sectors array. + * * @var array */ private $enablers = [ @@ -43,6 +47,8 @@ class PayflowLink extends Block ]; /** + * Payflow Link 'Configure' button selector. + * * @var string */ private $configurePayflowLinkButton = '#payment_us_paypal_payment_gateways_payflow_link_us-head'; diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowPro.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowPro.php index 92db87785f3e7..f05092745c760 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowPro.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PayflowPro.php @@ -15,6 +15,8 @@ class PayflowPro extends Block { /** + * Payflow Pro credentials fields sectors array. + * * @var array */ private $fields = [ @@ -31,6 +33,8 @@ class PayflowPro extends Block ]; /** + * Payflow Pro enablers fields sectors array. + * * @var array */ private $enablers = [ @@ -43,6 +47,8 @@ class PayflowPro extends Block ]; /** + * Payflow Pro 'Configure' button selector. + * * @var string */ private $configureProButton = '#payment_us_paypal_payment_gateways_paypal_payflowpro_with_express_checkout-head'; diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsAdvanced.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsAdvanced.php index 6e380b603e066..cd6d1a5b1b38a 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsAdvanced.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsAdvanced.php @@ -15,6 +15,8 @@ class PaymentsAdvanced extends Block { /** + * Payments Advanced credentials fields sectors array. + * * @var array */ private $fields = [ @@ -27,6 +29,8 @@ class PaymentsAdvanced extends Block ]; /** + * Payments Advanced enablers fields sectors array. + * * @var array */ private $enablers = [ @@ -37,6 +41,8 @@ class PaymentsAdvanced extends Block ]; /** + * Payments Advanced 'Configure' button selector. + * * @var string */ private $configureAdvancedButton = '#payment_us_paypal_group_all_in_one_payflow_advanced-head'; diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsPro.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsPro.php index a6adf4dd4d8d3..709dc4b54b53f 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsPro.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/Block/System/Config/PaymentsPro.php @@ -15,6 +15,8 @@ class PaymentsPro extends Block { /** + * Payments Pro enablers fields sectors array. + * * @var array */ private $fields = [ @@ -31,6 +33,8 @@ class PaymentsPro extends Block ]; /** + * Payments Pro enablers fields sectors array. + * * @var array */ private $enablers = [ @@ -43,6 +47,8 @@ class PaymentsPro extends Block ]; /** + * Payments Pro 'Configure' button selector. + * * @var string */ private $configureProButton = '#payment_us_paypal_group_all_in_one_wpp_usuk-head'; diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php index bc6666583ae6e..2a0d87edcca7e 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckExpressConfigStep.php @@ -19,6 +19,8 @@ class CheckExpressConfigStep implements TestStepInterface { /** + * Payments configuration page. + * * @var SystemConfigEditSectionPayment */ private $systemConfigEditSectionPayment; @@ -44,12 +46,16 @@ class CheckExpressConfigStep implements TestStepInterface private $assertFieldsAreEnabled; /** - * @var + * Country code. + * + * @var string */ private $countryCode; /** - * @var + * Payment sections on Payments configuration page. + * + * @var array */ private $sections; @@ -64,8 +70,8 @@ class CheckExpressConfigStep implements TestStepInterface * @param AssertFieldsArePresent $assertFieldsArePresent * @param AssertFieldsAreActive $assertFieldsAreActive * @param AssertFieldsAreEnabled $assertFieldsAreEnabled - * @param $countryCode - * @param $sections + * @param string $countryCode + * @param array $sections */ public function __construct( SystemConfigEditSectionPayment $systemConfigEditSectionPayment, @@ -74,7 +80,7 @@ public function __construct( AssertFieldsAreActive $assertFieldsAreActive, AssertFieldsAreEnabled $assertFieldsAreEnabled, $countryCode, - $sections + array $sections ) { $this->systemConfigEditSectionPayment = $systemConfigEditSectionPayment; $this->assertFieldsAreDisabled = $assertFieldsAreDisabled; diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php index 6d4cef12ba048..930dc8f7f7281 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowLinkConfigStep.php @@ -19,6 +19,8 @@ class CheckPayflowLinkConfigStep implements TestStepInterface { /** + * Payments configuration page. + * * @var SystemConfigEditSectionPayment */ private $systemConfigEditSectionPayment; @@ -44,12 +46,16 @@ class CheckPayflowLinkConfigStep implements TestStepInterface private $assertFieldsAreEnabled; /** - * @var + * Country code. + * + * @var string */ private $countryCode; /** - * @var + * Payment sections on Payments configuration page. + * + * @var array */ private $sections; @@ -64,8 +70,8 @@ class CheckPayflowLinkConfigStep implements TestStepInterface * @param AssertFieldsArePresent $assertFieldsArePresent * @param AssertFieldsAreActive $assertFieldsAreActive * @param AssertFieldsAreEnabled $assertFieldsAreEnabled - * @param $countryCode - * @param $sections + * @param string $countryCode + * @param array $sections */ public function __construct( SystemConfigEditSectionPayment $systemConfigEditSectionPayment, @@ -74,7 +80,7 @@ public function __construct( AssertFieldsAreActive $assertFieldsAreActive, AssertFieldsAreEnabled $assertFieldsAreEnabled, $countryCode, - $sections + array $sections ) { $this->systemConfigEditSectionPayment = $systemConfigEditSectionPayment; $this->assertFieldsAreDisabled = $assertFieldsAreDisabled; diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php index 07e495bac8abf..a468fbde2f4d2 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPayflowProConfigStep.php @@ -19,6 +19,8 @@ class CheckPayflowProConfigStep implements TestStepInterface { /** + * Payments configuration page. + * * @var SystemConfigEditSectionPayment */ private $systemConfigEditSectionPayment; @@ -44,12 +46,16 @@ class CheckPayflowProConfigStep implements TestStepInterface private $assertFieldsAreEnabled; /** - * @var + * Country code. + * + * @var string */ private $countryCode; /** - * @var + * Payment sections on Payments configuration page. + * + * @var array */ private $sections; @@ -64,8 +70,8 @@ class CheckPayflowProConfigStep implements TestStepInterface * @param AssertFieldsArePresent $assertFieldsArePresent * @param AssertFieldsAreActive $assertFieldsAreActive * @param AssertFieldsAreEnabled $assertFieldsAreEnabled - * @param $countryCode - * @param $sections + * @param string $countryCode + * @param array $sections */ public function __construct( SystemConfigEditSectionPayment $systemConfigEditSectionPayment, @@ -74,7 +80,7 @@ public function __construct( AssertFieldsAreActive $assertFieldsAreActive, AssertFieldsAreEnabled $assertFieldsAreEnabled, $countryCode, - $sections + array $sections ) { $this->systemConfigEditSectionPayment = $systemConfigEditSectionPayment; $this->assertFieldsAreDisabled = $assertFieldsAreDisabled; diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php index 2859235e920ed..0cfa76efd7bbf 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsAdvancedConfigStep.php @@ -19,6 +19,8 @@ class CheckPaymentsAdvancedConfigStep implements TestStepInterface { /** + * Payments configuration page. + * * @var SystemConfigEditSectionPayment */ private $systemConfigEditSectionPayment; @@ -44,12 +46,16 @@ class CheckPaymentsAdvancedConfigStep implements TestStepInterface private $assertFieldsAreEnabled; /** - * @var + * Country code. + * + * @var string */ private $countryCode; /** - * @var + * Payment sections on Payments configuration page. + * + * @var array */ private $sections; @@ -64,8 +70,8 @@ class CheckPaymentsAdvancedConfigStep implements TestStepInterface * @param AssertFieldsArePresent $assertFieldsArePresent * @param AssertFieldsAreActive $assertFieldsAreActive * @param AssertFieldsAreEnabled $assertFieldsAreEnabled - * @param $countryCode - * @param $sections + * @param string $countryCode + * @param array $sections */ public function __construct( SystemConfigEditSectionPayment $systemConfigEditSectionPayment, @@ -74,7 +80,7 @@ public function __construct( AssertFieldsAreActive $assertFieldsAreActive, AssertFieldsAreEnabled $assertFieldsAreEnabled, $countryCode, - $sections + array $sections ) { $this->systemConfigEditSectionPayment = $systemConfigEditSectionPayment; $this->assertFieldsAreDisabled = $assertFieldsAreDisabled; diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php index ff57d0fea4a03..2555eab030720 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/CheckPaymentsProConfigStep.php @@ -19,6 +19,8 @@ class CheckPaymentsProConfigStep implements TestStepInterface { /** + * Payments configuration page. + * * @var SystemConfigEditSectionPayment */ private $systemConfigEditSectionPayment; @@ -44,12 +46,16 @@ class CheckPaymentsProConfigStep implements TestStepInterface private $assertFieldsAreEnabled; /** - * @var + * Country code. + * + * @var string */ private $countryCode; /** - * @var + * Payment sections on Payments configuration page. + * + * @var array */ private $sections; @@ -64,8 +70,8 @@ class CheckPaymentsProConfigStep implements TestStepInterface * @param AssertFieldsArePresent $assertFieldsArePresent * @param AssertFieldsAreActive $assertFieldsAreActive * @param AssertFieldsAreEnabled $assertFieldsAreEnabled - * @param $countryCode - * @param $sections + * @param string $countryCode + * @param array $sections */ public function __construct( SystemConfigEditSectionPayment $systemConfigEditSectionPayment, @@ -74,7 +80,7 @@ public function __construct( AssertFieldsAreActive $assertFieldsAreActive, AssertFieldsAreEnabled $assertFieldsAreEnabled, $countryCode, - $sections + array $sections ) { $this->systemConfigEditSectionPayment = $systemConfigEditSectionPayment; $this->assertFieldsAreDisabled = $assertFieldsAreDisabled;