From f4b7f4b85c87f86cf42e768a903265389da5954e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 9 Jul 2021 16:01:01 +0200 Subject: [PATCH] Gateways: Braintree: Credit card: Pay with saved card --- .../Gateways/Braintree/CreditCardTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/Browser/ClientPortal/Gateways/Braintree/CreditCardTest.php b/tests/Browser/ClientPortal/Gateways/Braintree/CreditCardTest.php index 3d6b8d9acd55..8fd4f8221e93 100644 --- a/tests/Browser/ClientPortal/Gateways/Braintree/CreditCardTest.php +++ b/tests/Browser/ClientPortal/Gateways/Braintree/CreditCardTest.php @@ -86,4 +86,18 @@ class CreditCardTest extends DuskTestCase ->assertSee('1111'); }); } + + public function testPayWithSavedCard() + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.invoices.index') + ->click('@pay-now') + ->press('Pay Now') + ->clickLink('Credit Card') + ->click('.toggle-payment-with-token') + ->click('#pay-now-with-token') + ->waitForText('Details of the payment', 60); + }); + } }