driver->manage()->deleteAllCookies(); } $this->browse(function (Browser $browser) { $browser ->visit(new Login()) ->auth(); }); $this->disableCompanyGateways(); // Enable Stripe. CompanyGateway::where('gateway_key', 'd14dd26a37cecc30fdd65700bfb55b23')->restore(); // Enable SOFORT. $cg = CompanyGateway::where('gateway_key', 'd14dd26a37cecc30fdd65700bfb55b23')->firstOrFail(); $fees_and_limits = $cg->fees_and_limits; $fees_and_limits->{GatewayType::EPS} = new FeesAndLimits(); $cg->fees_and_limits = $fees_and_limits; $cg->save(); $client = Client::first(); $client->country_id = 276; $client->save(); } public function testPayingWithEPS() { $this->browse(function (Browser $browser) { $browser ->visitRoute('client.invoices.index') ->click('@pay-now') ->press('Pay Now') ->clickLink('EPS') ->type('#eps-name', 'John Doe') ->withinFrame('iframe', function (Browser $browser) { $browser->type('eps', '12345'); }) ->click('#pay-now') ->waitForText('EPS test payment page', 120) ->press('.common-Button.common-Button--default') ->waitForText('Details of the payment', 60); }); } }