From e32c9f44af5bdd6d274e222daa1797ef38c15afd Mon Sep 17 00:00:00 2001 From: Maicon Gouveia Date: Wed, 20 Oct 2021 16:24:49 -0300 Subject: [PATCH 1/5] fix js getFingerPrintLink function --- .../frontend/web/js/view/method-renderer/custom-method.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MercadoPago/Core/view/frontend/web/js/view/method-renderer/custom-method.js b/src/MercadoPago/Core/view/frontend/web/js/view/method-renderer/custom-method.js index d04ca5da..336a7848 100644 --- a/src/MercadoPago/Core/view/frontend/web/js/view/method-renderer/custom-method.js +++ b/src/MercadoPago/Core/view/frontend/web/js/view/method-renderer/custom-method.js @@ -218,7 +218,10 @@ define( }, getFingerPrintLink: function () { - return configPayment['fingerprint_link']; + if (window.checkoutConfig.payment[this.getCode()] !== undefined) { + return window.checkoutConfig.payment[this.getCode()]['fingerprint_link']; + } + return ''; }, getSuccessUrl: function () { From f94e3e18fcb6ffc764511c77a08b9b665c2400e3 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Thu, 21 Oct 2021 12:27:56 -0300 Subject: [PATCH 2/5] feat: PR coverage percentage set to block pull request --- bin/pull-request-coverage.sh | 2 +- docker-compose.yml | 2 -- src/MercadoPago/Core/Block/Info.php | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/pull-request-coverage.sh b/bin/pull-request-coverage.sh index 11809e0f..e0e69a72 100644 --- a/bin/pull-request-coverage.sh +++ b/bin/pull-request-coverage.sh @@ -6,4 +6,4 @@ export PHPUNIT_FILES=$(curl -H "Accept: application/vnd.github.v3+json" https:// | grep -E 'php"$' \ | xargs) -php magento2/app/code/MercadoPago/Test/pull-request-coverage-checker.php clover.xml 80 $PHPUNIT_FILES +php magento2/app/code/MercadoPago/Test/pull-request-coverage-checker.php clover.xml 40 $PHPUNIT_FILES diff --git a/docker-compose.yml b/docker-compose.yml index 706bbdb0..c69bf520 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,8 +17,6 @@ services: build: context: . dockerfile: Dockerfile - args: - username: root container_name: magento-php links: - mysql diff --git a/src/MercadoPago/Core/Block/Info.php b/src/MercadoPago/Core/Block/Info.php index 7b039b51..c1a23555 100644 --- a/src/MercadoPago/Core/Block/Info.php +++ b/src/MercadoPago/Core/Block/Info.php @@ -46,8 +46,8 @@ public function __construct( */ protected function _prepareSpecificInformation($transport = null) { - $transport = parent::_prepareSpecificInformation($transport); $data = []; + $transport = parent::_prepareSpecificInformation($transport); $info = $this->getInfo(); $paymentResponse = $info->getAdditionalInformation('paymentResponse'); @@ -94,4 +94,5 @@ protected function _prepareSpecificInformation($transport = null) return $transport->setData(array_merge($data, $transport->getData())); } //end _prepareSpecificInformation() + }//end class From ae883fcd423bf4db191aeada1588cfc277fe33c4 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Thu, 21 Oct 2021 12:36:09 -0300 Subject: [PATCH 3/5] feat: Added throw on pull-request-coverage-checker --- src/MercadoPago/Test/pull-request-coverage-checker.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/MercadoPago/Test/pull-request-coverage-checker.php b/src/MercadoPago/Test/pull-request-coverage-checker.php index 48626ef9..fb15a51b 100644 --- a/src/MercadoPago/Test/pull-request-coverage-checker.php +++ b/src/MercadoPago/Test/pull-request-coverage-checker.php @@ -52,3 +52,5 @@ print_r('Code coverage is ' . round($coverage, 2) . '%, which is below the accepted ' . $percentage . '%'); print_r(' -> Pull Request Rejected'); + +throw new Exception('Code coverage is ' . round($coverage, 2) . '%, which is below the accepted ' . $percentage . '%'); From 6f06c811699a96268449036ee11b8f62b6d8ade2 Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Thu, 21 Oct 2021 13:39:20 -0300 Subject: [PATCH 4/5] feat: Bug to run pipeline From 3fb6b0a52d148a3388dfbb19bf08edd192a985fe Mon Sep 17 00:00:00 2001 From: Giovanni Cavallari Date: Thu, 21 Oct 2021 13:49:41 -0300 Subject: [PATCH 5/5] feat: Revert Core/Block/Info.php --- src/MercadoPago/Core/Block/Info.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MercadoPago/Core/Block/Info.php b/src/MercadoPago/Core/Block/Info.php index c1a23555..7b039b51 100644 --- a/src/MercadoPago/Core/Block/Info.php +++ b/src/MercadoPago/Core/Block/Info.php @@ -46,8 +46,8 @@ public function __construct( */ protected function _prepareSpecificInformation($transport = null) { - $data = []; $transport = parent::_prepareSpecificInformation($transport); + $data = []; $info = $this->getInfo(); $paymentResponse = $info->getAdditionalInformation('paymentResponse'); @@ -94,5 +94,4 @@ protected function _prepareSpecificInformation($transport = null) return $transport->setData(array_merge($data, $transport->getData())); } //end _prepareSpecificInformation() - }//end class