Skip to content

Commit 2b66782

Browse files
committed
fix: guidelines
1 parent d162832 commit 2b66782

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

resources/boost/guidelines/core.blade.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,45 +48,45 @@
4848
Take screenshots to confirm the page renders correctly:
4949

5050
```
51-
vendor/bin/pest --ai="$this->visit('/')->screenshot(filename: 'homepage');"
52-
vendor/bin/pest --ai="$this->visit('/dashboard')->screenshot(filename: 'dashboard', fullPage: true);"
53-
vendor/bin/pest --ai="$this->visit('/')->screenshotElement('.hero', filename: 'hero-section');"
51+
vendor/bin/pest --ai="visit('/')->screenshot(filename: 'homepage');"
52+
vendor/bin/pest --ai="visit('/dashboard')->screenshot(filename: 'dashboard', fullPage: true);"
53+
vendor/bin/pest --ai="visit('/')->screenshotElement('.hero', filename: 'hero-section');"
5454
```
5555

5656
Assert page content and element state:
5757

5858
```
59-
vendor/bin/pest --ai="$this->visit('/')->assertSee('Welcome');"
60-
vendor/bin/pest --ai="$this->visit('/login')->assertPresent('input[name=email]');"
61-
vendor/bin/pest --ai="$this->visit('/')->assertVisible('.navbar');"
59+
vendor/bin/pest --ai="visit('/')->assertSee('Welcome');"
60+
vendor/bin/pest --ai="visit('/login')->assertPresent('input[name=email]');"
61+
vendor/bin/pest --ai="visit('/')->assertVisible('.navbar');"
6262
```
6363

6464
Test responsiveness by emulating devices:
6565

6666
```
67-
vendor/bin/pest --ai="$this->visit('/')->on()->mobile()->screenshot(filename: 'homepage-mobile');"
68-
vendor/bin/pest --ai="$this->visit('/')->on()->iPhone14Pro()->screenshot(filename: 'homepage-iphone14pro');"
69-
vendor/bin/pest --ai="$this->visit('/')->resize(375, 812)->screenshot(filename: 'homepage-375x812');"
67+
vendor/bin/pest --ai="visit('/')->on()->mobile()->screenshot(filename: 'homepage-mobile');"
68+
vendor/bin/pest --ai="visit('/')->on()->iPhone14Pro()->screenshot(filename: 'homepage-iphone14pro');"
69+
vendor/bin/pest --ai="visit('/')->resize(375, 812)->screenshot(filename: 'homepage-375x812');"
7070
```
7171

7272
Verify interactions work:
7373

7474
```
75-
vendor/bin/pest --ai="$this->visit('/')->click('Login')->assertPathIs('/login');"
76-
vendor/bin/pest --ai="$this->visit('/contact')->type('email', 'test@example.com')->press('Send')->assertSee('Message sent');"
75+
vendor/bin/pest --ai="visit('/')->click('Login')->assertPathIs('/login');"
76+
vendor/bin/pest --ai="visit('/contact')->type('email', 'test@example.com')->press('Send')->assertSee('Message sent');"
7777
```
7878

7979
Check for JavaScript errors and accessibility issues:
8080

8181
```
82-
vendor/bin/pest --ai="$this->visit('/')->assertNoJavaScriptErrors();"
83-
vendor/bin/pest --ai="$this->visit('/')->assertNoAccessibilityIssues();"
82+
vendor/bin/pest --ai="visit('/')->assertNoJavaScriptErrors();"
83+
vendor/bin/pest --ai="visit('/')->assertNoAccessibilityIssues();"
8484
```
8585

8686
Visual regression testing to catch unintended UI changes:
8787

8888
```
89-
vendor/bin/pest --ai="$this->visit('/')->assertScreenshotMatches();"
89+
vendor/bin/pest --ai="visit('/')->assertScreenshotMatches();"
9090
```
9191

9292
### Combining Browser and Backend Assertions
@@ -95,13 +95,13 @@
9595
- **Important:** Always assert a frontend change first (e.g. `assertSee`, `assertPathIs`) to confirm the action was processed before checking backend side effects.
9696

9797
```
98-
vendor/bin/pest --ai="\Illuminate\Support\Facades\Mail::fake(); $this->visit('/contact')->type('email', 'test@example.com')->type('message', 'Hello')->press('Send')->assertSee('Message sent'); \Illuminate\Support\Facades\Mail::assertSent(\App\Mail\ContactForm::class);"
98+
vendor/bin/pest --ai="\Illuminate\Support\Facades\Mail::fake(); visit('/contact')->type('email', 'test@example.com')->type('message', 'Hello')->press('Send')->assertSee('Message sent'); \Illuminate\Support\Facades\Mail::assertSent(\App\Mail\ContactForm::class);"
9999
```
100100

101101
```
102-
vendor/bin/pest --ai="\Illuminate\Support\Facades\Notification::fake(); $this->visit('/register')->type('name', 'John')->type('email', 'john@example.com')->type('password', 'password')->press('Register')->assertPathIs('/dashboard'); \Illuminate\Support\Facades\Notification::assertSentTo(\App\Models\User::first(), \App\Notifications\WelcomeNotification::class);"
102+
vendor/bin/pest --ai="\Illuminate\Support\Facades\Notification::fake(); visit('/register')->type('name', 'John')->type('email', 'john@example.com')->type('password', 'password')->press('Register')->assertPathIs('/dashboard'); \Illuminate\Support\Facades\Notification::assertSentTo(\App\Models\User::first(), \App\Notifications\WelcomeNotification::class);"
103103
```
104104

105105
```
106-
vendor/bin/pest --ai="$this->visit('/checkout')->type('card', '4242424242424242')->press('Pay')->assertSee('Transaction processed'); expect(\App\Models\Order::count())->toBe(1);"
106+
vendor/bin/pest --ai="visit('/checkout')->type('card', '4242424242424242')->press('Pay')->assertSee('Transaction processed'); expect(\App\Models\Order::count())->toBe(1);"
107107
```

0 commit comments

Comments
 (0)