Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Generic User Avatar

Laravel Dusk only works offline


  • Please log in to reply
No replies to this topic

#1 apkfery

apkfery

  •  Avatar image
  • Members
  • 1 posts
  • OFFLINE
  •  
  • Local time:01:47 AM

Posted 05 August 2022 - 08:01 AM

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.


BC AdBot (Login to Remove)

 





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users