Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/UserProfileTest.php
Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | class UserProfileTest extends TestCaseDusk | ||||
{ | { | ||||
$user = $this->getTestUser('profile-delete@kolabnow.com', ['password' => 'simple123']); | $user = $this->getTestUser('profile-delete@kolabnow.com', ['password' => 'simple123']); | ||||
$this->browse(function (Browser $browser) use ($user) { | $this->browse(function (Browser $browser) use ($user) { | ||||
$browser->visit('/logout') | $browser->visit('/logout') | ||||
->on(new Home()) | ->on(new Home()) | ||||
->submitLogon('profile-delete@kolabnow.com', 'simple123', true) | ->submitLogon('profile-delete@kolabnow.com', 'simple123', true) | ||||
->on(new Dashboard()) | ->on(new Dashboard()) | ||||
->clearToasts() | |||||
->assertSeeIn('@links .link-profile', 'Your profile') | ->assertSeeIn('@links .link-profile', 'Your profile') | ||||
->click('@links .link-profile') | ->click('@links .link-profile') | ||||
->on(new UserProfile()) | ->on(new UserProfile()) | ||||
->click('#user-profile .button-delete') | ->click('#user-profile .button-delete') | ||||
->waitForLocation('/profile/delete') | ->waitForLocation('/profile/delete') | ||||
->assertSeeIn('#user-delete .card-title', 'Delete this account?') | ->assertSeeIn('#user-delete .card-title', 'Delete this account?') | ||||
->assertSeeIn('#user-delete .button-cancel', 'Cancel') | ->assertSeeIn('#user-delete .button-cancel', 'Cancel') | ||||
->assertSeeIn('#user-delete .card-text', 'This operation is irreversible') | ->assertSeeIn('#user-delete .card-text', 'This operation is irreversible') | ||||
Show All 19 Lines |