Skip to content

Commit

Permalink
Updated stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet committed Mar 19, 2024
1 parent daa684d commit c5c31cc
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 15 deletions.
3 changes: 0 additions & 3 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ public function handle()
// Storage...
$this->callSilent('storage:link');

// "Home" Route...
$this->replaceInFile('/home', '/dashboard', app_path('Providers/RouteServiceProvider.php'));

if (file_exists(resource_path('views/welcome.blade.php'))) {
$this->replaceInFile('/home', '/dashboard', resource_path('views/welcome.blade.php'));
$this->replaceInFile('Home', 'Dashboard', resource_path('views/welcome.blade.php'));
Expand Down
2 changes: 1 addition & 1 deletion stubs/pest-tests/AuthenticationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
]);

$this->assertAuthenticated();
$response->assertRedirect(RouteServiceProvider::HOME);
$response->assertRedirect('dashboard');
});

test('users cannot authenticate with invalid password', function () {
Expand Down
2 changes: 1 addition & 1 deletion stubs/pest-tests/EmailVerificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
Event::assertDispatched(Verified::class);

expect($user->fresh()->hasVerifiedEmail())->toBeTrue();
$response->assertRedirect(RouteServiceProvider::HOME.'?verified=1');
$response->assertRedirect('dashboard?verified=1');
})->skip(function () {
return ! Features::enabled(Features::emailVerification());
}, 'Email verification not enabled.');
Expand Down
2 changes: 1 addition & 1 deletion stubs/pest-tests/RegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
]);

$this->assertAuthenticated();
$response->assertRedirect(RouteServiceProvider::HOME);
$response->assertRedirect('dashboard');
})->skip(function () {
return ! Features::enabled(Features::registration());
}, 'Registration support is not enabled.');
2 changes: 1 addition & 1 deletion stubs/tests/AuthenticationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function test_users_can_authenticate_using_the_login_screen(): void
]);

$this->assertAuthenticated();
$response->assertRedirect(RouteServiceProvider::HOME);
$response->assertRedirect('dashboard');
}

public function test_users_can_not_authenticate_with_invalid_password(): void
Expand Down
2 changes: 1 addition & 1 deletion stubs/tests/EmailVerificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function test_email_can_be_verified(): void
Event::assertDispatched(Verified::class);

$this->assertTrue($user->fresh()->hasVerifiedEmail());
$response->assertRedirect(RouteServiceProvider::HOME.'?verified=1');
$response->assertRedirect('dashboard?verified=1');
}

public function test_email_can_not_verified_with_invalid_hash(): void
Expand Down
2 changes: 1 addition & 1 deletion stubs/tests/RegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ public function test_new_users_can_register(): void
]);

$this->assertAuthenticated();
$response->assertRedirect(RouteServiceProvider::HOME);
$response->assertRedirect('dashboard');
}
}
2 changes: 1 addition & 1 deletion stubs/tests/splade/dusk/AuthenticationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function test_users_can_authenticate_using_the_login_screen()
->type('email', $user->email)
->type('password', 'password')
->press('Log in')
->waitForLocation(RouteServiceProvider::HOME)
->waitForLocation('dashboard')
->assertAuthenticatedAs($user);
});
}
Expand Down
2 changes: 1 addition & 1 deletion stubs/tests/splade/dusk/CreateTeamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function test_teams_can_be_created(): void
->waitForText('Team Details')
->type('name', 'Test Team')
->press('Create')
->waitForLocation(RouteServiceProvider::HOME);
->waitForLocation('dashboard');

$this->assertCount(2, $user->fresh()->ownedTeams);
$this->assertEquals('Test Team', $user->fresh()->ownedTeams()->latest('id')->first()->name);
Expand Down
2 changes: 1 addition & 1 deletion stubs/tests/splade/dusk/EmailVerificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function test_email_can_be_verified(): void
$this->browse(function (Browser $browser) use ($user, $verificationUrl) {
$browser->loginAs($user)
->visit($verificationUrl)
->assertPathIs(RouteServiceProvider::HOME)
->assertPathIs('dashboard')
->assertQueryStringHas('verified', 1);
});

Expand Down
4 changes: 2 additions & 2 deletions stubs/tests/splade/dusk/PasswordConfirmationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public function test_password_can_be_confirmed(): void
->waitForText('Please confirm your password before continuing.')
->type('password', 'password')
->press('Confirm')
->waitForLocation(RouteServiceProvider::HOME)
->assertPathIs(RouteServiceProvider::HOME);
->waitForLocation('dashboard')
->assertPathIs('dashboard');
});
}

Expand Down
2 changes: 1 addition & 1 deletion stubs/tests/splade/dusk/RegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function test_new_users_can_register(): void
if (new User instanceof MustVerifyEmail) {
$browser->waitForLocation('/email/verify');
} else {
$browser->waitForLocation(RouteServiceProvider::HOME)
$browser->waitForLocation('dashboard')
->assertAuthenticated();
}
});
Expand Down

0 comments on commit c5c31cc

Please sign in to comment.