format('YmdHis'); $testData = [ 'name' => "Test User {$timestamp}", 'email' => "test.{$timestamp}@example.com", 'password' => 'SecurePassword123!', ]; $this->browse(function (Browser $browser) use ($testData) { $browser->visit('http://dishplanner_app:8000/register') ->waitFor('input[id="name"]', 5) ->type('input[id="name"]', $testData['name']) ->type('input[id="email"]', $testData['email']) ->type('input[id="password"]', $testData['password']) ->type('input[id="password_confirmation"]', $testData['password']) ->screenshot('filled-form') ->click('button[type="submit"]') ->pause(3000) // Give more time for processing ->screenshot('after-submit') ->assertSee("Welcome {$testData['name']}!") // Verify successful registration and login ->assertPathIs('/dashboard'); // Should be on dashboard }); } }