From 5f91c73e3b12f4fb8003fb4251c193a76a6426b7 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 9 Apr 2017 20:24:17 +0300 Subject: [PATCH] Improve gateway fees tests --- tests/acceptance/GatewayFeesCest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/GatewayFeesCest.php b/tests/acceptance/GatewayFeesCest.php index 289b39715403..807b88bb92f2 100644 --- a/tests/acceptance/GatewayFeesCest.php +++ b/tests/acceptance/GatewayFeesCest.php @@ -56,8 +56,14 @@ class GatewayFeesCest $this->configureGatewayFeeTax($I, $taxName, $taxRate); $this->createInvoice($I, $clientName, $productKey, $total, $feeWithTax); - // partial invoice + // partial invoice (resaving invoice between payments) $invitationKey = $this->createInvoice($I, $clientName, $productKey, $total, $partialFeeWithTax, $total / 2); + $invoiceId = $I->grabFromDatabase('invitations', 'invoice_id', ['invitation_key' => $invitationKey]); + $invoicePublicId = $I->grabFromDatabase('invoices', 'public_id', ['invoice_id' => $invoiceId]); + $I->amOnPage('/invoices/' . $invoicePublicId . '/edit'); + $I->click('Save'); + $I->wait(2); + $I->see('Successfully updated invoice'); $this->createPayment($I, $invitationKey, $total + $partialFeeWithTax, 0, $partialFeeWithTax); }