title: Why Dusk isn't running JavaScript in Homestead env?
body: <p>I'm starting to test my porjects with Laravel's Dusk, I use Homestead as my development environment, I istalled everything that is required to run Dusk, even Google Chrome. Everything is running smoothly, besides anything that requires JavaScript to run.</p>
  
  <pre class="lang-php prettyprint-override"><code>public function testExample()
      {
          $this-&gt;browse(function (Browser $browser) {
              $browser-&gt;visit('/login')
                      -&gt;type('username', 'admin')
                      -&gt;type('password', 'password')
                      -&gt;press('Login')
                      -&gt;assertPathIs('/home')
                      -&gt;visit('/path/test')
                      -&gt;assertPathIs('/path/test')
                      -&gt;select('field1', '1')
                      -&gt;assertSelected('field1', '1')
                      -&gt;select('field2', '1')
                      -&gt;assertSelected('field2', '1')
                      -&gt;select('field3', '1')
                      -&gt;script('$(".component").show(); $(".field4").show();'); //Forcing script to show a component
              $browser-&gt;assertSee('Text:') 
                      -&gt;select('field4', '1')
                      -&gt;assertSelected('field4', '1')
                      -&gt;type('field5', 'Test Dusk')
                      -&gt;type('field6', 'Dusk')
                      -&gt;type('field7', 'www.laravel.com')
                      -&gt;select('field8', '2')
                      -&gt;click('#btn-save')
                      -&gt;waitFor('.modaldialog')
                      -&gt;assertSee('Save');
  
          });
      }
  </code></pre>
  
  <p>The script that I forced is dependent on field1, when selected it must execute a JS to show a new component and one new selectbox. The only way I can run JS is with the script function. The end of the test is a JavaScript dialog to confirm the form and send a post request. I look everywhere for answers, but found nothing. Any ideas what can I do?</p>