2021-07-02 16:53:57 +02:00
|
|
|
<?php
|
|
|
|
|
2021-07-05 11:17:50 +02:00
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
|
|
|
*/
|
|
|
|
|
2021-07-02 16:53:57 +02:00
|
|
|
namespace Tests\Browser\ClientPortal;
|
|
|
|
|
|
|
|
use Laravel\Dusk\Browser;
|
|
|
|
use Tests\Browser\Pages\ClientPortal\Login;
|
|
|
|
use Tests\DuskTestCase;
|
|
|
|
|
|
|
|
class CreditsTest extends DuskTestCase
|
|
|
|
{
|
|
|
|
protected function setUp(): void
|
|
|
|
{
|
|
|
|
parent::setUp();
|
|
|
|
|
|
|
|
foreach (static::$browsers as $browser) {
|
|
|
|
$browser->driver->manage()->deleteAllCookies();
|
|
|
|
}
|
2021-07-05 10:29:52 +02:00
|
|
|
|
|
|
|
$this->browse(function (Browser $browser) {
|
|
|
|
$browser
|
|
|
|
->visit(new Login())
|
|
|
|
->auth();
|
|
|
|
});
|
2021-07-02 16:53:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testPageLoads()
|
|
|
|
{
|
|
|
|
$this->browse(function (Browser $browser) {
|
|
|
|
$browser
|
|
|
|
->visitRoute('client.credits.index')
|
2021-07-05 14:25:24 +02:00
|
|
|
->assertSeeIn('span[data-ref="meta-title"]', 'Credits')
|
2021-07-05 10:29:52 +02:00
|
|
|
->visitRoute('client.logout');
|
2021-07-02 16:53:57 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|