From de73fbc23432c857efa0fbb666e4936307ff207a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 4 Oct 2021 16:15:21 +0200 Subject: [PATCH] Tests: Failed/cancelled payments --- .../Gateways/Mollie/IDEALTest.php | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/tests/Browser/ClientPortal/Gateways/Mollie/IDEALTest.php b/tests/Browser/ClientPortal/Gateways/Mollie/IDEALTest.php index ae3e15fff8d6..b369fc30248f 100644 --- a/tests/Browser/ClientPortal/Gateways/Mollie/IDEALTest.php +++ b/tests/Browser/ClientPortal/Gateways/Mollie/IDEALTest.php @@ -55,7 +55,7 @@ class IDEALTest extends DuskTestCase }); } - public function testOpenPayments(): void + public function testOpenPayment(): void { $this->browse(function (Browser $browser) { $browser @@ -71,4 +71,36 @@ class IDEALTest extends DuskTestCase ->assertSee('Pending'); }); } + + public function testFailedPayment(): 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', 'failed') + ->press('Continue') + ->waitForText('Failed.'); + }); + } + + public function testCancelledPayment(): 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', 'canceled') + ->press('Continue') + ->waitForText('Cancelled.'); + }); + } } \ No newline at end of file