mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Quotes: Test approving process
This commit is contained in:
parent
1a5c40d02e
commit
c81044994b
@ -44,7 +44,7 @@ class QuotesTest extends DuskTestCase
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testClickingApproveWithoutQuotes()
|
public function testClickingApproveWithoutQuotesDoesntWork()
|
||||||
{
|
{
|
||||||
$this->browse(function (Browser $browser) {
|
$this->browse(function (Browser $browser) {
|
||||||
$browser
|
$browser
|
||||||
@ -53,4 +53,32 @@ class QuotesTest extends DuskTestCase
|
|||||||
->assertPathIs('/client/quotes');
|
->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');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user