Level 2
I've solved this, you cannot have the vite server running when running your tests
1 like
Summer Sale! All accounts are 50% off this week.
I can't seem to get dusk to work with Sail/Inertia/Vue3 on Laravel 9. I have my docker setup per the docs, I'm waiting for an element to be available:
public function testBasicExample()
{
$this->browse(function (Browser $browser) {
$browser->visit('/')
->waitFor('.relative')
->assertSee('Laravel');
});
}
However It's still failing:
E 1 / 1 (100%)
Time: 00:06.148, Memory: 22.00 MB
There was 1 error:
1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\TimeoutException: Waited 5 seconds for selector [.relative].
The only thing I can think of is sail's docker container doesn't ship with chrome, as when I run sail artisan dusk:chrome-driver --detect it returns:
Chrome version could not be detected.
ChromeDriver binary successfully installed for version 104.0.5112.79.
I've solved this, you cannot have the vite server running when running your tests
Please or to participate in this conversation.