mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-04 00:54:35 -04:00
Recurring invoices: Test the cancellation feature
This commit is contained in:
parent
a6dc7a99fb
commit
a82e3f57c3
@ -12,6 +12,7 @@
|
||||
|
||||
namespace Tests\Browser\ClientPortal;
|
||||
|
||||
use App\Models\RecurringInvoice;
|
||||
use Laravel\Dusk\Browser;
|
||||
use Tests\Browser\Pages\ClientPortal\Login;
|
||||
use Tests\DuskTestCase;
|
||||
@ -42,4 +43,23 @@ class RecurringInvoices extends DuskTestCase
|
||||
->visitRoute('client.logout');
|
||||
});
|
||||
}
|
||||
|
||||
public function testRequestingCancellation()
|
||||
{
|
||||
$this->browse(function (Browser $browser) {
|
||||
$browser
|
||||
->visitRoute('client.recurring_invoices.index')
|
||||
->clickLink('View')
|
||||
->assertSee('Cancellation')
|
||||
->press('Request Cancellation')
|
||||
->pause(1000)
|
||||
->waitForText('Request cancellation')
|
||||
->press('Confirm')
|
||||
->pause(5000)
|
||||
->assertPathIs(
|
||||
route('client.recurring_invoices.request_cancellation', RecurringInvoice::first()->hashed_id, false)
|
||||
)
|
||||
->visitRoute('client.logout');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user