mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Tests: Payment with new credit card & save for future use
This commit is contained in:
parent
59c254fcf2
commit
c10a636272
@ -53,4 +53,29 @@ 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')
|
||||
->click('@pay-now-dropdown')
|
||||
->clickLink('Credit Card')
|
||||
->type('#cardholder-name', 'John Doe')
|
||||
->withinFrame('iframe', function (Browser $browser) {
|
||||
$browser
|
||||
->type('#cardNumber', '4111 1111 1111 1111')
|
||||
->type('#expirationDate', '04/22')
|
||||
->type('#cvv', '1111')
|
||||
->type('#postalCode', '12345');
|
||||
})
|
||||
->radio('#proxy_is_default', true)
|
||||
->click('#pay-now')
|
||||
->waitForText('Details of the payment', 60)
|
||||
->visitRoute('client.payment_methods.index')
|
||||
->clickLink('View')
|
||||
->assertSee('4242');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user