Skip to content

Commit e5ac532

Browse files
author
Alex Garrett-Smith
committed
Dusk actions
1 parent 39ae510 commit e5ac532

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/dusk.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,17 @@ jobs:
4343

4444
- name: Execute tests
4545
run: php artisan pest:dusk
46+
47+
- name: Upload Screenshots
48+
if: failure()
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: screenshots
52+
path: tests/Browser/screenshots
53+
54+
- name: Upload Console Logs
55+
if: failure()
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: console
59+
path: tests/Browser/console
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
use Laravel\Dusk\Browser;
4+
5+
it('creates a screenshot', function () {
6+
$this->browse(function (Browser $browser) {
7+
$browser->visit('/')
8+
->screenshot('homepage');
9+
});
10+
});

0 commit comments

Comments
 (0)