1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-23 01:41:34 +02:00
invoiceninja/tests/Browser/ClientPortal/Gateways/GoCardless/ACHTest.php

43 lines
1.1 KiB
PHP
Raw Normal View History

2021-10-04 13:40:16 +02:00
<?php
namespace Tests\Browser\ClientPortal\Gateways\GoCardless;
2021-10-04 13:40:48 +02:00
use App\Models\CompanyGateway;
2021-10-04 13:40:16 +02:00
use Laravel\Dusk\Browser;
2021-10-04 13:40:48 +02:00
use Tests\Browser\Pages\ClientPortal\Login;
2021-10-04 13:40:16 +02:00
use Tests\DuskTestCase;
class ACHTest extends DuskTestCase
{
2021-10-04 13:40:48 +02:00
protected function setUp(): void
2021-10-04 13:40:16 +02:00
{
2021-10-04 13:40:48 +02:00
parent::setUp();
foreach (static::$browsers as $browser) {
$browser->driver->manage()->deleteAllCookies();
}
$this->disableCompanyGateways();
CompanyGateway::where('gateway_key', 'b9886f9257f0c6ee7c302f1c74475f6c')->restore();
2021-10-04 13:40:16 +02:00
$this->browse(function (Browser $browser) {
2021-10-04 13:40:48 +02:00
$browser
->visit(new Login())
->auth();
2021-10-04 13:40:16 +02:00
});
}
public function testPayingWithNoPreauthorizedIsntPossible()
{
$this->browse(function (Browser $browser) {
$browser
->visitRoute('client.invoices.index')
->click('@pay-now')
->press('Pay Now')
->clickLink('Bank Transfer')
->assertSee('To pay with a bank account, first you have to add it as payment method.');
});
}
2021-10-04 13:40:16 +02:00
}