From f11dd6746ca90a041003267d55d9701ca7dcc984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 19 Oct 2021 18:37:41 +0200 Subject: [PATCH] Tests --- .../Gateways/GoCardless/SEPATest.php | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 tests/Browser/ClientPortal/Gateways/GoCardless/SEPATest.php diff --git a/tests/Browser/ClientPortal/Gateways/GoCardless/SEPATest.php b/tests/Browser/ClientPortal/Gateways/GoCardless/SEPATest.php new file mode 100644 index 000000000000..a1de5eced97a --- /dev/null +++ b/tests/Browser/ClientPortal/Gateways/GoCardless/SEPATest.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('SEPA Direct Debit') + ->assertSee('To pay with a bank account, first you have to add it as payment method.'); + }); + } +}