From a8f16deaf7357a58fb5eb230f62701b1f1bf498b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 19 Oct 2021 16:18:14 +0200 Subject: [PATCH] Tests --- .../Gateways/GoCardless/DirectDebitTest.php | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 tests/Browser/ClientPortal/Gateways/GoCardless/DirectDebitTest.php diff --git a/tests/Browser/ClientPortal/Gateways/GoCardless/DirectDebitTest.php b/tests/Browser/ClientPortal/Gateways/GoCardless/DirectDebitTest.php new file mode 100644 index 000000000000..5989196c3f3d --- /dev/null +++ b/tests/Browser/ClientPortal/Gateways/GoCardless/DirectDebitTest.php @@ -0,0 +1,42 @@ +driver->manage()->deleteAllCookies(); + } + + $this->disableCompanyGateways(); + + CompanyGateway::where('gateway_key', 'b9886f9257f0c6ee7c302f1c74475f6c')->restore(); + + $this->browse(function (Browser $browser) { + $browser + ->visit(new Login()) + ->auth(); + }); + } + + public function testPayingWithNoPreauthorizedIsntPossible() + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.invoices.index') + ->click('@pay-now') + ->press('Pay Now') + ->clickLink('Direct Debit') + ->assertSee('To pay with a bank account, first you have to add it as payment method.'); + }); + } +}