Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

chore: remove legacy Dusk tests and configure maintenance driver

Andras Bacsai63d22f13319e
diff --git a/.env.testing b/.env.testing
index 1a73117986..d445b5afed 100644
--- a/.env.testing
+++ b/.env.testing
@@ -1,6 +1,7 @@
APP_ENV=testing
APP_KEY=base64:8VEfVNVkXQ9mH2L33WBWNMF4eQ0BWD5CTzB8mIxcl+k=
APP_DEBUG=true
+APP_MAINTENANCE_DRIVER=file
DB_CONNECTION=testing
diff --git a/app/Providers/DuskServiceProvider.php b/app/Providers/DuskServiceProvider.php
deleted file mode 100644
index 07e0e8709f..0000000000
--- a/app/Providers/DuskServiceProvider.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-namespace App\Providers;
-
-use Illuminate\Support\ServiceProvider;
-
-class DuskServiceProvider extends ServiceProvider
-{
- /**
- * Register Dusk's browser macros.
- */
- public function boot(): void
- {
- \Laravel\Dusk\Browser::macro('loginWithRootUser', function () {
- return $this->visit('/login')
- ->type('email', '[email protected]')
- ->type('password', 'password')
- ->press('Login');
- });
- }
-}
diff --git a/composer.json b/composer.json
index 18e125510d..c0ffc6f07f 100644
--- a/composer.json
+++ b/composer.json
@@ -64,7 +64,6 @@
"driftingly/rector-laravel": "^2.5.0",
"fakerphp/faker": "^1.24.1",
"laravel/boost": "^2.4.8",
- "laravel/dusk": "^8.6.0",
"laravel/pint": "^1.30.4",
"mockery/mockery": "^1.6.12",
"nunomaduro/collision": "^8.9.5",
diff --git a/composer.lock b/composer.lock
index 18c5260f32..b77aef46f5 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "2d511da9e5e82eade5aa7e5094c888ae",
+ "content-hash": "13e5d201c34a64cdf53e80a21304c9d5",
"packages": [
{
"name": "aws/aws-crt-php",
@@ -13698,80 +13698,6 @@
},
"time": "2026-05-19T20:09:50+00:00"
},
- {
- "name": "laravel/dusk",
- "version": "v8.6.0",
- "source": {
- "type": "git",
- "url": "https://github.com/laravel/dusk.git",
- "reference": "e7fd48762c6a82ad2cd311db07587aa2a97ce143"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/laravel/dusk/zipball/e7fd48762c6a82ad2cd311db07587aa2a97ce143",
- "reference": "e7fd48762c6a82ad2cd311db07587aa2a97ce143",
- "shasum": ""
- },
- "require": {
- "ext-json": "*",
- "ext-zip": "*",
- "guzzlehttp/guzzle": "^7.5",
- "illuminate/console": "^10.0|^11.0|^12.0|^13.0",
- "illuminate/support": "^10.0|^11.0|^12.0|^13.0",
- "php": "^8.1",
- "php-webdriver/webdriver": "^1.15.2",
- "symfony/console": "^6.2|^7.0|^8.0",
- "symfony/finder": "^6.2|^7.0|^8.0",
- "symfony/process": "^6.2|^7.0|^8.0",
- "vlucas/phpdotenv": "^5.2"
- },
- "require-dev": {
- "laravel/framework": "^10.0|^11.0|^12.0|^13.0",
- "mockery/mockery": "^1.6",
- "orchestra/testbench-core": "^8.19|^9.17|^10.8|^11.0",
- "phpstan/phpstan": "^1.10",
- "phpunit/phpunit": "^10.1|^11.0|^12.0.1",
- "psy/psysh": "^0.11.12|^0.12",
- "symfony/yaml": "^6.2|^7.0|^8.0"
- },
- "suggest": {
- "ext-pcntl": "Used to gracefully terminate Dusk when tests are running."
- },
- "type": "library",
- "extra": {
- "laravel": {
- "providers": [
- "Laravel\\Dusk\\DuskServiceProvider"
- ]
- }
- },
- "autoload": {
- "psr-4": {
- "Laravel\\Dusk\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Taylor Otwell",
- "email": "[email protected]"
- }
- ],
- "description": "Laravel Dusk provides simple end-to-end testing and browser automation.",
- "keywords": [
- "laravel",
- "testing",
- "webdriver"
- ],
- "support": {
- "issues": "https://github.com/laravel/dusk/issues",
- "source": "https://github.com/laravel/dusk/tree/v8.6.0"
- },
- "time": "2026-04-15T14:50:40+00:00"
- },
{
"name": "laravel/pint",
"version": "v1.30.4",
@@ -14817,72 +14743,6 @@
},
"time": "2022-02-21T01:04:05+00:00"
},
- {
- "name": "php-webdriver/webdriver",
- "version": "1.16.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-webdriver/php-webdriver.git",
- "reference": "ac0662863aa120b4f645869f584013e4c4dba46a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/ac0662863aa120b4f645869f584013e4c4dba46a",
- "reference": "ac0662863aa120b4f645869f584013e4c4dba46a",
- "shasum": ""
- },
- "require": {
- "ext-curl": "*",
- "ext-json": "*",
- "ext-zip": "*",
- "php": "^7.3 || ^8.0",
- "symfony/polyfill-mbstring": "^1.12",
- "symfony/process": "^5.0 || ^6.0 || ^7.0 || ^8.0"
- },
- "replace": {
- "facebook/webdriver": "*"
- },
- "require-dev": {
- "ergebnis/composer-normalize": "^2.20.0",
- "ondram/ci-detector": "^4.0",
- "php-coveralls/php-coveralls": "^2.4",
- "php-mock/php-mock-phpunit": "^2.0",
- "php-parallel-lint/php-parallel-lint": "^1.2",
- "phpunit/phpunit": "^9.3",
- "squizlabs/php_codesniffer": "^3.5",
- "symfony/var-dumper": "^5.0 || ^6.0 || ^7.0 || ^8.0"
- },
- "suggest": {
- "ext-simplexml": "For Firefox profile creation"
- },
- "type": "library",
- "autoload": {
- "files": [
- "lib/Exception/TimeoutException.php"
- ],
- "psr-4": {
- "Facebook\\WebDriver\\": "lib/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "A PHP client for Selenium WebDriver. Previously facebook/webdriver.",
- "homepage": "https://github.com/php-webdriver/php-webdriver",
- "keywords": [
- "Chromedriver",
- "geckodriver",
- "php",
- "selenium",
- "webdriver"
- ],
- "support": {
- "issues": "https://github.com/php-webdriver/php-webdriver/issues",
- "source": "https://github.com/php-webdriver/php-webdriver/tree/1.16.0"
- },
- "time": "2025-12-28T23:57:40+00:00"
- },
{
"name": "phpstan/phpstan",
"version": "2.2.8",
diff --git a/config/app.php b/config/app.php
index 13a5b7d4b8..59aa6f4c28 100644
--- a/config/app.php
+++ b/config/app.php
@@ -193,8 +193,8 @@ return [
*/
'maintenance' => [
- 'driver' => 'cache',
- 'store' => 'redis',
+ 'driver' => env('APP_MAINTENANCE_DRIVER', 'cache'),
+ 'store' => env('APP_MAINTENANCE_STORE', 'redis'),
],
/*
diff --git a/tests/Browser/LoginTest.php b/tests/Browser/LoginTest.php
deleted file mode 100644
index d20e652946..0000000000
--- a/tests/Browser/LoginTest.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-namespace Tests\Browser;
-
-use Laravel\Dusk\Browser;
-use Tests\DuskTestCase;
-use Throwable;
-
-class LoginTest extends DuskTestCase
-{
- /**
- * A basic test for the login page.
- * Login with the test user and assert that the user is redirected to the dashboard.
- *
- * @return void
- *
- * @throws Throwable
- */
- public function test_login()
- {
- $this->browse(callback: function (Browser $browser) {
- $browser->loginWithRootUser()
- ->assertPathIs('/')
- ->assertSee('Dashboard');
- });
- }
-}
diff --git a/tests/Browser/Project/ProjectAddNewTest.php b/tests/Browser/Project/ProjectAddNewTest.php
deleted file mode 100644
index b03313e4b0..0000000000
--- a/tests/Browser/Project/ProjectAddNewTest.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-namespace Tests\Browser;
-
-use Laravel\Dusk\Browser;
-use Tests\DuskTestCase;
-use Throwable;
-
-class ProjectAddNewTest extends DuskTestCase
-{
- /**
- * A basic test for the projects page.
- * Login with the test user and assert that the user is redirected to the projects page.
- *
- * @return void
- *
- * @throws Throwable
- */
- public function test_login()
- {
- $this->browse(function (Browser $browser) {
- $browser->loginWithRootUser()
- ->visit('/projects')
- ->pressAndWaitFor('+ Add', 1)
- ->assertSee('New Project')
- ->screenshot('project-add-new-1')
- ->type('name', 'Test Project')
- ->screenshot('project-add-new-2')
- ->press('Continue')
- ->assertSee('Test Project.')
- ->screenshot('project-add-new-3');
- });
- }
-}
diff --git a/tests/Browser/Project/ProjectSearchTest.php b/tests/Browser/Project/ProjectSearchTest.php
deleted file mode 100644
index 7bc6796d10..0000000000
--- a/tests/Browser/Project/ProjectSearchTest.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-namespace Tests\Browser;
-
-use Laravel\Dusk\Browser;
-use Tests\DuskTestCase;
-use Throwable;
-
-class ProjectSearchTest extends DuskTestCase
-{
- /**
- * A basic test for the projects page.
- * Login with the test user and assert that the user is redirected to the projects page.
- *
- * @return void
- *
- * @throws Throwable
- */
- public function test_login()
- {
- $this->browse(function (Browser $browser) {
- $browser->loginWithRootUser()
- ->visit('/projects')
- ->type('[x-model="search"]', 'joi43j4oi32j4o2')
- ->assertSee('No project found with the search term "joi43j4oi32j4o2".')
- ->screenshot('project-search-not-found');
- });
- }
-}
diff --git a/tests/Browser/Project/ProjectTest.php b/tests/Browser/Project/ProjectTest.php
deleted file mode 100644
index 0d360e4604..0000000000
--- a/tests/Browser/Project/ProjectTest.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-namespace Tests\Browser;
-
-use Laravel\Dusk\Browser;
-use Tests\DuskTestCase;
-use Throwable;
-
-class ProjectTest extends DuskTestCase
-{
- /**
- * A basic test for the projects page.
- * Login with the test user and assert that the user is redirected to the projects page.
- *
- * @return void
- *
- * @throws Throwable
- */
- public function test_login()
- {
- $this->browse(function (Browser $browser) {
- $browser->loginWithRootUser()
- ->visit('/projects')
- ->assertSee('Projects');
- });
- }
-}
diff --git a/tests/Browser/console/.gitignore b/tests/Browser/console/.gitignore
deleted file mode 100644
index d6b7ef32c8..0000000000
--- a/tests/Browser/console/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
diff --git a/tests/Browser/source/.gitignore b/tests/Browser/source/.gitignore
deleted file mode 100644
index d6b7ef32c8..0000000000
--- a/tests/Browser/source/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
diff --git a/tests/DuskTestCase.php b/tests/DuskTestCase.php
deleted file mode 100644
index 98e90fa79c..0000000000
--- a/tests/DuskTestCase.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-
-namespace Tests;
-
-use Facebook\WebDriver\Chrome\ChromeOptions;
-use Facebook\WebDriver\Remote\DesiredCapabilities;
-use Facebook\WebDriver\Remote\RemoteWebDriver;
-use Illuminate\Support\Collection;
-use Laravel\Dusk\TestCase as BaseTestCase;
-
-abstract class DuskTestCase extends BaseTestCase
-{
- use CreatesApplication;
-
- /**
- * Prepare for Dusk test execution.
- *
- * @beforeClass
- */
- public static function prepare(): void
- {
- if (! static::runningInSail()) {
- static::startChromeDriver();
- }
- }
-
- /**
- * Create the RemoteWebDriver instance.
- */
- protected function driver(): RemoteWebDriver
- {
- $options = (new ChromeOptions)->addArguments(collect([
- $this->shouldStartMaximized() ? '--start-maximized' : '--window-size=1920,1080',
- ])->unless($this->hasHeadlessDisabled(), function (Collection $items) {
- return $items->merge([
- '--disable-gpu',
- '--headless=new',
- ]);
- })->all());
-
- return RemoteWebDriver::create(
- 'http://localhost:4444',
- DesiredCapabilities::chrome()->setCapability(
- ChromeOptions::CAPABILITY,
- $options
- )
- );
- }
-
- /**
- * Determine if the browser window should start maximized.
- */
- protected function baseUrl()
- {
- return 'http://localhost:8000';
- }
-}