Gateways: Checkout.com: Credit card: Paying with new card and saving for future use

This commit is contained in:
Benjamin Beganović 2021-07-07 15:53:29 +02:00
parent 0f7fa134ea
commit 4ac0788da0

View File

@ -44,7 +44,7 @@ class CreditCardTest extends DuskTestCase
});
}
public function testPayingWithNewCard()
public function testPayWithNewCard()
{
$this->browse(function (Browser $browser) {
$browser
@ -62,4 +62,27 @@ class CreditCardTest extends DuskTestCase
->waitForText('Details of the payment', 60);
});
}
public function testPayWithNewCardAndSaveForFutureUse()
{
$this->browse(function (Browser $browser) {
$browser
->visitRoute('client.invoices.index')
->click('@pay-now')
->press('Pay Now')
->clickLink('Credit Card')
->withinFrame('iframe', function (Browser $browser) {
$browser
->type('cardnumber', '4242424242424242')
->type('exp-date', '04/22')
->type('cvc', '100');
})
->radio('#proxy_is_default', true)
->press('#pay-button')
->waitForText('Details of the payment', 60)
->visitRoute('client.payment_methods.index')
->clickLink('View')
->assertSee('4242');
});
}
}