beyondcode / dusk-dashboard

A beautiful dashboard for your Laravel Dusk tests
https://pociot.dev/8-introducing-laravel-dusk-dashboard
MIT License
558 stars 62 forks source link

Running Dusk 5 + Laravel 5.8 and nothing shows in frame when running tests #37

Closed Braunson closed 8 months ago

Braunson commented 5 years ago

Any ideas?

Here's my DuskTestCase.php which is used in all Dusk tests.

<?php

namespace Tests;

use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use BeyondCode\DuskDashboard\Testing\TestCase as BaseTestCase;

abstract class DuskTestCase extends BaseTestCase
{
    use CreatesApplication;

    /**
     * Prepare for Dusk test execution.
     *
     * @beforeClass
     * @return void
     */
    public static function prepare()
    {
        static::startChromeDriver();
    }

    /**
     * Create the RemoteWebDriver instance.
     *
     * @return \Facebook\WebDriver\Remote\RemoteWebDriver
     */
    protected function driver()
    {
        $options = (new ChromeOptions)->addArguments([
            '--disable-gpu',
            '--headless',
            '--window-size=1920,1080',
        ]);

        return RemoteWebDriver::create(
            'http://localhost:9515', $this->enableNetworkLogging(
                DesiredCapabilities::chrome()->setCapability(
                    ChromeOptions::CAPABILITY, $options
                )
            )
        );
    }
}
Brotzka commented 5 years ago

I have the same problem. But taking a look at my terminal, there show up a fatal error everytime I click "Start Tests".

The error says: PHP Fatal error: Declaration of

BeyondCode\DuskDashboard\Testing\TestCase::onNotSuccessfulTest(Throwable $t) must be compatible with PHPUnit\Framework\TestCase::onNotSuccessfulTest(Throwable $t): void in /home/vagrant/faaren/repositories/website-and-consumer-area/vendor/beyondcode/dusk-dashboard/src/Testing/TestCase.php on line 16

Fatal error: Declaration of BeyondCode\DuskDashboard\Testing\TestCase::onNotSuccessfulTest(Throwable $t) must be compatible with PHPUnit\Framework\TestCase::onNotSuccessfulTest(Throwable $t): void in /home/vagrant/faaren/repositories/website-and-consumer-area/vendor/beyondcode/dusk-dashboard/src/Testing/TestCase.php on line 16

I'm using phpunit 8 and Laravel 5.8

ricardoboss commented 5 years ago

Related to #38 and fixed in #39

Braunson commented 5 years ago

Updated and tried again but still having the issue where the frame shows nothing (but the url.. i.e. /login), tests run tho.

carlosalzate74 commented 5 years ago

Running Laravel 5.8, Dusk 5.4, phpunit 7.5 (which fixed the incompatible declaration of onNotSuccessfulTest).

I started my php artisan dusk:dashboard using console, dashboard opens, hit Start Tests, tests ran in the console but nothing shows up in the dashboard.

Any idea?

angusm73 commented 4 years ago

Getting the same issue here.

Running: Laravel 5.8.35 Dusk 5.5.2 PHPunit 7.5.16

xaniuskarlhall commented 4 years ago

Experiencing the same issue

dewelooper commented 3 years ago

me too :(