beyondcode / dusk-dashboard

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

BadMethodCallException #64

Closed kerimkuscu closed 10 months ago

kerimkuscu commented 4 years ago

I have 1341 tests in total. I run them all once. But in all of them I get the following error. BadMethodCallException: Call to undefined method [setActionCollector]. For example, I will share a test. Screenshot from 2020-02-13 14-53-31

This test is working correctly without using Dusk Dashboard.

Also, my DuskTestCase file is as follows.

<?php

namespace Tests;

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

abstract class DuskTestCase extends BaseTestCase
{
    use CreatesApplication;

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

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

        return RemoteWebDriver::create(
            'http://localhost:9515',
            DesiredCapabilities::chrome()->setCapability(
                ChromeOptions::CAPABILITY,
                $options
            )
        );
    }

    /**
     * Create a new Browser instance.
     *
     * @param RemoteWebDriver $driver
     *
     * @return \Laravel\Dusk\Browser
     */
    protected function newBrowser($driver)
    {
        return new Browser($driver);
    }
}

I also run my tests from the php.dusk.xml file. What is the reason I got this error when everything looks right?

kerimkuscu commented 4 years ago

@mpociot please help