Skip to content

Commit

Permalink
Merge pull request #132 from bhargavraviya/master
Browse files Browse the repository at this point in the history
change path and routes
  • Loading branch information
danharrin authored Oct 23, 2023
2 parents f17be23 + 2c8ec7f commit 915dbe1
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Install dependencies
run: |
cd ../app
composer require livewire/livewire:^2.0
composer require livewire/livewire:^3.0
composer config repositories.local '{"type": "path", "url": "../tall"}' --file composer.json
composer require laravel-frontend-presets/tall:@dev
- name: Install preset
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?php

namespace App\Http\Livewire\Auth;
namespace App\Livewire\Auth;

use App\Providers\RouteServiceProvider;
use Illuminate\Support\Facades\Auth;
use Livewire\Component;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire\Auth\Passwords;
namespace App\Livewire\Auth\Passwords;

use Livewire\Component;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire\Auth\Passwords;
namespace App\Livewire\Auth\Passwords;

use Livewire\Component;
use Illuminate\Support\Facades\Password;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire\Auth\Passwords;
namespace App\Livewire\Auth\Passwords;

use App\Providers\RouteServiceProvider;
use Livewire\Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire\Auth;
namespace App\Livewire\Auth;

use App\Providers\RouteServiceProvider;
use App\Models\User;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire\Auth;
namespace App\Livewire\Auth;

use App\Providers\RouteServiceProvider;
use Illuminate\Support\Facades\Auth;
Expand All @@ -16,7 +16,7 @@ public function resend()

Auth::user()->sendEmailVerificationNotification();

$this->emit('resent');
$this->dispatch('resent');

session()->flash('resent');
}
Expand Down
12 changes: 6 additions & 6 deletions stubs/auth/routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

use App\Http\Controllers\Auth\EmailVerificationController;
use App\Http\Controllers\Auth\LogoutController;
use App\Http\Livewire\Auth\Login;
use App\Http\Livewire\Auth\Passwords\Confirm;
use App\Http\Livewire\Auth\Passwords\Email;
use App\Http\Livewire\Auth\Passwords\Reset;
use App\Http\Livewire\Auth\Register;
use App\Http\Livewire\Auth\Verify;
use App\Livewire\Auth\Login;
use App\Livewire\Auth\Passwords\Confirm;
use App\Livewire\Auth\Passwords\Email;
use App\Livewire\Auth\Passwords\Reset;
use App\Livewire\Auth\Register;
use App\Livewire\Auth\Verify;
use Illuminate\Support\Facades\Route;

/*
Expand Down
15 changes: 8 additions & 7 deletions stubs/auth/tests/Feature/Auth/LoginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Tests\Feature\Auth;

use App\Models\User;
use App\Livewire\Auth\Login;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
Expand All @@ -18,7 +19,7 @@ public function can_view_login_page()
{
$this->get(route('login'))
->assertSuccessful()
->assertSeeLivewire('auth.login');
->assertSeeLivewire(Login::class);
}

/** @test */
Expand All @@ -37,7 +38,7 @@ public function a_user_can_login()
{
$user = User::factory()->create(['password' => Hash::make('password')]);

Livewire::test('auth.login')
Livewire::test(Login::class)
->set('email', $user->email)
->set('password', 'password')
->call('authenticate');
Expand All @@ -50,7 +51,7 @@ public function is_redirected_to_the_home_page_after_login()
{
$user = User::factory()->create(['password' => Hash::make('password')]);

Livewire::test('auth.login')
Livewire::test(Login::class)
->set('email', $user->email)
->set('password', 'password')
->call('authenticate')
Expand All @@ -62,7 +63,7 @@ public function email_is_required()
{
$user = User::factory()->create(['password' => Hash::make('password')]);

Livewire::test('auth.login')
Livewire::test(Login::class)
->set('password', 'password')
->call('authenticate')
->assertHasErrors(['email' => 'required']);
Expand All @@ -73,7 +74,7 @@ public function email_must_be_valid_email()
{
$user = User::factory()->create(['password' => Hash::make('password')]);

Livewire::test('auth.login')
Livewire::test(Login::class)
->set('email', 'invalid-email')
->set('password', 'password')
->call('authenticate')
Expand All @@ -85,7 +86,7 @@ public function password_is_required()
{
$user = User::factory()->create(['password' => Hash::make('password')]);

Livewire::test('auth.login')
Livewire::test(Login::class)
->set('email', $user->email)
->call('authenticate')
->assertHasErrors(['password' => 'required']);
Expand All @@ -96,7 +97,7 @@ public function bad_login_attempt_shows_message()
{
$user = User::factory()->create();

Livewire::test('auth.login')
Livewire::test(Login::class)
->set('email', $user->email)
->set('password', 'bad-password')
->call('authenticate')
Expand Down
2 changes: 1 addition & 1 deletion stubs/auth/tests/Feature/Auth/VerifyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function can_resend_verification_email()

Livewire::test('auth.verify')
->call('resend')
->assertEmitted('resent');
->assertDispatched('resent');
}

/** @test */
Expand Down
File renamed without changes.

0 comments on commit 915dbe1

Please sign in to comment.