Tests: Standalone credit card authorization

This commit is contained in:
Benjamin Beganović 2021-08-18 18:00:03 +02:00
parent 7cf209e87a
commit 7fe8fff43b

View File

@ -105,4 +105,24 @@ class CreditCardTest extends DuskTestCase
->assertSee('Payment method has been successfully removed.'); ->assertSee('Payment method has been successfully removed.');
}); });
} }
public function testAddingCreditCardStandalone()
{
$this->browse(function (Browser $browser) {
$browser
->visitRoute('client.payment_methods.index')
->press('Add Payment Method')
->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');
})
->press('Add Payment Method')
->waitForText('**** 1111');
});
}
} }