I recently discovered Laravel Dusk for testing my Laravel applications, and tried following Andre Madarang's excelent tutorial on Laracast: https://laracasts.com/series/browser-testing-with-laravel-dusk,apkfery but right away I ran into the following issue: This is my one and only test:
class LoginTest extends DuskTestCase
{
public function test_login()
{
$this->browse(function($browser) {
$browser->visit('/')
->assertPathIs('/')
->click('@enter_button')
->assertPathIs('/login');
});
}
}
The thing is, if I run this test while my pc is connected to the internet, the test fails 8 out of 10 attempts. If, on the other hand, I run this test while disconnected, the test always passes. I guess I could run all my tests offline, but It's far from a convenient setup. I'm running the latest chrome-driver stable release (103.0.5060.53), as well as the latest chrome browser version (103.0.5060.114). I've tried turning off my antivirus program and chrome extensions as well as the firewall, but the results are the same.
Edited by hamluis, 05 August 2022 - 09:38 AM.
Moved from MRL to Programming - Hamluis.



Back to top







