From e922751ad2b2d062284232d0206f96d52d328de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Wed, 7 Jul 2021 15:56:20 +0200 Subject: [PATCH] Gateways: Checkout.com: Credit card: Paying with saved credit card --- .../Gateways/CheckoutCom/CreditCardTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/Browser/ClientPortal/Gateways/CheckoutCom/CreditCardTest.php b/tests/Browser/ClientPortal/Gateways/CheckoutCom/CreditCardTest.php index a86b533b4010..9d58be4c775b 100644 --- a/tests/Browser/ClientPortal/Gateways/CheckoutCom/CreditCardTest.php +++ b/tests/Browser/ClientPortal/Gateways/CheckoutCom/CreditCardTest.php @@ -85,4 +85,18 @@ class CreditCardTest extends DuskTestCase ->assertSee('4242'); }); } + + 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') + ->click('#pay-now-with-token') + ->waitForText('Details of the payment', 60); + }); + } }