Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/DomainTest.php
<?php | <?php | ||||
namespace Tests\Browser; | namespace Tests\Browser; | ||||
use App\Domain; | use App\Domain; | ||||
use App\User; | use App\User; | ||||
use Tests\Browser; | use Tests\Browser; | ||||
use Tests\Browser\Components\Dialog; | use Tests\Browser\Components\Dialog; | ||||
use Tests\Browser\Components\ListInput; | use Tests\Browser\Components\ListInput; | ||||
use Tests\Browser\Components\Toast; | use Tests\Browser\Components\Toast; | ||||
use Tests\Browser\Pages\Dashboard; | use Tests\Browser\Pages\Dashboard; | ||||
use Tests\Browser\Pages\DomainInfo; | use Tests\Browser\Pages\DomainInfo; | ||||
use Tests\Browser\Pages\DomainList; | use Tests\Browser\Pages\DomainList; | ||||
use Tests\Browser\Pages\Home; | use Tests\Browser\Pages\Home; | ||||
use Tests\TestCaseDusk; | use Tests\TestCaseDusk; | ||||
use Illuminate\Foundation\Testing\DatabaseMigrations; | |||||
class DomainTest extends TestCaseDusk | class DomainTest extends TestCaseDusk | ||||
{ | { | ||||
/** | /** | ||||
* {@inheritDoc} | * {@inheritDoc} | ||||
*/ | */ | ||||
public function setUp(): void | public function setUp(): void | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | class DomainTest extends TestCaseDusk | ||||
public function testDomainListEmpty(): void | public function testDomainListEmpty(): void | ||||
{ | { | ||||
$this->browse(function ($browser) { | $this->browse(function ($browser) { | ||||
// Login the user | // Login the user | ||||
$browser->visit('/login') | $browser->visit('/login') | ||||
->on(new Home()) | ->on(new Home()) | ||||
->submitLogon('jack@kolab.org', 'simple123', true) | ->submitLogon('jack@kolab.org', 'simple123', true) | ||||
->on(new Dashboard()) | ->on(new Dashboard()) | ||||
->assertVisible('@links a.link-profile') | ->assertVisible('@links a.link-settings') | ||||
->assertMissing('@links a.link-domains') | ->assertMissing('@links a.link-domains') | ||||
->assertMissing('@links a.link-users') | ->assertMissing('@links a.link-users') | ||||
->assertMissing('@links a.link-wallet'); | ->assertMissing('@links a.link-wallet'); | ||||
/* | /* | ||||
// On dashboard click the "Domains" link | // On dashboard click the "Domains" link | ||||
->assertSeeIn('@links a.link-domains', 'Domains') | ->assertSeeIn('@links a.link-domains', 'Domains') | ||||
->click('@links a.link-domains') | ->click('@links a.link-domains') | ||||
// On Domains List page click the domain entry | // On Domains List page click the domain entry | ||||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |