Fix for payment test

This commit is contained in:
Hillel Coren 2016-09-14 18:54:49 +03:00
parent 4df68473ee
commit fb6f223538

View File

@ -34,6 +34,7 @@ class PaymentCest
$I->fillField(['name' => 'notes'], $this->faker->text(80)); $I->fillField(['name' => 'notes'], $this->faker->text(80));
$I->fillField(['name' => 'cost'], $this->faker->numberBetween(11, 20)); $I->fillField(['name' => 'cost'], $this->faker->numberBetween(11, 20));
$I->click('Save'); $I->click('Save');
$I->wait(1);
$I->see($productKey); $I->see($productKey);
// create invoice // create invoice
@ -42,6 +43,7 @@ class PaymentCest
$I->fillField('table.invoice-table tbody tr:nth-child(1) #product_key', $productKey); $I->fillField('table.invoice-table tbody tr:nth-child(1) #product_key', $productKey);
$I->click('table.invoice-table tbody tr:nth-child(1) .tt-selectable'); $I->click('table.invoice-table tbody tr:nth-child(1) .tt-selectable');
$I->click('Save'); $I->click('Save');
$I->wait(1);
$I->see($clientEmail); $I->see($clientEmail);
$I->amOnPage('/payments/create'); $I->amOnPage('/payments/create');
@ -53,7 +55,8 @@ class PaymentCest
$I->fillField(['name' => 'transaction_reference'], $this->faker->text(12)); $I->fillField(['name' => 'transaction_reference'], $this->faker->text(12));
$I->click('Save'); $I->click('Save');
$I->wait(1);
$I->see('Successfully created payment'); $I->see('Successfully created payment');
$I->seeInDatabase('payments', ['amount' => number_format($amount, 2)]); $I->seeInDatabase('payments', ['amount' => number_format($amount, 2)]);
} }
@ -61,7 +64,7 @@ class PaymentCest
public function editPayment(AcceptanceTester $I) public function editPayment(AcceptanceTester $I)
{ {
$ref = $this->faker->text(12); $ref = $this->faker->text(12);
$I->wantTo('edit a payment'); $I->wantTo('edit a payment');
$I->amOnPage('/payments/1/edit'); $I->amOnPage('/payments/1/edit');