diff --git a/.github/workflows/dusk-tests.yml b/.github/workflows/dusk-tests.yml deleted file mode 100644 index 13b2d6a4..00000000 --- a/.github/workflows/dusk-tests.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: Dusk Tests - -on: - workflow_call: - workflow_dispatch: - -jobs: - dusk-tests: - runs-on: ubuntu-latest - env: - APP_URL: "http://127.0.0.1:8000" - DB_CONNECTION: pgsql - DB_HOST: 127.0.0.1 - DB_PORT: 5432 - DB_DATABASE: vanguard - DB_USERNAME: postgres - DB_PASSWORD: password - MAIL_MAILER: log - REDIS_HOST: 127.0.0.1 - REDIS_PORT: 6379 - - services: - postgres: - image: postgres:15.1 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - POSTGRES_DB: vanguard - ports: - - 5432:5432 - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - redis: - image: redis - ports: - - 6379:6379 - options: >- - --health-cmd "redis-cli ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.3' - extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pdo_pgsql, dom, filter, gd, iconv, json, mbstring, pdo - env: - update: true - - - name: Prepare The Environment - run: cp .env.example.ci .env - - - name: Get composer cache directory - id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: Cache composer dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install Composer Dependencies - run: composer install --no-progress --prefer-dist --optimize-autoloader - - - name: Generate Application Key - run: php artisan key:generate - - - name: Prepare Laravel Application - run: | - sed -i 's/APP_URL=https:\/\/127.0.0.1/APP_URL=http:\/\/127.0.0.1:8000/' .env - sed -i 's/DB_HOST=postgres/DB_HOST=127.0.0.1/' .env - - - name: Cache NPM packages - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: ${{ runner.os }}-node- - - - name: Install npm dependencies - run: npm ci - - - name: Build assets - run: npm run build - - - name: Upgrade Chrome Driver - run: php artisan dusk:chrome-driver --detect - - - name: Start Chrome Driver - run: ./vendor/laravel/dusk/bin/chromedriver-linux & - - - name: Run Laravel Server - run: php artisan serve --no-reload & - - - name: Run Dusk Tests - run: php artisan dusk - - - name: Upload Screenshots - if: failure() - uses: actions/upload-artifact@v4 - with: - name: screenshots - path: tests/Browser/screenshots - - - name: Upload Console Logs - if: failure() - uses: actions/upload-artifact@v4 - with: - name: console - path: tests/Browser/console diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 5367d7fc..a84b12da 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -29,12 +29,8 @@ jobs: needs: rector uses: ./.github/workflows/pest-tests.yml - dusk-tests: - needs: rector - uses: ./.github/workflows/dusk-tests.yml - ci-passed: - needs: [pest-tests, dusk-tests] + needs: [pest-tests] runs-on: ubuntu-latest steps: - run: echo "All CI checks passed!" diff --git a/.husky/pre-commit b/.husky/pre-commit index cc7dee0c..5119a14a 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -91,34 +91,6 @@ run_command() { printf " ${GREEN}(%.2fs) No errors found${NC}\n" "$duration" return 0 fi - elif [ "$1" = "Running Pest tests" ] || [ "$1" = "Running Dusk tests" ]; then - if echo "$output" | grep -q "No \"dirty\" tests found"; then - print_result 2 - printf " ${CYAN}(%.2fs) Tests skipped (no relevant changes)${NC}\n" "$duration" - return 0 - elif echo "$output" | grep -q " FAILURES!"; then - print_result 1 - printf " ${RED}(%.2fs)${NC}\n" "$duration" - printf "\n${RED}Test Failures:${NC}\n" - echo "$output" | sed -n '/FAILURES!/,/ERRORS!/p' | while IFS= read -r line; do - printf "${RED}%s${NC}\n" "$line" - done - return 1 - elif [ $exit_code -eq 0 ]; then - print_result 0 - printf " ${GREEN}(%.2fs)${NC}\n" "$duration" - if [ "$1" = "Running Pest tests" ]; then - echo "$output" | grep "Tests:" >&2 - elif [ "$1" = "Running Dusk tests" ]; then - echo "$output" | grep "OK (" >&2 - fi - return 0 - else - print_result 1 - printf " ${RED}(%.2fs)${NC}\n" "$duration" - printf "\n${RED}Test Error:${NC}\n%s\n\n" "$output" - return 1 - fi elif [ "$1" = "Checking code style" ]; then if echo "$output" | grep -q "LGTM!"; then print_result 0 @@ -192,7 +164,6 @@ run_command() { commands=( "Running Static Analysis:./vendor/bin/phpstan analyse --no-progress" "Running Pest tests:./vendor/bin/pest --parallel --dirty --bail" - "Running Dusk tests:php artisan dusk --dirty --bail" "Checking Code Style:./vendor/bin/duster lint" "Checking for Refactoring Opportunities:./vendor/bin/rector --no-progress-bar --dry-run" "Checking Prettier formatting:npx prettier --check resources/" @@ -245,9 +216,6 @@ else "Running Pest tests") printf " ${YELLOW}To fix: Run '${CYAN}./vendor/bin/pest${YELLOW}' and fix failing tests${NC}\n" ;; - "Running Dusk tests") - printf " ${YELLOW}To fix: Run '${CYAN}php artisan dusk${YELLOW}' and fix failing browser tests${NC}\n" - ;; "Checking code style") printf " ${YELLOW}To fix: Run '${CYAN}./vendor/bin/duster fix${YELLOW}' to automatically fix style issues${NC}\n" ;; diff --git a/composer.json b/composer.json index b4301c14..ab1d9665 100644 --- a/composer.json +++ b/composer.json @@ -7,14 +7,12 @@ "require": { "php": "^8.2", "afatmustafa/blade-hugeicons": "^0.0.3", - "blade-ui-kit/blade-heroicons": "^2.3", "danharrin/livewire-rate-limiting": "^1.3", "diglactic/laravel-breadcrumbs": "^9.0", "jenssegers/agent": "^2.6", "laragear/two-factor": "^2.0", "laravel/framework": "^11.9", "laravel/horizon": "^5.24", - "laravel/pail": "^1.1", "laravel/pennant": "^1.10", "laravel/pulse": "^1.2", "laravel/reverb": "@beta", @@ -27,8 +25,7 @@ "masmerise/livewire-toaster": "^2.2", "motomedialab/simple-laravel-audit": "^1.2", "phpseclib/phpseclib": "~3.0", - "socialiteproviders/bitbucket": "^4.1", - "spatie/laravel-flare": "^1.0" + "socialiteproviders/bitbucket": "^4.1" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.13", @@ -37,7 +34,6 @@ "fakerphp/faker": "^1.23", "larastan/larastan": "^2.0", "laravel/breeze": "^2.0", - "laravel/dusk": "^8.2", "laravel/pint": "^1.16", "laravel/sail": "^1.26", "mockery/mockery": "^1.6", diff --git a/composer.lock b/composer.lock index 7ca48474..99e5bfa0 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": "eb1028ea90deb8674f5de0f4812de57f", + "content-hash": "78609d0833ff8a2da54a13d82c721fca", "packages": [ { "name": "afatmustafa/blade-hugeicons", @@ -273,75 +273,6 @@ }, "time": "2024-04-18T11:16:25+00:00" }, - { - "name": "blade-ui-kit/blade-heroicons", - "version": "2.4.0", - "source": { - "type": "git", - "url": "https://github.com/blade-ui-kit/blade-heroicons.git", - "reference": "a7c377a4ef88cd54712e3e15cbed30446820da0b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/a7c377a4ef88cd54712e3e15cbed30446820da0b", - "reference": "a7c377a4ef88cd54712e3e15cbed30446820da0b", - "shasum": "" - }, - "require": { - "blade-ui-kit/blade-icons": "^1.6", - "illuminate/support": "^9.0|^10.0|^11.0", - "php": "^8.0" - }, - "require-dev": { - "orchestra/testbench": "^7.0|^8.0|^9.0", - "phpunit/phpunit": "^9.0|^10.5|^11.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "BladeUI\\Heroicons\\BladeHeroiconsServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "BladeUI\\Heroicons\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dries Vints", - "homepage": "https://driesvints.com" - } - ], - "description": "A package to easily make use of Heroicons in your Laravel Blade views.", - "homepage": "https://github.com/blade-ui-kit/blade-heroicons", - "keywords": [ - "Heroicons", - "blade", - "laravel" - ], - "support": { - "issues": "https://github.com/blade-ui-kit/blade-heroicons/issues", - "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/2.4.0" - }, - "funding": [ - { - "url": "https://github.com/sponsors/driesvints", - "type": "github" - }, - { - "url": "https://www.paypal.com/paypalme/driesvints", - "type": "paypal" - } - ], - "time": "2024-07-16T07:00:01+00:00" - }, { "name": "blade-ui-kit/blade-icons", "version": "1.7.1", @@ -2613,84 +2544,6 @@ }, "time": "2024-08-05T14:23:30+00:00" }, - { - "name": "laravel/pail", - "version": "v1.1.3", - "source": { - "type": "git", - "url": "https://github.com/laravel/pail.git", - "reference": "c22fe771277971eb9cd224955996bcf39c1a710d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/pail/zipball/c22fe771277971eb9cd224955996bcf39c1a710d", - "reference": "c22fe771277971eb9cd224955996bcf39c1a710d", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-pcntl": "*", - "illuminate/console": "^10.24|^11.0", - "illuminate/contracts": "^10.24|^11.0", - "illuminate/log": "^10.24|^11.0", - "illuminate/process": "^10.24|^11.0", - "illuminate/support": "^10.24|^11.0", - "nunomaduro/termwind": "^1.15|^2.0", - "php": "^8.2", - "symfony/console": "^6.0|^7.0" - }, - "require-dev": { - "laravel/pint": "^1.13", - "orchestra/testbench": "^8.12|^9.0", - "pestphp/pest": "^2.20", - "pestphp/pest-plugin-type-coverage": "^2.3", - "phpstan/phpstan": "^1.10", - "symfony/var-dumper": "^6.3|^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - }, - "laravel": { - "providers": [ - "Laravel\\Pail\\PailServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Laravel\\Pail\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - }, - { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" - } - ], - "description": "Easily delve into your Laravel application's log files directly from the command line.", - "homepage": "https://github.com/laravel/pail", - "keywords": [ - "laravel", - "logs", - "php", - "tail" - ], - "support": { - "issues": "https://github.com/laravel/pail/issues", - "source": "https://github.com/laravel/pail" - }, - "time": "2024-05-08T18:19:39+00:00" - }, { "name": "laravel/pennant", "version": "v1.11.0", @@ -6543,443 +6396,6 @@ }, "time": "2024-05-04T07:57:39+00:00" }, - { - "name": "spatie/backtrace", - "version": "1.6.2", - "source": { - "type": "git", - "url": "https://github.com/spatie/backtrace.git", - "reference": "1a9a145b044677ae3424693f7b06479fc8c137a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/backtrace/zipball/1a9a145b044677ae3424693f7b06479fc8c137a9", - "reference": "1a9a145b044677ae3424693f7b06479fc8c137a9", - "shasum": "" - }, - "require": { - "php": "^7.3|^8.0" - }, - "require-dev": { - "ext-json": "*", - "laravel/serializable-closure": "^1.3", - "phpunit/phpunit": "^9.3", - "spatie/phpunit-snapshot-assertions": "^4.2", - "symfony/var-dumper": "^5.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\Backtrace\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van de Herten", - "email": "freek@spatie.be", - "homepage": "https://spatie.be", - "role": "Developer" - } - ], - "description": "A better backtrace", - "homepage": "https://github.com/spatie/backtrace", - "keywords": [ - "Backtrace", - "spatie" - ], - "support": { - "source": "https://github.com/spatie/backtrace/tree/1.6.2" - }, - "funding": [ - { - "url": "https://github.com/sponsors/spatie", - "type": "github" - }, - { - "url": "https://spatie.be/open-source/support-us", - "type": "other" - } - ], - "time": "2024-07-22T08:21:24+00:00" - }, - { - "name": "spatie/error-solutions", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/spatie/error-solutions.git", - "reference": "ae7393122eda72eed7cc4f176d1e96ea444f2d67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/error-solutions/zipball/ae7393122eda72eed7cc4f176d1e96ea444f2d67", - "reference": "ae7393122eda72eed7cc4f176d1e96ea444f2d67", - "shasum": "" - }, - "require": { - "php": "^8.0" - }, - "require-dev": { - "illuminate/broadcasting": "^10.0|^11.0", - "illuminate/cache": "^10.0|^11.0", - "illuminate/support": "^10.0|^11.0", - "livewire/livewire": "^2.11|^3.3.5", - "openai-php/client": "^0.10.1", - "orchestra/testbench": "^7.0|8.22.3|^9.0", - "pestphp/pest": "^2.20", - "phpstan/phpstan": "^1.11", - "psr/simple-cache": "^3.0", - "psr/simple-cache-implementation": "^3.0", - "spatie/ray": "^1.28", - "symfony/cache": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "vlucas/phpdotenv": "^5.5" - }, - "suggest": { - "openai-php/client": "Require get solutions from OpenAI", - "simple-cache-implementation": "To cache solutions from OpenAI" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\Ignition\\": "legacy/ignition", - "Spatie\\ErrorSolutions\\": "src", - "Spatie\\LaravelIgnition\\": "legacy/laravel-ignition" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ruben Van Assche", - "email": "ruben@spatie.be", - "role": "Developer" - } - ], - "description": "This is my package error-solutions", - "homepage": "https://github.com/spatie/error-solutions", - "keywords": [ - "error-solutions", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/error-solutions/issues", - "source": "https://github.com/spatie/error-solutions/tree/1.1.1" - }, - "funding": [ - { - "url": "https://github.com/Spatie", - "type": "github" - } - ], - "time": "2024-07-25T11:06:04+00:00" - }, - { - "name": "spatie/flare-client-php", - "version": "1.8.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/flare-client-php.git", - "reference": "180f8ca4c0d0d6fc51477bd8c53ce37ab5a96122" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/180f8ca4c0d0d6fc51477bd8c53ce37ab5a96122", - "reference": "180f8ca4c0d0d6fc51477bd8c53ce37ab5a96122", - "shasum": "" - }, - "require": { - "illuminate/pipeline": "^8.0|^9.0|^10.0|^11.0", - "php": "^8.0", - "spatie/backtrace": "^1.6.1", - "symfony/http-foundation": "^5.2|^6.0|^7.0", - "symfony/mime": "^5.2|^6.0|^7.0", - "symfony/process": "^5.2|^6.0|^7.0", - "symfony/var-dumper": "^5.2|^6.0|^7.0" - }, - "require-dev": { - "dms/phpunit-arraysubset-asserts": "^0.5.0", - "pestphp/pest": "^1.20|^2.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "spatie/pest-plugin-snapshots": "^1.0|^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.3.x-dev" - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Spatie\\FlareClient\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Send PHP errors to Flare", - "homepage": "https://github.com/spatie/flare-client-php", - "keywords": [ - "exception", - "flare", - "reporting", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/flare-client-php/issues", - "source": "https://github.com/spatie/flare-client-php/tree/1.8.0" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2024-08-01T08:27:26+00:00" - }, - { - "name": "spatie/laravel-error-share", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/spatie/laravel-error-share.git", - "reference": "4421cc53d5b408ed4415165c294bd8f418da25c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-error-share/zipball/4421cc53d5b408ed4415165c294bd8f418da25c9", - "reference": "4421cc53d5b408ed4415165c294bd8f418da25c9", - "shasum": "" - }, - "require": { - "illuminate/contracts": "^11.10", - "php": "^8.2", - "spatie/laravel-package-tools": "^1.16" - }, - "require-dev": { - "larastan/larastan": "^2.9", - "laravel/pint": "^1.14", - "nunomaduro/collision": "^8.1.1||^7.10.0", - "orchestra/testbench": "^9.0.0||^8.22.0", - "pestphp/pest": "^2.34", - "pestphp/pest-plugin-arch": "^2.7", - "pestphp/pest-plugin-laravel": "^2.3", - "phpstan/extension-installer": "^1.3", - "phpstan/phpstan-deprecation-rules": "^1.1", - "phpstan/phpstan-phpunit": "^1.3", - "spatie/pest-plugin-snapshots": "^2.1" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Spatie\\LaravelErrorShare\\LaravelErrorShareServiceProvider" - ], - "aliases": { - "LaravelErrorShare": "Spatie\\LaravelErrorShare\\Facades\\LaravelErrorShare" - } - } - }, - "autoload": { - "psr-4": { - "Spatie\\LaravelErrorShare\\": "src/", - "Spatie\\LaravelErrorShare\\Database\\Factories\\": "database/factories/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ruben Van Assche", - "email": "ruben@spatie.be", - "role": "Developer" - } - ], - "description": "Share your Laravel errors to Flare", - "homepage": "https://github.com/spatie/laravel-error-share", - "keywords": [ - "dev", - "errors", - "flare", - "laravel", - "laravel-error-share", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/laravel-error-share/issues", - "source": "https://github.com/spatie/laravel-error-share/tree/1.0.2" - }, - "funding": [ - { - "url": "https://github.com/Spatie", - "type": "github" - } - ], - "time": "2024-06-21T15:06:57+00:00" - }, - { - "name": "spatie/laravel-flare", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/laravel-flare.git", - "reference": "e05a1621e5dbe50f7b51e87a10d6764425d66278" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-flare/zipball/e05a1621e5dbe50f7b51e87a10d6764425d66278", - "reference": "e05a1621e5dbe50f7b51e87a10d6764425d66278", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "illuminate/support": "^11.0", - "php": "^8.1", - "spatie/error-solutions": "^1.0", - "spatie/flare-client-php": "^1.7", - "spatie/laravel-error-share": "^1.0", - "symfony/console": "^7.0", - "symfony/var-dumper": "^7.0" - }, - "require-dev": { - "livewire/livewire": "^3.3.5", - "mockery/mockery": "^1.5.1", - "openai-php/client": "^0.8.1", - "orchestra/testbench": "8.22.3|^9.0", - "pestphp/pest": "^2.34", - "phpstan/extension-installer": "^1.3.1", - "phpstan/phpstan-deprecation-rules": "^1.1.1", - "phpstan/phpstan-phpunit": "^1.3.16", - "vlucas/phpdotenv": "^5.5" - }, - "suggest": { - "openai-php/client": "Require get solutions from OpenAI", - "psr/simple-cache-implementation": "Needed to cache solutions from OpenAI" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Spatie\\LaravelFlare\\FlareServiceProvider" - ], - "aliases": { - "Flare": "Spatie\\LaravelFlare\\Facades\\Flare" - } - } - }, - "autoload": { - "psr-4": { - "Spatie\\LaravelFlare\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Spatie", - "email": "info@spatie.be", - "role": "Developer" - } - ], - "description": "Send Laravel errors to Flare", - "homepage": "https://flareapp.io/", - "keywords": [ - "error", - "flare", - "laravel" - ], - "support": { - "docs": "https://flareapp.io/docs/integration/laravel-customizations/introduction", - "forum": "https://twitter.com/flareappio", - "issues": "https://github.com/spatie/laravel-flare/issues", - "source": "https://github.com/spatie/laravel-flare" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2024-06-12T15:00:28+00:00" - }, - { - "name": "spatie/laravel-package-tools", - "version": "1.16.5", - "source": { - "type": "git", - "url": "https://github.com/spatie/laravel-package-tools.git", - "reference": "c7413972cf22ffdff97b68499c22baa04eddb6a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/c7413972cf22ffdff97b68499c22baa04eddb6a2", - "reference": "c7413972cf22ffdff97b68499c22baa04eddb6a2", - "shasum": "" - }, - "require": { - "illuminate/contracts": "^9.28|^10.0|^11.0", - "php": "^8.0" - }, - "require-dev": { - "mockery/mockery": "^1.5", - "orchestra/testbench": "^7.7|^8.0", - "pestphp/pest": "^1.22", - "phpunit/phpunit": "^9.5.24", - "spatie/pest-plugin-test-time": "^1.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\LaravelPackageTools\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "role": "Developer" - } - ], - "description": "Tools for creating Laravel packages", - "homepage": "https://github.com/spatie/laravel-package-tools", - "keywords": [ - "laravel-package-tools", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/laravel-package-tools/issues", - "source": "https://github.com/spatie/laravel-package-tools/tree/1.16.5" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2024-08-27T18:56:10+00:00" - }, { "name": "symfony/clock", "version": "v7.1.1", @@ -10576,78 +9992,6 @@ }, "time": "2024-08-12T22:06:50+00:00" }, - { - "name": "laravel/dusk", - "version": "v8.2.5", - "source": { - "type": "git", - "url": "https://github.com/laravel/dusk.git", - "reference": "e641800393ce4ad39f0a47133f51aae67ceb01ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/dusk/zipball/e641800393ce4ad39f0a47133f51aae67ceb01ad", - "reference": "e641800393ce4ad39f0a47133f51aae67ceb01ad", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-zip": "*", - "guzzlehttp/guzzle": "^7.5", - "illuminate/console": "^10.0|^11.0", - "illuminate/support": "^10.0|^11.0", - "php": "^8.1", - "php-webdriver/webdriver": "^1.9.0", - "symfony/console": "^6.2|^7.0", - "symfony/finder": "^6.2|^7.0", - "symfony/process": "^6.2|^7.0", - "vlucas/phpdotenv": "^5.2" - }, - "require-dev": { - "mockery/mockery": "^1.6", - "orchestra/testbench": "^8.19|^9.0", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.1|^11.0", - "psy/psysh": "^0.11.12|^0.12" - }, - "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": "taylor@laravel.com" - } - ], - "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.2.5" - }, - "time": "2024-08-26T12:34:33+00:00" - }, { "name": "laravel/pint", "version": "v1.17.2", @@ -11526,72 +10870,6 @@ }, "time": "2022-02-21T01:04:05+00:00" }, - { - "name": "php-webdriver/webdriver", - "version": "1.15.1", - "source": { - "type": "git", - "url": "https://github.com/php-webdriver/php-webdriver.git", - "reference": "cd52d9342c5aa738c2e75a67e47a1b6df97154e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/cd52d9342c5aa738c2e75a67e47a1b6df97154e8", - "reference": "cd52d9342c5aa738c2e75a67e47a1b6df97154e8", - "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" - }, - "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" - }, - "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.15.1" - }, - "time": "2023-10-20T12:21:20+00:00" - }, { "name": "phpdocumentor/reflection-common", "version": "2.2.0", diff --git a/tests/Browser/LoginTest.php b/tests/Browser/LoginTest.php deleted file mode 100644 index 859d1c5a..00000000 --- a/tests/Browser/LoginTest.php +++ /dev/null @@ -1,23 +0,0 @@ -create([ - 'password' => Hash::make($password), - ]); - - $this->browse(function (Browser $browser) use ($user, $password): void { - $browser->visit(route('login')) - ->type('@email', $user->getAttribute('email')) - ->type('@password', $password) - ->press('@login-button') - ->waitForLocation(route('overview')) - ->assertPathIs('/overview'); - }); -}); diff --git a/tests/Browser/Pages/HomePage.php b/tests/Browser/Pages/HomePage.php deleted file mode 100644 index 8f88fb82..00000000 --- a/tests/Browser/Pages/HomePage.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ - public function elements(): array - { - return [ - '@element' => '#selector', - ]; - } -} diff --git a/tests/Browser/Pages/Page.php b/tests/Browser/Pages/Page.php deleted file mode 100644 index eacf0cfb..00000000 --- a/tests/Browser/Pages/Page.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ - public static function siteElements(): array - { - return [ - '@element' => '#selector', - ]; - } -} diff --git a/tests/Browser/RegisterTest.php b/tests/Browser/RegisterTest.php deleted file mode 100644 index 016c9a24..00000000 --- a/tests/Browser/RegisterTest.php +++ /dev/null @@ -1,18 +0,0 @@ -browse(function (Browser $browser): void { - $browser->visit(route('register')) - ->type('@name', 'John Doe') - ->type('@email', 'user@email.com') - ->type('@password', 'password123') - ->type('@password_confirmation', 'password123') - ->press('@create_account_button') - ->waitForLocation(route('overview')) - ->assertPathIs('/overview'); - }); -}); diff --git a/tests/Browser/console/.gitignore b/tests/Browser/console/.gitignore deleted file mode 100644 index d6b7ef32..00000000 --- a/tests/Browser/console/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/tests/Browser/screenshots/.gitignore b/tests/Browser/screenshots/.gitignore deleted file mode 100644 index d6b7ef32..00000000 --- a/tests/Browser/screenshots/.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 d6b7ef32..00000000 --- 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 01e74b60..00000000 --- a/tests/DuskTestCase.php +++ /dev/null @@ -1,106 +0,0 @@ -dropAllTables(); - $this->artisan('migrate'); - } - - protected function dropAllTables(): void - { - $connection = DB::connection()->getDriverName(); - - match ($connection) { - 'pgsql' => $this->dropPostgresTables(), - 'mysql' => $this->dropMySQLTables(), - 'sqlite' => $this->dropSQLiteTables(), - default => throw new RuntimeException("Unsupported database driver: {$connection}"), - }; - } - - protected function dropPostgresTables(): void - { - DB::statement("SET session_replication_role = 'replica';"); - - $tables = DB::select("SELECT tablename FROM pg_tables WHERE schemaname = 'public'"); - foreach ($tables as $table) { - DB::statement('DROP TABLE IF EXISTS "' . $table->tablename . '" CASCADE'); - } - - DB::statement("SET session_replication_role = 'origin';"); - } - - protected function dropMySQLTables(): void - { - DB::statement('SET FOREIGN_KEY_CHECKS=0;'); - - $tables = DB::select('SHOW TABLES'); - foreach ($tables as $table) { - $table_array = get_object_vars($table); - DB::statement('DROP TABLE IF EXISTS `' . $table_array[key($table_array)] . '`'); - } - - DB::statement('SET FOREIGN_KEY_CHECKS=1;'); - } - - protected function dropSQLiteTables(): void - { - $tables = DB::select("SELECT name FROM sqlite_master WHERE type='table'"); - foreach ($tables as $table) { - if ($table->name !== 'sqlite_sequence') { - DB::statement('DROP TABLE IF EXISTS "' . $table->name . '"'); - } - } - } - - /** - * Create the RemoteWebDriver instance. - */ - protected function driver(): RemoteWebDriver - { - $chromeOptions = (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( - $_ENV['DUSK_DRIVER_URL'] ?? 'http://localhost:9515', - DesiredCapabilities::chrome()->setCapability( - ChromeOptions::CAPABILITY, $chromeOptions - ) - ); - } -} diff --git a/tests/Pest.php b/tests/Pest.php index 157dded3..2d167804 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -8,7 +8,6 @@ use App\Models\RemoteServer; use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; -use Tests\DuskTestCase; use Tests\TestCase; /* @@ -24,7 +23,6 @@ uses(TestCase::class, RefreshDatabase::class)->in('Feature'); uses(TestCase::class, RefreshDatabase::class)->in('Unit'); -uses(DuskTestCase::class)->in('Browser'); uses(TestCase::class, RefreshDatabase::class)->in('Fakes'); /*