jesseleite's avatar

My test is successful, but page is broken?

With this test:

public function testDashboard()
{
    $user = factory('App\Repositories\User')->make(['name' => 'Jesse', 'client_id' => 1]);

    $this->actingAs($user)
         ->visit('dashboard')
         ->see('Jesse');
}

Test still passes, but my page is broken: Screenshot Why is test passing?

0 likes
3 replies
jesseleite's avatar

Hmm seems to be working now. Could app cache, old compiled views, etc. be part of the problem?

zachleigh's avatar

Does the word 'Jesse' appear in the error message anywhere? To make sure youre hitting the route without failure, use the seeStatusCode() method.

jesseleite's avatar

No I check that too. Hmm, maybe 'Jesse' appeared somewhere in Debugbar? Weird thing is, I don't think I changed anything and then tests started performing as I expected. I wonder if app cache or compiled views were an issue.

Please or to participate in this conversation.