[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Integration test that the PayPal legacy gateway shows an err...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/341478 ) Change subject: Integration test that the PayPal legacy gateway shows an error form rather than redirect. .. Integration test that the PayPal legacy gateway shows an error form rather than redirect. Bug: T98447 Change-Id: I89dadb01d28f3590bbbc670d224600c376e98b80 --- M tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php 1 file changed, 25 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php b/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php index 9f7a3c9..8bda5b1 100644 --- a/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php +++ b/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php @@ -199,6 +199,31 @@ } /** +* Stay on the payments form if there's a currency conversion notification. +*/ + function testShowFormOnCurrencyFallback() { + $init = $this->getDonorTestData(); + $init['currency'] = 'BBD'; + $init['amount'] = 15.00; + $session = array( 'Donor' => $init ); + $this->setMwGlobals( array( + 'wgDonationInterfaceFallbackCurrency' => 'USD', + 'wgDonationInterfaceNotifyOnConvert' => true, + ) ); + $errorMessage = wfMessage( 'donate_interface-fallback-currency-notice', 'USD' )->text(); + $assertNodes = array( + 'headers' => array( + 'location' => null, + ), + 'topError' => array( + 'innerhtmlmatches' => "/.*$errorMessage.*/" + ) + ); + + $this->verifyFormOutput( 'PaypalLegacyGateway', $init, $assertNodes, false, $session ); + } + + /** * Integration test to verify that the Donate transaction works as expected in Belgium for fr, de, and nl. * * @dataProvider belgiumLanguageProvider -- To view, visit https://gerrit.wikimedia.org/r/341478 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89dadb01d28f3590bbbc670d224600c376e98b80 Gerrit-PatchSet: 8 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: AwightGerrit-Reviewer: AndyRussG Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ejegg Gerrit-Reviewer: Ssmith Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Integration test that the PayPal legacy gateway shows an err...
Awight has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/341478 ) Change subject: Integration test that the PayPal legacy gateway shows an error form rather than redirect. .. Integration test that the PayPal legacy gateway shows an error form rather than redirect. Strange that this passes, cos the feature is broken in a browser and we just redirect. Change-Id: I89dadb01d28f3590bbbc670d224600c376e98b80 --- M tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/78/341478/1 diff --git a/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php b/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php index 9f7a3c9..affadab 100644 --- a/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php +++ b/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php @@ -199,6 +199,30 @@ } /** +* Stay on the payments form if there's a currency conversion notification. +*/ + function testShowFormOnCurrencyFallback() { + $init = $this->getDonorTestData(); + $init['currency'] = 'AMD'; + $session = array( 'Donor' => $init ); + $this->setMwGlobals( array( + 'wgPaypalGatewayFallbackCurrency' => 'USD', + 'wgDonationInterfaceNotifyOnConvert' => true, + ) ); + $errorMessage = wfMessage( 'donate_interface-fallback-currency-notice', 'USD' )->text(); + $assertNodes = array( + 'headers' => array( + 'location' => null, + ), + 'topError' => array( + 'innerhtmlmatches' => "/.*$errorMessage.*/" + ) + ); + + $this->verifyFormOutput( 'PaypalLegacyGateway', $init, $assertNodes, false, $session ); + } + + /** * Integration test to verify that the Donate transaction works as expected in Belgium for fr, de, and nl. * * @dataProvider belgiumLanguageProvider -- To view, visit https://gerrit.wikimedia.org/r/341478 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89dadb01d28f3590bbbc670d224600c376e98b80 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits