From 7b70fadfa35183a4ae8b6f693918a06d9356e405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 9 Jul 2021 16:03:53 +0200 Subject: [PATCH] Gateways: Braintree: Credit card: Adding credit card standalone shouldn't be possible --- .../Gateways/Braintree/CreditCardTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Browser/ClientPortal/Gateways/Braintree/CreditCardTest.php b/tests/Browser/ClientPortal/Gateways/Braintree/CreditCardTest.php index 6615eb99c10b..f725521e77f5 100644 --- a/tests/Browser/ClientPortal/Gateways/Braintree/CreditCardTest.php +++ b/tests/Browser/ClientPortal/Gateways/Braintree/CreditCardTest.php @@ -113,4 +113,15 @@ class CreditCardTest extends DuskTestCase ->assertSee('Payment method has been successfully removed.'); }); } + + public function testAddingPaymentMethodShouldntBePossible() + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.payment_methods.index') + ->press('Add Payment Method') + ->clickLink('Credit Card') + ->assertSee('This payment method can be can saved for future use, once you complete your first transaction. Don\'t forget to check "Store credit card details" during payment process.'); + }); + } }