laravel/dusk

`--stop-on-failure` option no longer seems to work

GC-Mark opened this issue · 1 comments

Dusk Version

7.9.1

Laravel Version

10.16.1

PHP Version

8.2.7

PHPUnit Version

10.2.6

Database Driver & Version

No response

Description

Since dusk switched to use the Collision printer, it seems that the --stop-on-failure PHPUnit option no longer works

Steps To Reproduce

  • Create multiple tests that fail
  • Run artisan dusk --stop-on-failure
  • All failing tests run when in fact, it should stop after the first failure

I've just created the following scenario, and seems that the option --stop-on-failure is working for me. So, here I have 3 tests - and the second test is failing:

➜ php artisan dusk --stop-on-failure

   FAIL  Tests\Browser\ExampleTest
  ✓ basic example                                                     0.53s  
  ⨯ basic example2                                                    0.67s  
  ─────────────────────────────────────────────────────────────────────────  
   FAILED  Tests\Browser\ExampleTest > basic example2                        
  Did not see expected text [Laravedqwdwql] within element [body].
Failed asserting that false is true.

  at tests/Browser/ExampleTest.php:29
     25public function testBasicExample2(): void
     26▕     {
     27$this->browse(function (Browser $browser) {
     28$browser->visit('/')
  ➜  29▕                     ->assertSee('Laravedqwdwql');
     30▕         });
     31▕     }
     3233▕     /**

  1   tests/Browser/ExampleTest.php:27


  Tests:    1 failed, 1 passed, 1 pending (2 assertions)
  Duration: 1.30s

Can you update to the latest version of Laravel, Dusk, Collision, and PHPUnit, and let me know if the issue persist?