dusk icon indicating copy to clipboard operation
dusk copied to clipboard

assertStringContainsString doesn't display the specified message

Open efcor opened this issue 4 months ago • 1 comments

Dusk Version

8.2.9

Laravel Version

11.28.1

PHP Version

8.3.12

PHPUnit Version

11.4.2

Database Driver & Version

No response

Description

When doing $this->assertStringContainsString('foo', 'bar', 'My custom message.'); in a test, Dusk's output for that test does not display "My custom message." I double checked and assertStringContainsString does have a third parameter for a message, similar to assertSame.

If you do $this->assertSame('foo', 'bar', 'My custom message.'); in a test, Dusk's output for that test will render "My custom message" as expected.

$this->assertSame('foo', 'bar', 'My custom message.');

Screenshot 2024-10-21 at 11 53 06 AM

$this->assertStringContainsString('foo', 'bar', 'My custom message.'); Screenshot 2024-10-21 at 11 53 22 AM

Steps To Reproduce

Be on Mac OS 14.6.1 (Apple Silicon) Have Chrome Version 130.0.6723.59 (Official Build) (arm64)

Run: laravel new laravel (no scaffolding etc in the wizard) composer require laravel/dusk --dev cd laravel herd link

php artisan dusk:install php artisan dusk:chrome-driver

Add $this->assertStringContainsString('foo', 'bar', 'My custom message.'); to the Tests\Browser\ExampleTest test.

Run php artisan dusk.

efcor avatar Oct 21 '24 15:10 efcor