From 4a70d7435468eceebff67ca6023208510cc7cc4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 12 Jul 2021 13:34:43 +0200 Subject: [PATCH] Gateways: WePay: Credit card: Pay with existing card --- .../ClientPortal/Gateways/WePay/CreditCardTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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); + }); + } }