1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00

Gateways: Stripe: Adding credit card standalone

This commit is contained in:
Benjamin Beganović 2021-07-07 13:46:37 +02:00
parent 51dbae59d4
commit 4705d40fdb

View File

@ -58,9 +58,9 @@ class CreditCardTest extends DuskTestCase
->type('cvc', '242');
})
->click('#pay-now')
->waitForText('Details of the payment');
->waitForText('Details of the payment', 60);
});
}
}
public function testPayWithNewCardAndSaveForFutureUse()
{
@ -79,7 +79,7 @@ class CreditCardTest extends DuskTestCase
})
->radio('#proxy_is_default', true)
->click('#pay-now')
->waitForText('Details of the payment')
->waitForText('Details of the payment', 60)
->visitRoute('client.payment_methods.index')
->clickLink('View')
->assertSee('4242');
@ -96,7 +96,7 @@ class CreditCardTest extends DuskTestCase
->click('@pay-with-1')
->click('.toggle-payment-with-token')
->click('#pay-now')
->waitForText('Details of the payment');
->waitForText('Details of the payment', 60);
});
}
@ -112,4 +112,23 @@ class CreditCardTest extends DuskTestCase
->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', '4242 4242 4242 4242')
->type('exp-date', '04/22')
->type('cvc', '242');
})
->press('Add Payment Method')
->waitForText('**** 4242');
});
}
}