From ce8b2c76a13096811f93b4a7b3f0a17a225a5435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Wed, 13 Oct 2021 15:40:48 +0200 Subject: [PATCH] Pay with new bank account & save for future --- .../ClientPortal/Gateways/Stripe/SEPATest.php | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/Browser/ClientPortal/Gateways/Stripe/SEPATest.php b/tests/Browser/ClientPortal/Gateways/Stripe/SEPATest.php index d30806176391..d347518dca5e 100644 --- a/tests/Browser/ClientPortal/Gateways/Stripe/SEPATest.php +++ b/tests/Browser/ClientPortal/Gateways/Stripe/SEPATest.php @@ -77,4 +77,24 @@ class SEPATest extends DuskTestCase ->waitForText('Details of the payment', 60); }); } + + public function testPayingWithNewSEPABankAccountAndSaveForFuture(): void + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.invoices.index') + ->click('@pay-now') + ->click('@pay-now-dropdown') + ->clickLink('SEPA Direct Debit') + ->type('#sepa-name', 'John Doe') + ->type('#sepa-email-address', 'test@invoiceninja.com') + ->withinFrame('iframe', function (Browser $browser) { + $browser->type('iban', 'DE89370400440532013000'); + }) + ->check('#sepa-mandate-acceptance', true) + ->radio('#proxy_is_default', true) + ->click('#pay-now') + ->waitForText('Details of the payment', 60); + }); + } }