1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Invoices: Test clicking "Pay Now" without selecting any invoices

This commit is contained in:
Benjamin Beganović 2021-07-05 10:04:11 +02:00
parent 90e0d0cbab
commit 7b41f2dbd0

View File

@ -20,11 +20,23 @@ class InvoicesTest extends DuskTestCase
public function testPageLoads() public function testPageLoads()
{ {
$this->browse(function (Browser $browser) { $this->browse(function (Browser $browser) {
$browser $browser
->visit(new Login()) ->visit(new Login())
->auth() ->auth()
->visitRoute('client.invoices.index') ->visitRoute('client.invoices.index')
->assertSee('Invoices'); ->assertSee('Invoices');
});
}
public function testClickingPayNowWithoutInvoices()
{
$this->browse(function (Browser $browser) {
$browser
->visit(new Login())
->auth()
->visitRoute('client.invoices.index')
->press('Pay Now')
->assertSee('No payable invoices selected. Make sure you are not trying to pay draft invoice or invoice with zero balance due.');
}); });
} }
} }