mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Gateways: Braintree: Credit card: Pay with new card and save for future use
This commit is contained in:
parent
20fdbc19d5
commit
617e51b7c3
@ -62,4 +62,28 @@ class CreditCardTest extends DuskTestCase
|
|||||||
->waitForText('Details of the payment', 60);
|
->waitForText('Details of the payment', 60);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testPayWithNewCardAndSaveForFuture()
|
||||||
|
{
|
||||||
|
$this->browse(function (Browser $browser) {
|
||||||
|
$browser
|
||||||
|
->visitRoute('client.invoices.index')
|
||||||
|
->click('@pay-now')
|
||||||
|
->press('Pay Now')
|
||||||
|
->clickLink('Credit Card')
|
||||||
|
->waitFor('#braintree-hosted-field-number', 60)
|
||||||
|
->withinFrame('#braintree-hosted-field-number', function (Browser $browser) {
|
||||||
|
$browser->type('credit-card-number', '4111111111111111');
|
||||||
|
})
|
||||||
|
->withinFrame('#braintree-hosted-field-expirationDate', function (Browser $browser) {
|
||||||
|
$browser->type('expiration', '04/25');
|
||||||
|
})
|
||||||
|
->radio('#proxy_is_default', true)
|
||||||
|
->press('Pay Now')
|
||||||
|
->waitForText('Details of the payment', 60)
|
||||||
|
->visitRoute('client.payment_methods.index')
|
||||||
|
->clickLink('View')
|
||||||
|
->assertSee('1111');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user