From aaf84e0e3b393ffe6f54c35c47ffa12db1dd21c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Wed, 18 Aug 2021 17:59:12 +0200 Subject: [PATCH] Tests: Payment with saved credit card --- .../Gateways/Square/CreditCardTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/Browser/ClientPortal/Gateways/Square/CreditCardTest.php b/tests/Browser/ClientPortal/Gateways/Square/CreditCardTest.php index 539cc6ee3120..d0be25dcb7ee 100644 --- a/tests/Browser/ClientPortal/Gateways/Square/CreditCardTest.php +++ b/tests/Browser/ClientPortal/Gateways/Square/CreditCardTest.php @@ -78,4 +78,18 @@ class CreditCardTest extends DuskTestCase ->assertSee('4242'); }); } + + public function testPayWithSavedCreditCard() + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.invoices.index') + ->click('@pay-now') + ->click('@pay-now-dropdown') + ->clickLink('Credit Card') + ->click('.toggle-payment-with-token') + ->click('#pay-now') + ->waitForText('Details of the payment', 60); + }); + } }