1. Go to this page and download the library: Download valcuandrei/pest-e2e library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
valcuandrei / pest-e2e example snippets
use App\Models\User;
test('that a user can update their profile', function () {
$user = User::factory()->create();
e2e('frontend')
->actingAs($user)
->withParams([
'name' => 'Test User',
'email' => '[email protected]',
])
->runTest('UserProfile can update their profile');
expect($user->fresh()->name)->toBe('Test User');
expect($user->fresh()->email)->toBe('[email protected]');
});