diff --git a/composer.json b/composer.json index d50cd550..968da113 100644 --- a/composer.json +++ b/composer.json @@ -27,8 +27,9 @@ "laravel/breeze": "^2.0", "laravel/nova": "@dev", "nunomaduro/collision": "^8.0", - "orchestra/testbench": "^9.0.3", - "orchestra/testbench-dusk": "^9.0", + "orchestra/testbench-core": "^9.1.7", + "orchestra/testbench-dusk": "^9.1.1", + "orchestra/workbench": "^9.0", "phpunit/phpunit": "^10.5" }, "conflict": { diff --git a/config/nova.php b/config/nova.php index 66f3255d..dc32fe27 100644 --- a/config/nova.php +++ b/config/nova.php @@ -1,5 +1,6 @@ [ 'nova', Authenticate::class, + // EnsureEmailIsVerified::redirectTo('nova.pages.verification.notice'), Authorize::class, - // 'nova.verified', ], /* diff --git a/tests/Browser/CustomAuthenticatesUserTest.php b/tests/Browser/CustomAuthenticatesUserTest.php index 3f41e82c..c43cffd1 100644 --- a/tests/Browser/CustomAuthenticatesUserTest.php +++ b/tests/Browser/CustomAuthenticatesUserTest.php @@ -17,17 +17,18 @@ class CustomAuthenticatesUserTest extends DuskTestCase { /** - * Get package providers. + * Override application aliases. + * + * @api * * @param \Illuminate\Foundation\Application $app - * @return array + * @return array */ - protected function getPackageProviders($app) + protected function overrideApplicationProviders($app) { - return collect(parent::getPackageProviders($app)) - ->replace([ - NovaServiceProvider::class => NovaWithoutAuthenticationServiceProvider::class, - ])->all(); + return [ + NovaServiceProvider::class => NovaWithoutAuthenticationServiceProvider::class, + ]; } #[DataProvider('intendedUrlDataProvider')] diff --git a/tests/DuskTestCase.php b/tests/DuskTestCase.php index 8dec02f3..f1bc745a 100644 --- a/tests/DuskTestCase.php +++ b/tests/DuskTestCase.php @@ -6,6 +6,7 @@ use Inertia\ServiceProvider as InertiaServiceProvider; use Laravel\Dusk\Browser; use Laravel\Fortify\FortifyServiceProvider; +use Laravel\Nova\Nova; use Laravel\Nova\NovaCoreServiceProvider; use Laravel\Nova\NovaServiceProvider; use Laravel\Scout\ScoutServiceProvider; @@ -32,6 +33,18 @@ public static function applicationBasePath() return package_path(['vendor', 'laravel', 'nova-dusk-suite']); } + /** + * Prepare the testing environment web driver options. + * + * @api + * + * @return void + */ + public static function defineWebDriverOptions() + { + Nova::$routesResolver = null; + } + /** * Setup the test environment. */