Summer Sale! All accounts are 50% off this week.

dannyyounes's avatar

Laravel 9 Dusk timeout issues

I am trying to write laravel dusk tests for my user registration, but I am continually getting a timeout exception when I am firing an event to send a verification email to the registered user. My test executes as follows:

            $browser
                ->visit('/register')
                ->type('first_name', $this->faker->firstName)
                ->type('last_name', $this->faker->lastName)
                ->type('email', $this->faker->email)
                ->type('password', 'password')
                ->type('password_confirmation', 'password')
                ->press('Register')
                ->waitForRoute('verification.notice')
                ->assertSee("Before continuing, could you verify your email address by clicking on the link we just emailed to you? If you didn't receive the email, we will gladly send you another.");

        });

The store function is as follows:


public function store(RegisterRequest $request)
{
    $user = User::create($request->validated());
    auth()->login($user);
   event(new Registered($user));
    return Redirect::route('verification.notice');
}

The error I am faced with:

  1. Tests\Browser\RegisterTest::can_submit_registration_form Facebook\WebDriver\Exception\TimeoutException: Waited 5 seconds for location [/email/verify].
0 likes
1 reply
dannyyounes's avatar

Further to my post I am using inertiajs with laravel 9 and vue3

Please or to participate in this conversation.