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

Test shows up as passing while it isn't #16

Closed pdewit closed 5 years ago

pdewit commented 5 years ago

Hi,

Amazing work on the package! It seemed to work well, but after a bit of playing around with it I have found that it gives false positives for my tests when running it with the package enabled. I have freshly installed Laravel Dusk and this package on an existing project. The one test I added always ends up as successful even though it's not. The dashboard correctly shows the tests as failing in the steps but not in the console or the counters at the top.

If I run php artisan dusk like normal with the package's BaseTestCase import enabled it also gives a false positive.

When I revert the import in DuskTestCase back to the default it ends up as failing again as it should (the random gibberish does not appear in the page).

screenshot 2018-12-13 at 00 28 34
public function testExample()
{
    $this->browse(function (Browser $browser) {
        $browser->visit('/login')
                ->assertSee('sdashdkhalskdh');
    });
}

Any idea?

am-chris commented 5 years ago

I'm running into this issue, too. All of my dusk tests pass but when I use this dusk dashboard it shows about half of them failing. I followed installation instructions.

jesephan commented 5 years ago

Based on the screenshot above, this package shows its running additional test AssertSeeIn while in reality the test has only one assertion.

goper-leo commented 5 years ago

@pdewit did you manage to solve this? I'm also running this issue. Thanks.

For now to get accurate result on dusk I'm using the Laravel\Dusk\TestCase not the DuskDashboard class.

pdewit commented 5 years ago

@goper-leo Nope, have not managed to solve this.

dklesev commented 5 years ago

it looks like it was forgotten to throw the exception. When adding

protected function onNotSuccessfulTest(Throwable $t)
{
    parent::onNotSuccessfulTest($t);
    throw $t;
}

to DuskTestCase.php it seems to work.

bobo52310 commented 5 years ago

Still suffer from this issue...