diff --git a/tests/Browser/ClientPortal/Gateways/Square/CreditCardTest.php b/tests/Browser/ClientPortal/Gateways/Square/CreditCardTest.php index bd8087476fec..ec9e08addea1 100644 --- a/tests/Browser/ClientPortal/Gateways/Square/CreditCardTest.php +++ b/tests/Browser/ClientPortal/Gateways/Square/CreditCardTest.php @@ -32,4 +32,25 @@ class CreditCardTest extends DuskTestCase ->auth(); }); } + + public function testPaymentWithNewCard() + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.invoices.index') + ->click('@pay-now') + ->click('@pay-now-dropdown') + ->clickLink('Credit Card') + ->type('#cardholder-name', 'John Doe') + ->withinFrame('iframe', function (Browser $browser) { + $browser + ->type('#cardNumber', '4111 1111 1111 1111') + ->type('#expirationDate', '04/22') + ->type('#cvv', '1111') + ->type('#postalCode', '12345'); + }) + ->click('#pay-now') + ->waitForText('Details of the payment', 60); + }); + } }