mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 03:40:09 -05:00 
			
		
		
		
	Tests: Failed/cancelled payments
This commit is contained in:
		
							parent
							
								
									bc6719e4fb
								
							
						
					
					
						commit
						de73fbc234
					
				@ -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.');
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user