diff --git a/tests/Browser/ClientPortal/Gateways/WePay/CreditCardTest.php b/tests/Browser/ClientPortal/Gateways/WePay/CreditCardTest.php index 38b3968b3533..84f333f9fe80 100644 --- a/tests/Browser/ClientPortal/Gateways/WePay/CreditCardTest.php +++ b/tests/Browser/ClientPortal/Gateways/WePay/CreditCardTest.php @@ -75,4 +75,18 @@ class CreditCardTest extends DuskTestCase ->assertSee('4018'); }); } + + public function testPayWithSavedCreditCard() + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.invoices.index') + ->click('@pay-now') + ->press('Pay Now') + ->clickLink('Credit Card') + ->click('.toggle-payment-with-token') + ->press('Pay Now') + ->waitForText('Details of the payment', 60); + }); + } }