Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/SignupTest.php
Show All 11 Lines | |||||
use Tests\Browser\Components\Menu; | use Tests\Browser\Components\Menu; | ||||
use Tests\Browser\Components\Toast; | use Tests\Browser\Components\Toast; | ||||
use Tests\Browser\Pages\Dashboard; | use Tests\Browser\Pages\Dashboard; | ||||
use Tests\Browser\Pages\Home; | use Tests\Browser\Pages\Home; | ||||
use Tests\Browser\Pages\PaymentMollie; | use Tests\Browser\Pages\PaymentMollie; | ||||
use Tests\Browser\Pages\PaymentStatus; | use Tests\Browser\Pages\PaymentStatus; | ||||
use Tests\Browser\Pages\Signup; | use Tests\Browser\Pages\Signup; | ||||
use Tests\TestCaseDusk; | use Tests\TestCaseDusk; | ||||
use Illuminate\Foundation\Testing\DatabaseMigrations; | |||||
class SignupTest extends TestCaseDusk | class SignupTest extends TestCaseDusk | ||||
{ | { | ||||
/** | /** | ||||
* {@inheritDoc} | * {@inheritDoc} | ||||
*/ | */ | ||||
public function setUp(): void | public function setUp(): void | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 376 Lines • ▼ Show 20 Lines | public function testSignupStep3(): void | ||||
$step->click('[type=submit]'); | $step->click('[type=submit]'); | ||||
}); | }); | ||||
// At this point we should be auto-logged-in to dashboard | // At this point we should be auto-logged-in to dashboard | ||||
$browser->waitUntilMissing('@step3') | $browser->waitUntilMissing('@step3') | ||||
->waitUntilMissing('.app-loader') | ->waitUntilMissing('.app-loader') | ||||
->on(new Dashboard()) | ->on(new Dashboard()) | ||||
->assertUser('signuptestdusk@' . \config('app.domain')) | ->assertUser('signuptestdusk@' . \config('app.domain')) | ||||
->assertVisible('@links a.link-profile') | ->assertVisible('@links a.link-settings') | ||||
->assertMissing('@links a.link-domains') | ->assertMissing('@links a.link-domains') | ||||
->assertVisible('@links a.link-users') | ->assertVisible('@links a.link-users') | ||||
->assertVisible('@links a.link-wallet'); | ->assertVisible('@links a.link-wallet'); | ||||
// Logout the user | // Logout the user | ||||
$browser->within(new Menu(), function ($browser) { | $browser->within(new Menu(), function ($browser) { | ||||
$browser->clickMenuItem('logout'); | $browser->clickMenuItem('logout'); | ||||
}); | }); | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | public function testSignupGroup(): void | ||||
->click('[type=submit]'); | ->click('[type=submit]'); | ||||
}); | }); | ||||
// At this point we should be auto-logged-in to dashboard | // At this point we should be auto-logged-in to dashboard | ||||
$browser->waitUntilMissing('@step3') | $browser->waitUntilMissing('@step3') | ||||
->waitUntilMissing('.app-loader') | ->waitUntilMissing('.app-loader') | ||||
->on(new Dashboard()) | ->on(new Dashboard()) | ||||
->assertUser('admin@user-domain-signup.com') | ->assertUser('admin@user-domain-signup.com') | ||||
->assertVisible('@links a.link-profile') | ->assertVisible('@links a.link-settings') | ||||
->assertVisible('@links a.link-domains') | ->assertVisible('@links a.link-domains') | ||||
->assertVisible('@links a.link-users') | ->assertVisible('@links a.link-users') | ||||
->assertVisible('@links a.link-wallet'); | ->assertVisible('@links a.link-wallet'); | ||||
$browser->within(new Menu(), function ($browser) { | $browser->within(new Menu(), function ($browser) { | ||||
$browser->clickMenuItem('logout'); | $browser->clickMenuItem('logout'); | ||||
}); | }); | ||||
}); | }); | ||||
▲ Show 20 Lines • Show All 392 Lines • Show Last 20 Lines |