From 1d1ca46aac80771ced3ec3f960e05ba7ce9b0a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Sun, 15 Aug 2021 16:23:37 +0200 Subject: [PATCH] Credit card: Authorizing test --- .../Gateways/Eway/CreditCardTest.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/Browser/ClientPortal/Gateways/Eway/CreditCardTest.php b/tests/Browser/ClientPortal/Gateways/Eway/CreditCardTest.php index c038aa926a..63aaaa22ce 100644 --- a/tests/Browser/ClientPortal/Gateways/Eway/CreditCardTest.php +++ b/tests/Browser/ClientPortal/Gateways/Eway/CreditCardTest.php @@ -32,4 +32,23 @@ class CreditCardTest extends DuskTestCase ->auth(); }); } + + public function testAddingCreditCardStandalone() + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.payment_methods.index') + ->press('Add Payment Method') + ->clickLink('Credit Card') + ->withinFrame('iframe', function (Browser $browser) { + $browser + ->type('EWAY_CARDNAME', 'Invoice Ninja') + ->type('EWAY_CARDNUMBER', '4111 1111 1111 1111') + ->type('EWAY_CARDEXPIRY', '04/22') + ->type('EWAY_CARDCVN', '100'); + }) + ->press('Add Payment Method') + ->waitForText('**** 1111'); + }); + } }