1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Data seeding: Braintree

This commit is contained in:
Benjamin Beganović 2021-07-11 17:04:15 +02:00
parent eb734ce810
commit a1c40cffc9
2 changed files with 9 additions and 1 deletions

View File

@ -35,6 +35,10 @@ class CreditCardTest extends DuskTestCase
->auth();
});
$this->disableCompanyGateways();
CompanyGateway::where('gateway_key', 'f7ec488676d310683fb51802d076d713')->restore();
$cg = CompanyGateway::where('gateway_key', 'f7ec488676d310683fb51802d076d713')->firstOrFail();
$fees_and_limits = $cg->fees_and_limits;
$fees_and_limits->{GatewayType::CREDIT_CARD} = new FeesAndLimits();
@ -51,7 +55,6 @@ class CreditCardTest extends DuskTestCase
->press('Pay Now')
->clickLink('Credit Card')
->waitFor('#braintree-hosted-field-number', 60)
->waitFor('##braintree-hosted-field-expirationDate', 60)
->withinFrame('#braintree-hosted-field-number', function (Browser $browser) {
$browser->type('credit-card-number', '4111111111111111');
})

View File

@ -12,6 +12,7 @@
namespace Tests\Browser\ClientPortal\Gateways\Braintree;
use App\Models\CompanyGateway;
use Laravel\Dusk\Browser;
use Tests\Browser\Pages\ClientPortal\Login;
use Tests\DuskTestCase;
@ -31,6 +32,10 @@ class PayPalTest extends DuskTestCase
->visit(new Login())
->auth();
});
$this->disableCompanyGateways();
CompanyGateway::where('gateway_key', 'f7ec488676d310683fb51802d076d713')->restore();
}
public function testOffsitePayment()