dusk-dashboard icon indicating copy to clipboard operation
dusk-dashboard copied to clipboard

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

Open Braunson opened this issue 6 years ago • 7 comments

  • Running Dusk 5 + Laravel 5.8 + Latest Dusk Dashboard
  • Running inside Homstead
  • When I click "start tests" it runs through the tests on the left hand side and the console (SSH) shows the tests running also but the frame that should show the site being tested shows nothing (it's completely white and empty).

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
                )
            )
        );
    }
}

Braunson avatar Apr 02 '19 14:04 Braunson

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

Brotzka avatar Apr 10 '19 07:04 Brotzka

Related to #38 and fixed in #39

ricardoboss avatar Apr 21 '19 15:04 ricardoboss

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

Braunson avatar Jun 26 '19 21:06 Braunson

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?

carlosalzate74 avatar Aug 02 '19 19:08 carlosalzate74

Getting the same issue here.

Running: Laravel 5.8.35 Dusk 5.5.2 PHPunit 7.5.16

angusm73 avatar Oct 01 '19 04:10 angusm73

Experiencing the same issue

xaniuskarlhall avatar Jan 05 '20 18:01 xaniuskarlhall

me too :(

dewelooper avatar Dec 05 '20 14:12 dewelooper