From e48018067b523fd0a68ed97fa5078097bbd7d7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 4 Oct 2021 16:11:50 +0200 Subject: [PATCH] Tests: Successful payments --- .../ClientPortal/Gateways/Mollie/IDEALTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/Browser/ClientPortal/Gateways/Mollie/IDEALTest.php b/tests/Browser/ClientPortal/Gateways/Mollie/IDEALTest.php index 875eb8b1b91f..8ece57b89ba9 100644 --- a/tests/Browser/ClientPortal/Gateways/Mollie/IDEALTest.php +++ b/tests/Browser/ClientPortal/Gateways/Mollie/IDEALTest.php @@ -37,4 +37,21 @@ class IDEALTest extends DuskTestCase ->auth(); }); } + + public function testSuccessfulPayment(): void + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.invoices.index') + ->click('@pay-now') + ->press('Pay Now') + ->clickLink('iDEAL') + ->waitForText('Test profile') + ->press('ABN AMRO') + ->radio('final_state', 'paid') + ->press('Continue') + ->waitForText('Details of the payment') + ->assertSee('Completed'); + }); + } } \ No newline at end of file