mercredi 6 juillet 2016

Laravel unit testing clicking link without href

I am trying to make a test that clicks this link:

<a class="fetch-more" data-type="orders" data-offset-size="10">Show more</a>

Clicking that should result in javascript event triggering.

But using click("Show more") redirects the tester to the root of the webpage instead that.

Is there anyway to click the link with phpunit or laravel's build in testing without being redirected to the root without changing the html?

Aucun commentaire:

Enregistrer un commentaire