Fix for test

This commit is contained in:
Hillel Coren 2016-06-21 12:31:38 +03:00
parent a2c7a0c12f
commit 6836ed849b

View File

@ -22,14 +22,16 @@ class OnlinePaymentCest
$productKey = $this->faker->text(10); $productKey = $this->faker->text(10);
// set gateway info // set gateway info
$I->wantTo('create a gateway'); if ( ! $I->grabFromDatabase('account_gateways', 'id', ['id' => 1])) {
$I->amOnPage('/gateways/create?other_providers=true'); $I->wantTo('create a gateway');
$I->amOnPage('/gateways/create?other_providers=true');
$I->fillField(['name' =>'23_apiKey'], env('stripe_secret_key') ?: Fixtures::get('stripe_secret_key')); $I->fillField(['name' =>'23_apiKey'], env('stripe_secret_key') ?: Fixtures::get('stripe_secret_key'));
// Fails to load StripeJS causing "ReferenceError: Can't find variable: Stripe" // Fails to load StripeJS causing "ReferenceError: Can't find variable: Stripe"
//$I->fillField(['name' =>'stripe_publishable_key'], env('stripe_secret_key') ?: Fixtures::get('stripe_publishable_key')); //$I->fillField(['name' =>'stripe_publishable_key'], env('stripe_secret_key') ?: Fixtures::get('stripe_publishable_key'));
$I->click('Save'); $I->click('Save');
$I->see('Successfully created gateway'); $I->see('Successfully created gateway');
}
// create client // create client
$I->amOnPage('/clients/create'); $I->amOnPage('/clients/create');
@ -63,6 +65,7 @@ class OnlinePaymentCest
$clientSession->does(function(AcceptanceTester $I) use ($invitationKey) { $clientSession->does(function(AcceptanceTester $I) use ($invitationKey) {
$I->amOnPage('/view/' . $invitationKey); $I->amOnPage('/view/' . $invitationKey);
$I->click('Pay Now'); $I->click('Pay Now');
$I->click('Credit Card');
/* /*
$I->fillField(['name' => 'first_name'], $this->faker->firstName); $I->fillField(['name' => 'first_name'], $this->faker->firstName);