1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00

Quotes: Test approving process

This commit is contained in:
Benjamin Beganović 2021-07-05 13:57:28 +02:00
parent 1a5c40d02e
commit c81044994b

View File

@ -44,7 +44,7 @@ class QuotesTest extends DuskTestCase
});
}
public function testClickingApproveWithoutQuotes()
public function testClickingApproveWithoutQuotesDoesntWork()
{
$this->browse(function (Browser $browser) {
$browser
@ -53,4 +53,32 @@ class QuotesTest extends DuskTestCase
->assertPathIs('/client/quotes');
});
}
public function testApprovingQuotes()
{
$this->browse(function (Browser $browser) {
$browser
->visitRoute('client.quotes.index')
->check('.form-check.form-check-child')
->press('Approve')
->assertPathIs('/client/quotes/approve')
->press('Approve')
->assertPathIs('/client/quotes')
->assertSee('Quote(s) approved successfully.')
->visitRoute('client.logout');
});
}
public function testQuotesWithSentStatusCanOnlyBeApproved()
{
$this->browse(function (Browser $browser) {
$browser
->visitRoute('client.quotes.index')
->check('.form-check.form-check-child')
->press('Approve')
->assertPathIs('/client/quotes')
->assertDontSee('Quote(s) approved successfully.')
->visitRoute('client.logout');
});
}
}